Setting up Postman
In this step-by-step guide we will create a Postman Collection from our OpenAPI specification - and set up authentication.
What if it changes?
If the OpenAPI spec changes, you will have to change your collection as described in the API Reference, or you will have to go through this guide again.
https://docs.hubocean.earth/openapi/redoc/openapi.json
Then, under Configure New Token, add these variables:
Token name:
ODCAT PROD
Set Grant Type to Implicit
.
If you are using the Postman Desktop app, set Callback URL to:
https://oauth.pstmn.io/v1/callback
Set Auth URL to:
https://oceandataplatform.b2clogin.com/oceandataplatform.onmicrosoft.com/b2c_1a_signup_signin_custom/oauth2/v2.0/authorize
Set Client ID to:
87537127-da36-4326-bc54-f120f40c9665
Set Scope to:
https://oceandataplatform.onmicrosoft.com/odcat/API_ACCESS offline_access
Inheriting Authentication
When we toggled on "Always inherit authentication" while importing the collection, the enpoints will inherit the same authflow as the one above it. So by saving the auth flow in the root object of the collection, it wil proapagate down to all the endpoints.
Parameter generation
Since we set Parameter Generation Setting to Example
when we imported the OpenAPI spec, the request body here is ready to use.
This request example will always work, but most examples need some changes to work with your scenarios.