Calling all automation enthusiasts!
Some tasks take a lot of time away from your busy day. We rely on automations to help ease this time sink by doing otherwise manual tasks automatically, based upon some trigger.
Enter our "edge" API, also known as "API References" in our UI.
- What is Edge API?
- How to execute an endpoint
- Example Request in API References
- Example Response
- Example Request in Postman
- Response code statuses
What is Edge API?
Our Edge API, named this way due to the subdomain used to access it, is a series of endpoints an admin can use to create either one-off requests or automated actions.
Using JSON, or basic ID numbers, you can perform various actions on users and queues.
These endpoints are broken down into several sections.
To pull a report of workspace details, including users, license types, etc.
Various queue actions include listing all users in a queue, adding/removing users from queues, etc.
Obtain user information, add/remove users from workspaces, update user info, etc
How to execute an endpoint
You have two options:
- Run the endpoint directly via cURL request or with an app such as Postman. Each endpoint is appended by https://edge.chilipiper.com. Use the API references to determine the schema / formatting of each request.
Important: If you plan on automating, you will need a long-lived session token that doesn't expire, otherwise your automation will stop working after a short time due to authorization failure. Please reach out to our Support Team or your Customer Success Manager to retrieve a long-lived session token.
You can also utilize these requests in automation apps such as Zapier (as webhooks).
- Click "try it out" within the API References. This allows you to specify usually one-off requests to test what values are returned.
Clicking "try it out" will enable you to enter values into the provided fields (parameters) and retrieve a response.
Example Request in API References
- Retrieve queue ID. You can do this by opening a Queue within a workspace, and copying the ID from the URL:
Optionally, you can retrieve a full list of queue IDs per workspace with the /queue endpoint. You would retrieve the workspace ID in the same way via URL when viewing that workspace.
- Retrieve User IDs. to do this, we can use the /users/find or /users endpoints (see below)
- Provide the list of IDs to the request body. Note the queue ID was also provided as required.
- Click "Execute":
We will display the related cURL request below the request body to empower you to use this in other apps if needed.
We will show you whether the request was successful or not below the execution of the request:
Example Request in Postman
Using the example cURL request from the response above, we can also see how this might be set up in Postman to execute a one-off request.
Response code statuses
200 - Request successful
404 - ID was not found, or URL cannot be accessed
400 - Bad request. Check the syntax of the request so that it matches our schema
401 / 500 - These usually indicate the user does not have permission to execute the request
- If you are executing a query to retrieve a large amount of records, the maximum records that can be returned in the response is 350.
- A query string parameter ?pageSize=350 can be appended to the endpoints' response to allow for a request of up to 350 values. Otherwise, the default response will return 10 records.
- We supply a 'nextPage' endpoint value at the end of the request to paginate thru the response payload if you need to query more than 350 records.