- DarkLight
API Structure
- DarkLight
This section describes the common API structure which consists of packet structure, message structure and error structure as described below.
Packet Structure
An API packet structure consists of the below parameters:
Parameters | Mandatory | Data Type | Description |
---|---|---|---|
channel | Yes | String | Name of the channel. Example: Amazon, Salesforce, LCM, and Cisco. |
topic | No | String | Name of the topic. This field must be empty. |
subtopic | No | String | Name of the subtopic. This field must be empty. |
ResponseUrl | Yes | String | URL of the requesting Iframe. Example, any third-party app like https://123abc3rdparty.com. |
SubscriberID | Yes | String | It is the subscriber ID received during registration. |
okmessage | Yes | Message Structure | Message to be sent or received from LDPS. |
Packet Structure Example
{
"channel": "Amazon",
"topic": "",
"subTopic": "",
"message": {},
"ResponseUrl": "https://3rdpartapp.com",
"subscriberID": "66517761"
}
Message Structure
The message structure contains parameters such as channel, topic, subtopic, source, data. The following table describes the available parameters:
Parameters | Mandatory | Data Type | Description |
---|---|---|---|
channel | Yes | String | Name of the channel. Example: Amazon. |
topic | Yes | String | Name of the topic. |
subtopic | No | String | Name of the subtopic. |
data | No | String or JSON Object | Data to be sent and received from Acqueon Workspace. |
source | Yes | String | Name of the application broadcasting this message. For example, my-softphone-ui or third- party-application-name. |
Message Structure Example
"message":
{
"channel": "Amazon",
"topic": "OutboundCall",
"subtopic": "OutBoundCallStateChange",
"data": "",
"source": "myapp"
}
Error Message Structure
When an API request fails due to a request/server error, an error response message is returned in JSON format. Each API lists down the possible error messages during a request failure. An error message consists of the below parameters:
Parameters | Mandatory | Data Type | Description |
---|---|---|---|
errorType | Yes | Enum (IErrorTypes) | Type of error. |
errorMessage | No | String | The error message description or error response messages. |
Msg | No | Enum (IErrorMessages) | Internal application-specific error message. |