- Print
- DarkLight
- PDF
After obtaining a Token to access IMS API services, you can use the APIs via:
The IMS Developer Portal itself. This is more suited to testing APIs and is not intended to be used for production purposes.
A third-party tool, such as Postman or your own application.
Using the IMS Developer Portal
It is possible to test APIs directly from the IMS Developer Portal. To test an API:
Click the Authorize button in the top right of the Developer Portal.
Enter the token obtained using the CenAuth Service into the Value textbox in the Available Authorizations dialog that pops up.
Click Authorize.
Next, click the Try it out button for the API which you would like to test.
After clicking Try it out:
Enter your request parameters in the Query fields, as required.
Click Execute.
If you have authorized the Developer Portal with a valid Token, your response will be displayed in the Responses section below.
Using Postman to Submit a Request
For the purposes of this example, we will demonstrate how to create a new GET request in Postman.
Note
Before proceeding, you should ensure that you have configured Postman to use the CenAuth Service to obtain a Token.
To create a new GET request to retrieve the details of an ECH:
Click Add a request in the left-hand panel of Postman.
The New Request tab will open in Postman.
Select the type of Request that you want to submit. In this case, it is a GET Request from the Dropdown:
Insert the base URL into the Request address bar. The following URL provides access to the API to retrieve ECH information from the ims-latest.apps.cenosco.local deployment:
e.g.: https://ims-latest.apps.cenosco.local/developer/api/ech
Next, enter the Query parameters into the Query Params table in Postman. In our case, we will be searching for an ECH with an ID of 1586150:
Click Save to be able to reuse your query.
Note
Refer to the API-specific documentation contained in the IMS Developer Portal to see the different types of API Requests available, as well as the relevant parameters.
Submitting your Request
When you are ready to submit your query:
Click Send to view the results of your query in Postman.
The query results will be returned in the Body tab.
To use the results of the query in another application:
Click the expand arrow next to Send and click Send and Download.
The results of the query will be returned as a JSON file.
Follow the prompts to save the file in your desired location.
Note
If more than an hour has passed since you obtained your token, you will need to Request a New Token to be able to submit queries.