0
Web Read API - Postman Example (version 22)
Knowledge Base / Version 22 / Client Tools / Using Canary's APIs
The following article demonstrates how to set up an environment within Postman (v9.09) for testing Canary's web read API. Postman is a platform designed for building and using API's. For more information on Postman and where to download it, visit https://www.postman.com/.
DISCLAIMER: The API requests found within this collection are configured to connect to the anonymous (http) API endpoint (55235) within Views on the local machine. Admins should use discretion when enabling the anonymous port on a production environment and allowing the ANONYMOUS LOGON.
The configuration can be modified to connect to the secure port (55236) and use https as opposed to http within the url of the post requests.
Configuration
- Open the Canary Admin and select the Views tile. Navigate to the 'Configuration' tab at the bottom of the screen to ensure that the 'Http - Anonymous (Web API)' endpoint is enabled.
- Select the 'Access' tab on the left and ensure the 'ANONYMOUS LOGON' user is listed in the 'ALLOW' menu.
- Open the Postman app and select 'Collections' within the 'Workspaces' page.
- 'Import' the attached Canary_WebReadAPI.postman_collection.json and Canary_WebReadAPI.postman_environment files.
- Select the 'Canary Views Web API' environment from the drop-down list.
- Environment variables can be edited, if needed, by selecting the "eye" icon next to the drop-down list. The environment is configured to connect to Views service on the 'localhost'.
- To test the connection, select the 'getUserToken' from the V2\Post folder. Select the 'Body' tab to see the JSON message that will be passed in.
- Press 'Send'. The call should return a 'Good' status with a userToken string value.
- Once the token is acquired, it can then be used for subsequent calls requiring a userToken, such as /getTagData.