Fetch List of Alerts
alerts [ id range ] API fetches the list of alerts based on the Ids passed. This is a streaming API.
Endpoint
Method: GET
URL: https://api.<region>.cloud.uniphore.com/alerts?t=id-range&ids=id1,id2,…idn&tenantid=<tenant_id>&environment=<env_name>
Request
curl -H "Authorization: Bearer 911999706310ffbcb32981863e23ce72d5e60d7b" -XGET https://api.<region>.cloud.uniphore.com/alerts?id=id-range&ids=1,2,3,...,n&tenantid=432&environment=dev
Header Parameter
Authorization - Bearer <Token>
Query Parameters
Parameter Name | Mandatory/ Optional | Type | Description |
---|---|---|---|
| Mandatory | string | t represents the type of query. Example: For ids use id-range value. |
| Mandatory | string | A list of ids for which alerts need to be fetched. The ids are separated by a comma. |
| Mandatory | String | The unique identifier for your account |
| Optional | String | Operating environment type. Three out-of-the-box environments are provided for each account:
|
Response and Error Codes
Code | Response |
---|---|
200 | A stream of newline separated alert documents in the format listed in the above API |
401 | {“reason”:”Authentication failed”} |
422 | {“error”: “Error while decoding response from the database”} |
500 | {“error”: “Internal server error”} |
Alert Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "id": { "type": "string" }, "conversationId": { "type": "string" }, "startTime": { "type": "integer" }, "sequenceNumber": { "type": "integer" }, "resolved": { "type": "boolean" }, "alert": { "type": "object", "properties": { "name": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string" }, "recipient": { "type": "string" }, "displayCount": { "type": "integer" } }, "required": [ "name", "message", "type", "recipient", "displayCount" ] }, "metadata": { "type": "object", "properties": { "agentId": { "type": "string" }, "customerId": { "type": "string" }, "agentClientId": { "type": "string" }, "customerClientId": { "type": "string" }, "conversationType": { "type": "string" }, "journeyId": { "type": "string" }, "tenantId": { "type": "string" }, "organizationId": { "type": "string" }, "businessProcessId": { "type": "string" } }, "required": [ "agentId", "customerId", "agentClientId", "customerClientId", "conversationType", "journeyId", "tenantId", "organizationId", "businessProcessId" ] } }, "required": [ "id", "conversationId", "startTime", "sequenceNumber", "resolved", "alert", "metadata" ] }