Contents
Recording Label APIs
ENTIRE PAGE IS NEW
The following APIs are accessible at the base path /api/v2
For example, http://localhost:8080/api/v2/recordings<recid>
Pre-requisite
Set Elasticsearch schema v2 in Interaction Recording Web Services, to enable it to use labels and non-deletion features. For existing deployments, follow the migration steps here: Migrating an Existing Elasticsearch Deployment to Schema V2). New deployments after GIR version 8.5.2xx.xx (TBD) will have Elasticsearch schema v2 enabled by default.
Permissions
See: Configuring Permissions for Recording Labels
Overview
Use this API to create and administer label definitions and label recordings.
A Label Definition provides the basic definition of a label, with a name, displayName and description.
A Label can then be added to a voice recording by referring to the name of the label definition.
Name???
| Request URL | /recordings/{id} |
| HTTP method | POST |
| Required features | schema-elasticsearch-v2-call-recording schema-elasticsearch-v2-screen-recording |
| Payload | ||||||
| Attribute | JSON Data Type | Mandatory | Possible Values | Default Value | Description | Notes |
| operationName | String | yes | applyNonDelete | N/A | Mark a recording for non-deletion. | If it is for a voice recording, all the associated screen recordings at the time of the operation will also be updated. |
Label Definitions
Creating Label Definitions
| Request URL | /api/v2/recording-label-definitions |
| HTTP method | POST |
| Required Features: | Roles: Supervisor, Agent Permissions: RECORDING_PERMISSION_ADD_LABEL_DEFINITION |
| Payload | ||||||
| Attributes | JSON Data Type | Mandatory | Possible Values | Default Value | Description | Notes |
| name | String | yes | N/A | The name of the label definition |
| |
| displayName | String | no | defaults to the value of name | The display name of the label definition | ||
| description | String | no | empty string | The description of the label definition | ||
Example
{
"name": "SomeLabelDefinition",
"displayName": "New Label Definition",
"description": "A new label definition"
}
Response
| HTTP Status | |||
| Status Codes | Situations | Notes | |
| 201 CREATED | The label definition was created successfully | ||
| 400 BAD REQUEST | Bad Request received | ||
| 403 FORBIDDEN | Forbidden to create the label definition | ||
| 409 CONFLICT | The label definition was not created as one with the same name exists already | ||
| Payload | ||||||
| Attributes | JSON Data Type | Mandatory | Possible Values | Default Value | Situations | Notes |
| statusCode | Integer | yes | 0 | N/A | label definition was created | |
| 1 (RequiredParameterMissing) | If the required payload attributes are missing | |||||
| 2 (InvalidRequestParameter) | If the constraints of payload attributes are not met | |||||
| 3 (OperationForbidden) | If the requesting user does not have the permissions required or is attempting to create with reserved name | |||||
| 5 (Unauthorized) | If the requesting user does not have the roles required | |||||
| 18 (ResourceAlreadyExists) | If a label definition with the same name exists already | |||||
| statusMessage | String | no |
|
N/A | The statusMessage will provide more information about a failure if statusCode is not 0. | |
| labelDefinition | JSON object | no | JSON object containing the label definition
|
N/A | The newly created label definition or existing one in case of attempt to create an already existing one. | |
Examples
{
"statusCode": 0,
"labelDefinition": {
"path": "/recording-label-definitions/2365adc7-67bb-448e-b32d-04731faa9231",
"name": "SomeLabelDefinition",
"displayName": "New Label Definition",
"description": "A new label definition"
}
}
{
"statusCode": 2,
"statusMessage": "Invalid value specified."
}
{
"statusCode": 3,
"statusMessage": "This operation is not allowed."
}
{
"statusCode": 18,
"statusMessage": "Resource exists already",
"labelDefinition": {
"path": "/recording-label-definitions/a6a6f1d9-788a-47b4-bdeb-80b3d598cfa6",
"name": "ExistingLabelDefinition",
"displayName": "Existing Label Definition",
"description": "An existing label definition"
}
}Updating Label Definitions
Name?
The path attribute from the response returned by the GET or POST operations for label definition can be used here.
| Request URL | /recording-label-definitions/{labelDefinitionId} |
| HTTP method | PUT |
| Required Features: | Roles: Supervisor, Agent Permissions: RECORDING_PERMISSION_ADD_LABEL_DEFINITION |
| Attributes | JSON Data Type | Mandatory | Possible Values | Default Value | Description | Notes |
| name | String | yes | N/A | The name of the label definition |
| |
| displayName | String | no | default to the value of name if not specified | The display name of the label definition | ||
| description | String | no | empty string | The description of the label definition |
Example
{
"name": "SomeLabelDefinition",
"displayName": "New Label Definition",
"description": "A new label definition"
}
Response
| HTTP Status | ||
| Status Codes | Situations | Notes |
| 200 OK | The label definition was updated successfully | |
| 400 BAD REQUEST | Bad Request received | |
| 403 FORBIDDEN | Forbidden to update the label definition | |
| 404 NOT FOUND | Cannot find the label definition to update | |
| Payload | ||||||
| Attributes | JSON Data Type | Mandatory | Possible Values | Default Value | Situations | Notes |
| statusCode | Integer | yes | 0 | N/A | label definition was updated | |
| 1 (RequiredParameterMissing) | if the required payload attributes are missing | |||||
| 2 (InvalidRequestParameter) | if the constraints of payload attributes are not met | |||||
| 3 (OperationForbidden) | if the requesting user does not have the permissions
required or is attempting to update with different name |
|||||
| 5 (Unauthorized) | if the requesting user does not have the roles required | |||||
| 6 (ResourceNotFound) | if the specified label definition cannot be found | |||||
| statusMessage | String | no |
|
N/A | The statusMessage will provide more information about a failure if statusCode is not 0. | |
| labelDefinition | JSON object | yes |
|
N/A | ||
Examples
{
"statusCode": 0,
"labelDefinition": {
"path": "/recording-label-definitions/2365adc7-67bb-448e-b32d-04731faa9231",
"name": "SomeLabelDefinition",
"displayName": "Updated Label Definition",
"description": "An updated label definition"
}
}
{
"statusCode": 2,
"statusMessage": "Invalid value specified."
}
{
"statusCode": 3,
"statusMessage": "This operation is not allowed."
}
{
"statusCode": 5,
"statusMessage": "Access denied."
}
{
"statusCode": 6,
"statusMessage": "Custom label definition cannot be found."
}Deleting Label Definitions
==Name?==
| Request URL | /recording-label-definitions/{labelDefinitionId} |
| HTTP method | DELETE |
| Required Features: | Roles: Supervisor, Agent Permissions: RECORDING_PERMISSION_DELETE_LABEL_DEFINITION |
Response
Status Codes| HTTP Status | ||
| Situations | Notes | |
| 200 OK | The label definition was deleted successfully. | |
| 403 FORBIDDEN | Forbidden to delete the label definition. | |
| 404 NOT FOUND | Cannot find the label definition to delete. | |
| Payload | ||||||
| Attributes | JSON Data Type | Mandatory | Possible Values | Default Value | Situations | Notes |
| statusCode | Integer | yes | 0 | N/A | The label definition was deleted. | |
| 3 (OperationForbidden) | If the requesting user does not have the permissions required. | |||||
| 5 (Unauthorized) | If the requesting user does not have the roles required. | |||||
| 6 (ResourceNotFound) | If the specified label definition cannot be found. | |||||
| statusMessage | String | no |
|
N/A | The statusMessage will provide more information about a failure if statusCode is not 0. | |
