This document describes how to configure and use Postman to interact with and test our application's API.
-
Install Postman
Download and install the desktop client from the official website.
-
Import Collection and Environment
- Open Postman and select
File->Import...menu item. - Navigate to the project's postman directory.
- Import the provided files (you should typically import both the API Collection
*.postman_collection.jsonand the Environment variables*.postman_environment.json).
- Open Postman and select
-
Select the Environment
In the top right corner of the Postman interface, select the
devenvironment from the environment dropdown menu.
To call protected API endpoints, you must be authenticated.
- Create an
adminaccount using the console command./bin/console user:create(described in commands.md). - In Postman, open the
Authentication->getTokencollection request. Set theadminuser password (created in the previous step) and execute it to generate a token. - Open the
Environmentstab in the bottom-left corner and select thedevenvironment. - Update the
Valueof thetokenvariable with the token you just received. - You are now able to use other endpoints in the collection. Postman will automatically use this token for authentication.
