Recording API
The Recording API is responsible for:
- Retrieving real-time information about agents
- Starting, stopping, and modifying active and inactive audio and video recordings
This requires knowledge of the credentials configured to access the API.
For more information, see API Overview.
Agent Commands
Used to view real-time information about agents and their activities.
Agent Status | |
---|---|
Description |
Returns the state of the specified agent (AgentID, BusinessUnit, AgentPhone, SystemUsername, CrmUsername, ActiveCall, InactiveCalls, Username, DeviceId, DeviceAlias, DesktopOnlySessions) based on supplied parameters. |
HTTP Method | GET |
URI |
http://[RecordingApiServerAddress]/api/Agent |
Required Parameters |
|
Optional Parameters |
|
Example(s): |
http://[RecordingApiServerAddress]/api/Agent?agentIdentifier=Id&value=2 |
Possible Returns |
|
The following data is returned with successful execution of this command:
{
"AgentId": 2,
"BusinessUnit": 0,
"AgentPhone": "5003",
"SystemUsername": "me",
"CrmUsername": "",
"ActiveCall": {
"CallInstance": "fe0b6231-1ffcce90-c84c9c5f@10.100.6.20",
"Metadata": {
"deviceid": "5003",
"devicealias": "",
"gate": "12",
"ani": "5003",
"dnis": "4000",
"user1": "u1-8000",
"user2": "u2-6000",
"user3": "u3-4000",
"user4": "u4-6000",
"user5": "u5-2000",
"user6": "u6-4000",
"user7": "u7-6000",
"user8": "u8-2000",
"user9": "u9-2000",
"user10": "u10-4000",
"user11": "u11-7000",
"user12": "u12-4000",
"user13": "u13-8000",
"user14": "u14-1000",
"user15": "u15-1000",
"callid": "fe0b6231-1ffcce90-c84c9c5f@10.100.6.20",
"sgroup": "40",
"callinstance": "fe0b6231-1ffcce90-c84c9c5f@10.100.6.20",
"calldirection": "O",
"station": "",
"istrunk": "",
"sessionid": "",
"starttime": "12/08/2016 15:06:40",
"endtime": "12/08/2016 15:06:40",
"callsegmentid": "",
"keepdays": "-1",
"archiveaction": "-1"
},
"CallState": "OnCall",
"Recordings": [
{
"RecordingIdentifier": "f2376544-2542-47c0-be51-bb2909b740a2",
"IsDuplicate": false,
"RecordingState": "Recording",
"CallInstance": "fe0b6231-1ffcce90-c84c9c5f@10.100.6.20"
}
],
"ScreenRecordings": [
{
"RelatedCallInstance": "fe0b6231-1ffcce90-c84c9c5f@10.100.6.20",
"ScreenRecordingidentifier": "",
"RecordingState": "Recording"
}
]
},
"InactiveCalls": [],
"Username": null,
"DeviceId": "5003",
"DeviceAlias": "",
"DesktopOnlySessions": []
}
Agent List | |
---|---|
Description |
Returns a list of all agents and their statuses currently stored in the Recording API tracker, which persists across service restarts. |
HTTP Method | GET |
URI |
http://[RecordingApiServerAddress]/api/Agent/GetAll |
Required Parameters |
|
Optional Parameters |
|
Example(s): |
http://[RecordingApiServerAddress]/api/Agent/GetAll |
Possible Returns |
|
The following data is returned with successful execution of this command:
[
{
"AgentId": 2,
"BusinessUnit": 0,
"AgentPhone": "5003",
"SystemUsername": "me",
"CrmUsername": "",
"ActiveCall": null,
"InactiveCalls": [],
"Username": null,
"DeviceId": "5003",
"DeviceAlias": "",
"DesktopOnlySessions": []
}
{
"AgentId": 2,
"BusinessUnit": 0,
"AgentPhone": "5005",
"SystemUsername": "you",
"CrmUsername": "",
"ActiveCall": null,
"InactiveCalls": [],
"Username": null,
"DeviceId": "5005",
"DeviceAlias": "",
"DesktopOnlySessions": []
}
]
Blackout Commands
Multiple Recording API servers sync blackout statuses to each other over RabbitMQ. Blackouts are based on the agent, not the call, so if a blackout starts and an agent receives a transfer or changes calls, the blackout will continue until stopped or until the configured maxagentblackout threshold is reached.
The BlackoutStartTime and BlackoutStopTime parameters use standard DateTimeOffset formatting. TimeOffset is the number of seconds (integer). The following factors apply:
- If only the TimeOffSet is present, then the blackout start/stop time is determined by the Recording API and the value is whenever the Recording API received the command plus the TimeOffSet.
- If both are present, then only the BlackoutStartTime and BlackoutStopTime parameters will be applied and TimeOffSet will be ignored.
- If both are absent, then the blackout start/stop time is determined by the Recording API and the value is whenever the Recording API received the command.
- BlackoutStartTime and BlackoutStopTime are determined on the client side.
StartForAgent | |
---|---|
Description |
Initiates a blackout for the current call for the specified agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Blackout/StartForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Blackout/StartForAgent {"AgentIdentifier":"Id", "Value":"1"} |
Possible Returns |
|
StopForAgent | |
---|---|
Description |
Terminates a blackout for the current call for the specified agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/blackout/StopForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Blackout/StopForAgent {"AgentIdentifier":"Id", "Value":"1"} |
Possible Returns |
|
Active Recording Commands
Used to initiate, update, duplicate, and terminate audio recordings for agents.
StartForAgent | |
---|---|
Description |
Initiates a new audio recording for an agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Record/StartForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Record/StartForAgent {"AgentIdentifier":"Id", "Value":"2"} or {"AgentIdentifier":"Phone", "Value":"805003"} |
Possible Returns |
|
StopForAgent | |
---|---|
Description |
Ends active audio recording for an agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Record/StopForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Record/StopForAgent {"AgentIdentifier":"Id", "Value":"2"} or {"AgentIdentifier":"Phone", "Value":"805003"} |
Possible Returns |
|
UpdateForAgent | |
---|---|
Description |
Updates call metadata for an active audio call recording based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Record/UpdateForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Record/UpdateForAgent {"AgentIdentifier":"Phone", "Value":"805003", "CallMetadata":{"user2":"1234567890"}} |
Possible Returns |
|
StartDuplicateForAgent | |
---|---|
Description |
Initiates a duplicate call recording based on supplied parameters for an agent who is already being recorded by another schedule. If CallIdentifier is not specified, the Recording API will assume it should duplicate the active call. An inactive call would be a secondary call for an agent that is on hold, awaiting cold transfer pickup, or is parked. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Record/StartDuplicateForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Record/StartDuplicateForAgent {"AgentIdentifier":"Phone", "Value":"5003", "CallIdentifier":"111222"} |
Possible Returns |
|
StopDuplicateForAgent | |
---|---|
Description |
Ends a duplicate call recording based on supplied parameters for an agent who is already being recorded by another schedule. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/Record/StopDuplicateForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/Record/StopDuplicateForAgent {"AgentIdentifier":"Phone", "Value":"5003”} |
Possible Returns |
|
Screen Recording Commands
Used to initiate, update, and terminate screen recordings for agents.
StartForAgent | |
---|---|
Description |
Initiates a new screen recording for an agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/ScreenRecord/StartForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/ScreenRecord/StartForAgent {"AgentIdentifier":"Phone", "Value":"7000", "CallMetadata":{"user1":"API Initiated"}} |
Possible Returns |
|
UpdateForAgent | |
---|---|
Description |
Updates call metadata for an active screen recording based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/ScreenRecord/UpdateForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/ScreenRecord/UpdateForAgent {"AgentIdentifier":"Phone", "Value":"7000", "CallMetadata":{"user1":"API Initiated"}} |
Possible Returns |
|
StopForAgent | |
---|---|
Description |
Ends the active screen recording for an agent based on supplied parameters. |
HTTP Method | POST |
URI |
http://[RecordingApiServerAddress]/api/ScreenRecord/StopForAgent |
Required Parameters |
|
Optional Parameters |
|
Example(s): | http://[RecordingApiServerAddress]/api/ScreenRecord/StopForAgent {"AgentIdentifier":"Phone", "Value":"7000", "CallMetadata":{"user1":"API Initiated"}} |
Possible Returns |
|