Postman Collection
To test our API without writing a single line of code, we used our OpenAPI Specification to generate a dedicated Postman Collection.
Postman is an API Platform for building and using APIs. Postman Collections can describe all the methods exposed by an API, making it possible for the user to modify the different request parameters and perform actual calls toward the API, obtaining the HTTP response as a result.
0️⃣ Install Postman
To use our collection, we suggest downloading Postman on your device; it is available for Windows, Mac, and Linux.
Next, sign up to Postman: don't worry, to use our collection the Free Plan is enough 😉
1️⃣ Import the Collection
Our Collection is generated automatically using our OpenAPI Specification, and can be downloaded from our GitHub Repository at the postman/fic-api.json position; it is updated every time a new version of the Specification is released, so you can just redownload it to keep in sync.
Once you have downloaded the JSON file of the collection, you can import it following this procedure.
Now you're almost ready to interact with our API!
If you prefer, you can instead use our OpenAPI Specification directly, importing the openapi.yaml file using this procedure. You just need to be sure to download also the files in the models folder, otherwise, the import will fail. Also, you need to select the right parameters to import the collection correctly.
2️⃣ Authorization
Next, to be able to interact with our API you need to be authorized: see the Authentication page for further info.
You have two main options to retrieve a valid token:
✋ Manual Authentication
This isn't only for the Manual tokens! If you obtained a token using one of the other methods outside of Postman (for example in your code) you can decide to test it using Postman! Just use it as a manual token and follow the following points, but remember OAuth 2.0 tokens expire!
Since Postman is mainly used to test and discover our API behavior, this is a great use case for Manual Authentication. Just generate a new token with the required scopes and insert it in Postman!
Once you retrieved the token, you have two options to use a manual token:
-
In the Authorization section, you can select Bearer Token in the Auth Type dropdown and then paste the token in the Token field.
-
If you want to insert your header manually, you can leave No Auth in the Authorization section and add the Authorization header in the Headers section. The value of the token must be
Bearer ACCESS_TOKEN
where ACCESS_TOKEN must be replaced with the token you obtained before. This method is a little more complicated than the previous one, but you could use it to store and test different tokens by selecting the one you want to use and deselecting the other ones.