Postman is a tool to help test and build APIs. We've developed a Postman Collection that contains the complete set of API calls to make it all convenient for developers integrating with the Platform APIs.
Before you start with the Postman Collection, please make sure you have a developer account created on OS1 Developer Portal, have registered an app, and have a set of authentication keys (Client ID and Client Secret).
If you run into any issues with the collection, see our Postman Troubleshooting Guide.
Open Postman application > Go to Collections > Click on the Import button > In the dialog box, go to Raw Text and copy-paste the code from Git> Click on Import.
Now, visit the Postman account > Go to Environments > Click on the Import button > In the dialog box, click on Raw text > Paste the file that you copied above > Click on Continue.
Next, add the values of the different variables to the environment file table. Before that, make sure the OSI Environment File is selected.
Open Postman account > Environments > OSI Environment File > Add variables.
To start with, you’ll need to add Client ID, Secret, baseURL (Tenant URL), Request ID (a random identifier; for example, request123), and Tenant ID to the environment file.
You will get the Client ID, Secret, Tenant URL, and Tenant ID after registering an app on OS1 Platform Developer Portal. For more information about registering an App, see Getting started building Apps.
Note that the variable values used in the above screenshot are made up and will not work if used to make a request.
In the Postman app, go to Collections > CoreOS Services > Token > Click on Send to make your request > You'll receive the token in the body as shown below.
Add this access token to the environment file.
🚧 ️ Access Token Expiry
The access token has an expiry date. If after running an API, it says the token is expired, you can simply generate a new one by following the same steps mentioned in step 3.
The next step is to choose an endpoint from the right-hand side navigation of the collection and start to build your request. Here, we will try out the Entity Service API.
To create a new Entity, visit Entity Service > Entity Type APIs > Entity Type Post > In the request body, enter the details of the Entity you want to create, for example, the name & category of the Entity > Hit Send > In response, a new Entity will be created & you'll get the Entity ID.
🎉 You are now ready to explore other endpoints.
📘 API Reference 'Try It' Feature
Use the API Reference ‘Try It’ Feature to explore all the APIs directly using the Documentation Portal.