Revision as of 03:59, February 15, 2017 by Sschlich (talk | contribs)
Jump to: navigation, search

Recording Label API

Use this API to create and administer label definitions and label recordings.

Create a new page titled Recording Label API which will be under the Interaction Recording Web Services API on the left nav bar to document Label Definitions and Adding, Updating and Deleting Labels from Recordings, described below.
Put the following text in the 2 pages:

  1. Recording Label API, right after the Pre-requisites
  2. https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions, at the beginning of the section titled "Configuring permissions for Recording Labels"


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.

Label Definitions

Creating Label Definitions

Method Path Required Roles Required Permissions Notes
POST /api/v2/recording-label-definitions
  • Supervisor
  • Agent
RECORDING_PERMISSION_ADD_LABEL_DEFINITION Create the label definition if it does not already exist

Payload Attributes JSON Data Type Mandatory Possible Values Default Value Description Notes name String yes N/A The name of the label definition is case-sensitive must only contain ASCII characters must be unique among other label definitions must not start with two underscores("__") as it is reserved 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 attempti ng 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 not specified; a message providing information 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 path (string): The path to the resource name (string): The name of the label definition displayName (string, opti onal): The display name of the label definition description (string, optio nal): The description of 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": "/api/v2/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": "/api/v2/recording-label-definitions/a6a6f1d9-788a-47b4-bdeb-80b3d598cfa6", "name": "ExistingLabelDefinition", "displayName": "Existing Label Definition", "description": "An existing label definition" } } Updating Label Definitions Method Path Required Roles Required Permissions PUT /api/v2/recording-label-definitions/{labelDefinitionId} Supervisor Agent RECORDING_PERMISSION_ADD_LABEL_DEFINITION Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions The path attribute fr om the response returned by the GET or POST operations for label definition can be used here. Payload Attributes JSON Data Type Mandatory Possible Values Default Value Description Notes name String yes N/A The name of the label definition name cannot be updated - must be specified to the same value as the existing name 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 not specified; a message providing information N/A The statusMessage will provide more information about a failure if statusCode is not 0. labelDefinition JSON object yes name (string): The name of the label definition displayName (string, op tional): The display name of the label definition description (string, optio nal): The description of the label definition path (string, optional): The path of the label definition N/A Examples: { "statusCode": 0, "labelDefinition": { "path": "/api/v2/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 Method Path Required Roles Required Permissions DELETE /api/v2/recording-label-definitions/{labelDefinitionId} Supervisor Agent

Method Path Required Roles Required Permissions POST /api/v2/recordings/<recid>/labels Supervisor Agent RECORDING_PERMISSION_ADD_LABEL Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissio ns Payload Properties Type Mandatory Default Values Description name String Yes N/A The name of the label definition to be added to the recordings. content JSON Object No empty The content associated with the label to be added to the recordings. This is a free-form JSON element that accepts valid JSON types. Example Add Label To a Recording Payload Example POST /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels { "name" : "comment" , "content" : { "time" : "2017-01-01T15:07:17Z" , "text" : "This is an awesome comment!" } } POST /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels { "name" : "importantTag" } POST /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels { "name" : "comment" , "content" : { "time" : "2017-08-05T15:07:17Z" , "rating" : "excellent" , "by" : { "userName" : "supervisor_1" , "firstName" : "super" , "lastName" : "visor" } } } Response HTTP Status Situations 201 CREATED the label has been added to the recording successfully 403 FORBIDDEN the recording requested can be found but label cannot be added to it for whatever reason(e.g. region not matched, requesting user cannot access the recording) the recording requested cannot be found there already exists a label instance that is identical to the one to add on the same recording if the label definition name cannot be found Fields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the label was added to the requested recording successfully 13 (UnableToCreateResource) label failed to be added to the requested recording 18 (ResourceAlreadyExists) there already exists a label instance that is identical to the one to add on the same recording statusMessage String no not specified a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. id String no id of the created label HTTP status is 201 path String no path of the created label HTTP status is 201 uri String no uri of the created label HTTP status is 201 Example: 201 CREATED { "statusCode": 0, "id": "8c9a634f-343d-49b3-8322-b571be520b31", "uri": "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/l abels/8c9a634f-343d-49b3-8322-b571be520b31", "path": "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-3 43d-49b3-8322-b571be520b31" } 403 FORBIDDEN { "statusCode": 13, "statusMessage": "Cannot add label to recording." } Adding a Label to multiple Recordings Method Path Required Roles Required Permissions POST /api/v2/recording-labels Supervisor Agent RECORDING_PERMISSION_ADD_LABEL Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions Payload Level-0 Properties Level-1 Properties Type Mandatory Default Values Description recordingIds N/A JSON Array Yes N/A The list of recording IDs that the label needs to be added to. label name String Yes N/A The name of the label to be added to the recordings. content JSON Object No empty The content associated with the label to be added to the recordings. This is a free-form JSON element that accepts valid JSON types Example Add Label To Recordings Payload Example POST /api/v2/recording-labels { "recordingIds" : [ "bf697521-3ffc-46f1-b840-f7230e940df3" , "76705af9-65d4-46a4-af84-e984ef09ec5d" ], "label" : { "name" : "comment" , "content" : { "time" : "2017-08-05T15:07:17Z" , "text" : "This is an awesome comment!" } } } POST /api/v2/recording-labels { "recordingIds" : [ "bf697521-3ffc-46f1-b840-f7230e940df3" , "76705af9-65d4-46a4-af84-e984ef09ec5d" ], "label" : { "name" : "importantTag" } } POST /api/v2/recording-labels { "recordingIds" : [ "bf697521-3ffc-46f1-b840-f7230e940df3" , "76705af9-65d4-46a4-af84-e984ef09ec5d" ], "label" : { "name" : "comment" , "content" : { "time" : "2017-08-05T15:07:17Z" , "rating" : "excellent" , "by" : { "userName" : "supervisor_1" , "firstName" : "super" , "lastName" : "visor" } } } } HTTP Status Situations 200 OK the requested list of recordings is empty 201 CREATED the label has been added to all the requested recordings successfully and at least one label resource has been created 207 MULTI-STATUS the label failed to be added to some but not all of the requested recordings, but succeeded for the rest 403 FORBIDDEN the label failed to be added to all of the requested recordings In the response of the API, it will report both succeeded and failed cases: Fields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the label is added to all the requested recordings successfully 7 (PartialResponse) the label succeeded on some of the requested recordings, but failed on the rest 13 (UnableToCreateResource) the label failed to be added to all the requested recordings statusMessage String no not specified a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. succeeded JSON Array yes recording id to created label URI mapping for the recordings to which label has been successfully added it will always be displayed in the response but can be empty failed JSON Array yes a list of blocks that describes the failures it will always be displayed in the response but can be empty Example: 200 OK{ "statusCode": 0, "succeeded": [], "failed": [] } 201 CREATED { "statusCode": 0, "succeeded": [ { "recordingId": "bf697521-3ffc-46f1-b840-f7230e940df3", "id": "8c9a634f-343d-49b3-8322-b571be520b31", "uri": "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/l abels/8c9a634f-343d-49b3-8322-b571be520b31", "path": "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-3 43d-49b3-8322-b571be520b31" }, { "recordingId": "76705af9-65d4-46a4-af84-e984ef09ec5d", "id": "1574da8d-ed8d-419d-b2e7-f00c1dabe0dc", "uri": "http://127.0.0.1/api/v2/recordings/76705af9-65d4-46a4-af84-e984ef09ec5d/l abels/1574da8d-ed8d-419d-b2e7-f00c1dabe0dc", "path": "/api/v2/recordings/76705af9-65d4-46a4-af84-e984ef09ec5d/labels/1574da8d-e d8d-419d-b2e7-f00c1dabe0dc" } ], "failed": [] } 207 MULTI-STATUS { "statusCode": 7, "statusMessage": "Add of label failed on some recordings.", "succeeded": [ { "recordingId": "bf697521-3ffc-46f1-b840-f7230e940df3", "id": "8c9a634f-343d-49b3-8322-b571be520b31", "uri": "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/l abels/8c9a634f-343d-49b3-8322-b571be520b31", "path": "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-3 43d-49b3-8322-b571be520b31" } ], "failed": [ { "recordingId": "76705af9-65d4-46a4-af84-e984ef09ec5d", "statusCode": 13, "statusMessage": "Cannot add label." }, { "recordingId": "d0464cf3-f81f-49b5-bc0e-bd166161d756", "statusCode": 13, "statusMessage": "Internal error." } ] } 403 FORBIDDEN { "statusCode": 13, "statusMessage": "Add of label failed on all the recordings.", "succeeded": [], "failed": [ { "recordingId": "d0464cf3-f81f-49b5-bc0e-bd166161d756", "statusCode": 13, "statusMessage": "Cannot add label." } ] } Updating a Label on a Recording Method Path Required Roles Required Permissions PUT /api/v2/recordings/<recid>/labels/<id> CC Admin Supervisor Agent RECORDING_PERMISSION_ADD_LABEL Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permi ssions Payload Properties Type Mandatory Default Values Description content JSON Object No empty The content associated with the label to be updated to the recordings. This is a JSON object which can be customized depending on the application. The examples below show a possible use-case of adding user comments on a recording. Update Label To a Recording Payload Example PUT /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/1574da8d-ed8d-419d-b2e7-{ "content" : { "time" : "2017-08-05T15:07:17Z" , "text" : "This is an awesome comment!" } } PUT /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/5dbdb466-5377-4351-bd1e-{ "content" : { "time" : "2017-08-05T15:07:17Z" , "rating" : "excellent" "by" : { "userName" : "supervisor_1" , "firstName" : "super" , "lastName" : "visor" } } } Effect By updating a label, in addition to the content of the label being updated to the one that is specified in the payload, the following will also be updated: Fields New Value createTime The time when the update action was performed. createUser The username of the user who requested the update. Response HTTP Status Situations 200 OK the requested label has been updated successfully 403 FORBIDDEN the recording requested can be found but the label cannot be updated to it for whatever reason(e.g., region not matched, requesting user cannot access the recording) the recording requested cannot be found 404 NOT FOUND the requested label cannot be found Fields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the label has been updated to the requested recording successfully 6 (ResourceNotFound) the label cannot be found 15 (UnableToUpdateResource) the recording requested can be found but the label cannot be updated to it for whatever reason(e.g. region not matched, requesting user cannot access the recording) the recording requested cannot be found statusMessage String no not specified; a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. Update Label To a Recording Response Example 200 OK { "statusCode" : 0 } 403 FORBIDDEN { "statusCode" : 15, "statusMessage" : "Cannot update the label for recording." } 404 NOT FOUND { "statusCode" : 6, "statusMessage" : "Requested label cannot be found." } Deleting a Label from a Recording Method Path Required Roles Required Permissions DELETE /api/v2/recordings/<recid>/labels/<id> Supervisor Agent RECORDING_PERMISSION_DELETE_LABEL Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permi ssions Response HTTP Status Situations 200 OK the label has been deleted from the requested recording successfully 403 FORBIDDEN the recording requested can be found but the label cannot be deleted from it for whatever reason(e.g., region not matched, requesting user cannot access the recording) the recording requested cannot be found Fields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the label has been deleted from the requested recording successfully or the label cannot be found within the requested recording 14 (UnableToDeleteResource) the label failed to be deleted from the requested recording statusMessage String no not specified; a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. Delete Label Instance From Recording Response Example DELETE /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/1574da8d-ed8d-419d-200 OK { "statusCode" : 0 } DELETE /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-343d-49b3-403 FORBIDDEN { "statusCode" : 14, "statusMessage" : "Label failed to be deleted from the recording." } Getting Labels from a Recording Getting all labels from a Recording Method Path Required Roles Required Permissions Notes GET /api/v2/recordings/<recid>/labels CC Admin Supervisor Agent N/A Parameters Attributes JSON Data Type Mandatory Possible Values Default Value Description Notes fields comma-separated string of fields no * name createTime createUser content N/A The fields to be returned back for the label definition If fields parameter is set, uri, path and id are always returned regardless if they are specified or not When fields parameter is set, the response will contain an array of labels with the selected fields. If the fields parameter is not set, then an array of paths and an array of uris is returned instead. If fields value is set to "*", all the fields will be returned in the response. Response HTTP Status Situations 200 OK the retrieval of the labels succeeded or there are no labels associated with the recording 403 FORBIDDEN the recording for which the labels are requested can be found but cannot be retrieved for whatever reason(e.g., region not matched, requesting user cannot access the recording) the recording for which the labels are requested cannot be found Fields Subfields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the label was added to the requested recording successfully 13 (UnableToCreateResource) label failed to be added to the requested recording 18 (ResourceAlreadyExists) there already exists a label instance that is identical to the one to add on t he same recording statusMessage String no not specified a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. labels array of labels no Each label will have the fiel ds requested if fields parameter is received id String no the id of the created label if fields parameter is received path String no the path of the created label if fields parameter is received name String no the name of the label definition if fields parameter is received uri String no the uri of the label on the recording if fields parameter is received createTime String no The time when the label was last updated if fields parameter is received createUser String no The username of the user who last updated the label on the recording. if fields parameter is received content JSON object no JSON object containing custom content if populated if fields parameter is received The content is a JSON object that can contain custom data information. paths array of paths no The array of paths of label instances associated with t his recording if fields parameter is not present uris array of uris no The array of uris of label instances associated with t his recording if fields parameter is not present Example Get All Label Instances Of Recording Response Example GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels?fields=* 200 OK { "statusCode" : 0, "labels" : [ { "uri" : "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/"path" : "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-"name" : "comment" , "id" : "8c9a634f-343d-49b3-8322-b571be520b31" , "createTime" : "2017-04-22T12:42:46.000+0000" , "createUser" : "supervisor" , "content" : { "time" : "2017-04-22T12:42:44.000+0000" , "comment" : "This is an awesome comment!" } } ] } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df5/labels 200 OK { "statusCode" : 0, "paths" : [], "uris" : [] } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df4/labels 200 OK { "statusCode" : 0, "paths" : [ "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df4/labels/8c9a634f-343d-49b3-], "uris" : [ "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df4/labels/8c9a634f-] } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels 403 FORBIDDEN { "statusCode" : 12, "statusMessage" : "Recording cannot be found." } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels?fields=* 403 FORBIDDEN { "statusCode" : 12, "statusMessage" : "Recording cannot be accessed." } Getting a specific label from a Recording Method Path Required Roles GET /api/v2/recordings/<recid>/labels/<id> CC Admin Supervisor Agent Response HTTP Status Situations 200 OK the retrieval of the label succeeded 403 FORBIDDEN the recording for which the label is requested can be found but cannot be retrieved for whatever reason(e.g., region not matched, requesting user cannot access the recording) the recording for which the label is requested cannot be found 404 NOT FOUND the label cannot be found by the ID specified Fields Type Mandatory Possible Values Situations Notes statusCode Integer yes 0 (Ok) the retrieval of the label succeeded 6 (ResourceNotFound) the label cannot be found 12 (UnableToRetrieveResource) the retrieval of the label failed statusMessage String no not specified a message providing information The statusMessage will provide more information about a failure if statusCode is not 0. label JSON Object no the actual data of the label requested A label contains the following information: uri(string): the uri of the label path (string): the path of the label name (string): the name of the label type (string): the type of the label id (string): the id of the label createTime (string): the time the label was last created or updated createUser (string): the last user that created or updated the label content (a JSON object): an object containing custom data, if populated it will only be displayed if the re trieval of the labels succeeded. Example Get Label Instance Of Recording Response Example GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940da3/labels/1574da8d-ed8d-419d-b2e7-200 OK { "statusCode" : 0, "label" : { "uri" : "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940da3/labels/"path" : "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940da3/labels/1574da8d-"name" : "comment" , "id" : "1574da8d-ed8d-419d-b2e7-f00c1dabe0dc" , "createTime" : "2017-04-20T04:11:02.000+0000" , "createUser" : "supervisor" , "content" : {} } } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/1574da8d-ed8d-419d-b2e7-403 FORBIDDEN { "statusCode" : 12, "statusMessage" : "Recording cannot be found." } GET /api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/1574da8d-ed8d-419d-b2e7-404 NOT FOUND { "statusCode" : 6, "statusMessage" : "Label cannot be found for the recording." } Getting details of a recording including labels Add to the GetRecordings API (https://docs.genesys.com/Documentation/CR/DRAFT/API/GIR.). Add the following parameter in the Resource details table: Field Description labels A collection of labels associated with the recording. Each label will contain the following information: uri(string): the uri of the label path (string): the path of the label name (string): the name of the label type (string): the type of the label id (string): the id of the label createTime (string): the time the label was last created or updated createUser (string): the last user that created or updated the label content (a JSON object): an object containing custom data, if populated Querying Recordings with Labels Add to the GetRecordings API (https://docs.genesys.com/Documentation/CR/DRAFT/API/GIR.). Add the 2 parameters in the Parameters table: Parameter Value includeLabels Retrieves all recordings for any call that contain all of the labels in the comma-separated string of label names. The request string is a comma-separated list of label names For example: includeLabels=comment_good,rate_good excludeLabels Retrieves all recordings for any call that does not contain any of the labels in the comma-separated string of label names. The request string is a comma-separated list of label names For example: excludeLabels=comment_bad,bad Example Label Filter Query Parameter Example GET /api/v2/recordings?includeLabels=comment&subresources=* { ... "mediaFiles": [...], "eventHistory": [...], "labels": [ { "uri": "http://127.0.0.1/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/"path": "/api/v2/recordings/bf697521-3ffc-46f1-b840-f7230e940df3/labels/8c9a634f-343d-"name": "comment", "type": "Custom", "id": "8c9a634f-343d-49b3-8322-b571be520b31", "createTime": "2017-04-22T12:42:46.000+0000", "createUser": "supervisor", "content": { "time": "2016-04-22T12:42:44.000+0000", "text": "This is an awesome comment!" } } ], ... } Update the sample data example at https://docs.genesys.com/Documentation/CR/DRAFT/API/GIR. with the following: Sample Data { "id":"011AP643CSAPR4FKQGQE31TAES00029V", "callerPhoneNumber":"8522001", "dialedPhoneNumber":"+14160000001", "startTime":"2015-09-10T16:58:22.000+0000", "stopTime":"2015-09-10T16:58:34.000+0000", "mediaFiles":[ { "mediaUri":"http://htcc1.genesyslab.com/api/v2/recordings/011AP643CSAPR4FK QGQE31TAES00029V/play/4f82ee48-4fe4-40e1-961d-309ba6e38698.mp3", "mediaPath":"/recordings/011AP643CSAPR4FKQGQE31TAES00029V/play/4f82ee48-4f e4-40e1-961d-309ba6e38698.mp3", "playPath":"/recordings/011AP643CSAPR4FKQGQE31TAES00029V/play/4f82ee48-4fe 4-40e1-961d-309ba6e38698.mp3", "startTime":"2015-09-10T16:58:22.000+0000", "stopTime":"2015-09-10T16:58:34.000+0000", "callUUID":"011AP643CSAPR4FKQGQE31TAES00029V", "mediaId":"011AP643CSAPR4FKQGQE31TAES00029V_2015-09-10_16-58-22-006B015F-1 000427D-00000001.mp3", "type":"audio/mp3", "duration":"12523", "tenant":"Environment", "ivrprofile":"CallRecProfile", "size":"199296", "parameters":{ "dnis":"+14160000001", "connId":"006a0269722cd93f", "ani":"8522001", "dateTime":"2015-09-10T16:58:22Z", "rp.speechminer_uri":"http://135.225.52.210/interactionreceiver", "recordDN":"+14160000001", "agentId":"+14160000001", "rp.speechminer_auth":"rpSys:111111", "sipsAppName":"SIP_Server", "id":"011AP643CSAPR4FKQGQE31TAES00029V_2015-09-10_16-58-22", "username":"screen1@genesys.com", "callUuid":"011AP643CSAPR4FKQGQE31TAES00029V" }, "partitions":[ ], "accessgroups":[ "/" ] } ], "eventHistory":[ { "occurredAt":"2015-09-10T16:58:22.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "eventId":"2015-09-10 16:58:22.440_011AP643CSAPR4FKQGQE31TAES00029V", "event":"Data", "data":{ "added":{ "GSIP_RECORD":"ON", "GSIP_REC_FN":"011AP643CSAPR4FKQGQE31TAES00029V_2015-09-10_16-58-22" } } }, { "occurredAt":"2015-09-10T16:58:34.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "eventId":"2015-09-10 16:58:34.820_011AP643CSAPR4FKQGQE31TAES00029V", "event":"Data", "data":{ "deleted":{ "GSIP_RECORD":"ON" } } }, { "occurredAt":"2015-09-10T16:58:22.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "contact":{ "type":"User", "phoneNumber":"+14160000001", "userName":"screen1@genesys.com", "firstName":"Screen", "lastName":"GIR" }, "event":"Joined" }, { "occurredAt":"2015-09-10T16:58:21.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "contact":{ "type":"External", "phoneNumber":"8522001" }, "event":"Joined" }, { "occurredAt":"2015-09-10T16:58:34.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "contact":{ "type":"User", "phoneNumber":"+14160000001", "userName":"screen1@genesys.com", "firstName":"Screen", "lastName":"GIR" }, "event":"Left" }, { "occurredAt":"2015-09-10T16:58:34.000+0000", "calluuid":"011AP643CSAPR4FKQGQE31TAES00029V", "contact":{ "type":"External", "phoneNumber":"8522001" }, "event":"Left" } ], "labels": [ { "id": "646943bc-b9d2-48e7-9304-d9b4c92be2d2", "name": "Important", "createTime": "2017-01-01T00:00:00.000+0000", "createUser": "Agent1" } ], "callType":"Inbound", "region":"region1" } Non-Deletion Create a new section titled Recording Non-Deletion APIs at this page: https://docs.genesys.com/Documentation/CR/DRAFT/API/GIR Add a new API definition to Interaction Recording Web Services API: Non-Deletion Label API - Use this API to tag and untag recordings for non-deletion. Create a new page titled Non-Deletion API which will be under the Interaction Recording Web Services API on the left nav bar to document Non-Deletion APIs described below.. Put at the beginning of new page Non-Deletion API, right after the Pre-requisites. Recordings can be tagged for non-deletion. This affects Media Life Cycle Management purge tasks where the voice and associated screen recordings which are tagged for non-deletion will be excluded from the purge tasks. The SpeechMiner UI users will also not be able to delete recordings which have been tagged for non-deletion. To enable the deletion of the recordings, you will need to remove the non-deletion tag from the recordings. Note: For voice recordings which have associated screen recordings, tagging or untagging the voice recording for non-deletion will also tag/untag the associated screen recordings. Permissions Add a section here: https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions, titled "Configuring permissions for Recording Labels". Configuring permissions for Non-Deletion 1. 2. 1. 2. 3. 4. Recordings can be tagged for non-deletion after reviewing. The recording permissions are configured using Genesys Administrator Extension, in the Configuration Manager view, the IRWS_Cluster (or WS_Cluster where applicable) application object, Agent Group object (if applicable) or the Person object. To enable recording permissions, do the following: Non-Deletion operations on a Recording Add a new recording settings group to the Annex/Application options group for the IRWS_Cluster (or WS_Cluster where applicable) application object, or update the existing recording group. For details, refer to Genesys Administrator Extension User Guide > Configuration Manager and https://docs.genesys.com/Documentation/CR/DRAFT/Solution/IRWSInstall. Configure one or all of the following options in the recording settings as follows [recording] RECORDING_PERMISSION_APPLY_NON_DELETE = true RECORDING_PERMISSION_UNAPPLY_NON_DELETE = true The options settings are applied in the following order: Default settings that are defined in the application code, which are overridden by: Settings that are specified in the Application, which are overridden by: Settings that are specified in the Agent Group(s) to which an agent belongs, which are overridden by: Settings that are specified in the Person object that corresponds to the agent. The following permissions are required to allow users of type supervisor or agent to be able to access and use the different non-deletion operations. Permission Description Applies to Checks against RECORDING_PERMISSION_APPLY_NON_DELETE Permission to set a recording to not be deleted Supervisor Agent RECORDING_PERMISSION_UNAPPLY_NON_DELETE Permission to remove non delete from a recording Supervisor Agent Method Path Required Roles Required Recording Permissions POST /api/v2/recordings/<recid> CC Admin N/A Supervisor Agent RECORDING_PERMISSION_APPLY_NON_DELETE Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions Payload Attributes 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 recor dings at the time of the operation will also be updated. Apply Non-Deletion to a Recording Mark voice recording for non-deletion

  1. Mark voice recording d15a8bee-a720-4def-9674-0767e6fde196 and its screen recordings(if any) for

non-deletion POST /api/v2/recordings/d15a8bee-a720-4def-9674-0767e6fde196 { "operationName" : "applyNonDelete" } Response HTTP Status Status Codes Situations Notes 200 OK the recording(s) has been marked for non-deletion successfully. 400 BAD REQUEST if the operationName does not match any of the possible values described above. 403 FORBIDDEN if the requesting user does not have the roles required; if the requesting user does not have the recording permissions required. 404 NOT FOUND if the recording for which to mark non-deletion cannot be found; 500 INTERNAL SERVER ERROR If internal error occurs. Payload Attributes JSON Data Type Mandatory Possible Values Default Value Situations Notes statusCode Integer yes 0 (Ok) N/A the recording has been marked for non-deletion. 2 (InvalidRequestParameter) if the operationName does not match the above-mentioned operations 3 (OperationForbidden) if the requesting user does not have the recording permissions required. 4 (InternalError) If internal error occurs. 5 (Unauthorized) If the requesting user does not have the roles required. 6 (ResourceNotFound) If the recording for which to mark non-deletion cannot be found. statusMessage String no not specified; a message providing information N/A The statusMessage will provide more information about a failure if statusCode is not 0. Response when one recording is requested 200 OK { "statusCode" : 0 } 400 BAD REQUEST { "statusCode" : 2, "statusMessage" : "Parameter 'operationName' is invalid: The specified value is not within valid range" } 403 FORBIDDEN { "statusCode" : 5, "statusMessage" : "Insufficient user roles." } 403 FORBIDDEN { "statusCode" : 3, "statusMessage" : "Insufficient recording permissions." } 404 NOT FOUND { "statusCode" : 6, "statusMessage" : "Requested recording [f2197c79-3304-4427-9e73-48a5a8903484] cannot be found." } 500 INTERNAL SERVER ERROR { "statusCode" : 4, "statusMessage" : "Internal server error - please contact administrator." } Marking a Call Recording Marking a call recording for non-deletion will also mark its associated screen recordings as well. Either all the call and screen recordings or none of them are marked for non-delete after the operation. Un-Apply Non-Deletion to a Recording Unmark a Single Recording From Non-Deletion Request Method Path Required Roles Required Recording Permissions POST /api/v2/recordings/<recid> CC Admin N/A Supervisor Agent RECORDING_PERMISSION_UNAPPLY_NON_DELETE Create a link to https://docs.genesys.com/Documentation/CR/DRAFT/Solution/Permissions Payload Attributes JSON Data Type Mandatory Possible Values Default Value Description Notes operationName String yes unapplyNonDelete N/A Unmark a recording for non-deletion for a voice recording, all the associated screen recordin gs at the time of the operation will also be updated. Unmark voice recording for non-deletion

  1. Unmark voice recording d15a8bee-a720-4def-9674-0767e6fde196 and its screen recordings(if any) for

non-deletion POST /api/v2/recordings/d15a8bee-a720-4def-9674-0767e6fde196 { "operationName" : "unapplyNonDelete" } Response HTTP Status Status Codes Situations Notes 200 OK the recording(s) has been unmarked for non-deletion successfully. 400 BAD REQUEST the operationName does not match any of the possible values described above. 403 FORBIDDEN the requesting user does not have the roles required; the requesting user does not have the recording permissions required. 404 NOT FOUND the recording for which to unmark non-deletion cannot be found. 500 INTERNAL SERVER ERROR An internal error occurs. Payload Attributes JSON Data Type Mandatory Possible Values Default Value Situations Notes statusCode Integer yes 0 (Ok) N/A the recording has been unmarked for non-deletion. 2 (InvalidRequestParameter) If the operationName does not match any of the possible values described above. 3 (OperationForbidden) If the requesting user does not have the recording permissions required. 4 (InternalError) If internal error occurs. 5 (Unauthorized) If the requesting user does not have the roles required. 6 (ResourceNotFound) If the recording for which to unmark non-deletion cannot be found. statusMessage String no not specified; a message providing information N/A The statusMessage will provide more information about a failure if statusCode is not 0. Response when one recording is requested 200 OK { "statusCode" : 0 } 400 BAD REQUEST { "statusCode" : 2, "statusMessage" : "Parameter 'operationName' is invalid: The specified value is not within valid range" } 403 FORBIDDEN { "statusCode" : 5, "statusMessage" : "Insufficient user roles." } 403 FORBIDDEN { "statusCode" : 3, "statusMessage" : "Insufficient recording permissions." } 404 NOT FOUND { "statusCode" : 6, "statusMessage" : "Requested recording [f2197c79-3304-4427-9e73-48a5a8903484] cannot be found." } 500 INTERNAL SERVER ERROR { "statusCode" : 4, "statusMessage" : "Internal server error - please contact administrator." } Apply Non-Deletion to multiple Recordings (TODO - content to be provided by Garry Yuan ) Un-Apply Non-Deletion to multiple Recordings (TODO - content to be provided by Garry Yuan)

Comments or questions about this documentation? Contact us for support!