purecloud-platform-client-v2
Version:
A JavaScript library to interface with the PureCloud Platform API
1,573 lines (1,444 loc) • 50.7 kB
JavaScript
import ApiClient from '../ApiClient.js';
class RecordingApi {
/**
* Recording service.
* @module purecloud-platform-client-v2/api/RecordingApi
* @version 223.0.0
*/
/**
* Constructs a new RecordingApi.
* @alias module:purecloud-platform-client-v2/api/RecordingApi
* @class
* @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
* default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Delete annotation
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {String} annotationId Annotation ID
*/
deleteConversationRecordingAnnotation(conversationId, recordingId, annotationId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling deleteConversationRecordingAnnotation';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling deleteConversationRecordingAnnotation';
}
// verify the required parameter 'annotationId' is set
if (annotationId === undefined || annotationId === null) {
throw 'Missing the required parameter "annotationId" when calling deleteConversationRecordingAnnotation';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}',
'DELETE',
{ 'conversationId': conversationId,'recordingId': recordingId,'annotationId': annotationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a single orphan recording
*
* @param {String} orphanId Orphan ID
*/
deleteOrphanrecording(orphanId) {
// verify the required parameter 'orphanId' is set
if (orphanId === undefined || orphanId === null) {
throw 'Missing the required parameter "orphanId" when calling deleteOrphanrecording';
}
return this.apiClient.callApi(
'/api/v2/orphanrecordings/{orphanId}',
'DELETE',
{ 'orphanId': orphanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete media retention policies
* Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param.
* @param {String} ids
*/
deleteRecordingCrossplatformMediaretentionpolicies(ids) {
// verify the required parameter 'ids' is set
if (ids === undefined || ids === null) {
throw 'Missing the required parameter "ids" when calling deleteRecordingCrossplatformMediaretentionpolicies';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies',
'DELETE',
{ },
{ 'ids': ids },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a media retention policy
*
* @param {String} policyId Policy ID
*/
deleteRecordingCrossplatformMediaretentionpolicy(policyId) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling deleteRecordingCrossplatformMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies/{policyId}',
'DELETE',
{ 'policyId': policyId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete the recording bulk job
*
* @param {String} jobId jobId
*/
deleteRecordingJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling deleteRecordingJob';
}
return this.apiClient.callApi(
'/api/v2/recording/jobs/{jobId}',
'DELETE',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete media retention policies
* Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param.
* @param {String} ids
*/
deleteRecordingMediaretentionpolicies(ids) {
// verify the required parameter 'ids' is set
if (ids === undefined || ids === null) {
throw 'Missing the required parameter "ids" when calling deleteRecordingMediaretentionpolicies';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies',
'DELETE',
{ },
{ 'ids': ids },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a media retention policy
*
* @param {String} policyId Policy ID
*/
deleteRecordingMediaretentionpolicy(policyId) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling deleteRecordingMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies/{policyId}',
'DELETE',
{ 'policyId': policyId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets a specific recording.
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {Object} opts Optional parameters
* @param {Object} opts.formatId The desired media format. Valid values:WAV,WEBM,WAV_ULAW,OGG_VORBIS,OGG_OPUS,MP3,NONE (default to WEBM)
* @param {Object} opts.emailFormatId The desired media format when downloading an email recording. Valid values:EML,NONE (default to EML)
* @param {Object} opts.chatFormatId The desired media format when downloading a chat recording. Valid values:ZIP,NONE (default to ZIP)
* @param {Object} opts.messageFormatId The desired media format when downloading a message recording. Valid values:ZIP,NONE (default to ZIP)
* @param {Object} opts.download requesting a download format of the recording. Valid values:true,false (default to false)
* @param {String} opts.fileName the name of the downloaded fileName
* @param {String} opts.locale The locale for the requested file when downloading or for redacting sensitive information in requested files, as an ISO 639-1 code
* @param {Array.<String>} opts.mediaFormats All acceptable media formats. Overrides formatId. Valid values:WAV,WEBM,WAV_ULAW,OGG_VORBIS,OGG_OPUS,MP3
*/
getConversationRecording(conversationId, recordingId, opts) {
opts = opts || {};
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecording';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling getConversationRecording';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}',
'GET',
{ 'conversationId': conversationId,'recordingId': recordingId },
{ 'formatId': opts['formatId'],'emailFormatId': opts['emailFormatId'],'chatFormatId': opts['chatFormatId'],'messageFormatId': opts['messageFormatId'],'download': opts['download'],'fileName': opts['fileName'],'locale': opts['locale'],'mediaFormats': this.apiClient.buildCollectionParam(opts['mediaFormats'], 'multi') },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get annotation
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {String} annotationId Annotation ID
*/
getConversationRecordingAnnotation(conversationId, recordingId, annotationId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecordingAnnotation';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling getConversationRecordingAnnotation';
}
// verify the required parameter 'annotationId' is set
if (annotationId === undefined || annotationId === null) {
throw 'Missing the required parameter "annotationId" when calling getConversationRecordingAnnotation';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}',
'GET',
{ 'conversationId': conversationId,'recordingId': recordingId,'annotationId': annotationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get annotations for recording
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
*/
getConversationRecordingAnnotations(conversationId, recordingId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecordingAnnotations';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling getConversationRecordingAnnotations';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations',
'GET',
{ 'conversationId': conversationId,'recordingId': recordingId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get recording metadata for a conversation. Does not return playable media nor system annotations. Bookmark annotations will be excluded if either recording:recording:view or recording:annotation:view permission is missing.
*
* @param {String} conversationId Conversation ID
*/
getConversationRecordingmetadata(conversationId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecordingmetadata';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordingmetadata',
'GET',
{ 'conversationId': conversationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get metadata for a specific recording. Does not return playable media.
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
*/
getConversationRecordingmetadataRecordingId(conversationId, recordingId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecordingmetadataRecordingId';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling getConversationRecordingmetadataRecordingId';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordingmetadata/{recordingId}',
'GET',
{ 'conversationId': conversationId,'recordingId': recordingId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get all of a Conversation's Recordings.
*
* @param {String} conversationId Conversation ID
* @param {Object} opts Optional parameters
* @param {Number} opts.maxWaitMs The maximum number of milliseconds to wait for the recording to be ready. Must be a positive value. (default to 5000)
* @param {Object} opts.formatId The desired media format. Valid values:WAV,WEBM,WAV_ULAW,OGG_VORBIS,OGG_OPUS,MP3,NONE. (default to WEBM)
* @param {Array.<String>} opts.mediaFormats All acceptable media formats. Overrides formatId. Valid values:WAV,WEBM,WAV_ULAW,OGG_VORBIS,OGG_OPUS,MP3.
* @param {String} opts.locale The locale used for redacting sensitive information in requested files, as an ISO 639-1 code
* @param {Boolean} opts.includePauseAnnotationsForScreenRecordings Include applicable Secure Pause annotations from all audio recordings to all screen recordings (default to false)
*/
getConversationRecordings(conversationId, opts) {
opts = opts || {};
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getConversationRecordings';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings',
'GET',
{ 'conversationId': conversationId },
{ 'maxWaitMs': opts['maxWaitMs'],'formatId': opts['formatId'],'mediaFormats': this.apiClient.buildCollectionParam(opts['mediaFormats'], 'multi'),'locale': opts['locale'],'includePauseAnnotationsForScreenRecordings': opts['includePauseAnnotationsForScreenRecordings'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets a single orphan recording
*
* @param {String} orphanId Orphan ID
*/
getOrphanrecording(orphanId) {
// verify the required parameter 'orphanId' is set
if (orphanId === undefined || orphanId === null) {
throw 'Missing the required parameter "orphanId" when calling getOrphanrecording';
}
return this.apiClient.callApi(
'/api/v2/orphanrecordings/{orphanId}',
'GET',
{ 'orphanId': orphanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets the media of a single orphan recording
* A 202 response means the orphaned media is currently transcoding and will be available shortly.A 200 response denotes the transcoded orphan media is available now and is contained in the response body.
* @param {String} orphanId Orphan ID
* @param {Object} opts Optional parameters
* @param {Object} opts.formatId The desired media format. (default to WEBM)
* @param {Object} opts.emailFormatId The desired media format when downloading an email recording. (default to EML)
* @param {Object} opts.chatFormatId The desired media format when downloading a chat recording. (default to ZIP)
* @param {Object} opts.messageFormatId The desired media format when downloading a message recording. (default to ZIP)
* @param {Object} opts.download requesting a download format of the recording (default to false)
* @param {String} opts.fileName the name of the downloaded fileName
* @param {String} opts.locale The locale for the requested file when downloading, as an ISO 639-1 code
* @param {Array.<String>} opts.mediaFormats All acceptable media formats. Overrides formatId. Valid values:WAV,WEBM,WAV_ULAW,OGG_VORBIS,OGG_OPUS,MP3
*/
getOrphanrecordingMedia(orphanId, opts) {
opts = opts || {};
// verify the required parameter 'orphanId' is set
if (orphanId === undefined || orphanId === null) {
throw 'Missing the required parameter "orphanId" when calling getOrphanrecordingMedia';
}
return this.apiClient.callApi(
'/api/v2/orphanrecordings/{orphanId}/media',
'GET',
{ 'orphanId': orphanId },
{ 'formatId': opts['formatId'],'emailFormatId': opts['emailFormatId'],'chatFormatId': opts['chatFormatId'],'messageFormatId': opts['messageFormatId'],'download': opts['download'],'fileName': opts['fileName'],'locale': opts['locale'],'mediaFormats': this.apiClient.buildCollectionParam(opts['mediaFormats'], 'multi') },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets all orphan recordings
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {Boolean} opts.hasConversation Filter resulting orphans by whether the conversation is known. False returns all orphans for the organization. (default to false)
* @param {Object} opts.media Filter resulting orphans based on their media type
*/
getOrphanrecordings(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/orphanrecordings',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'hasConversation': opts['hasConversation'],'media': opts['media'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status and results for a batch request job, only the user that submitted the job may retrieve results. Each result may contain either a URL to a recording or an error; additionally, a recording could be associated with multiple results.
*
* @param {String} jobId jobId
*/
getRecordingBatchrequest(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getRecordingBatchrequest';
}
return this.apiClient.callApi(
'/api/v2/recording/batchrequests/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets media retention policy list with query options to filter on name and enabled.
* for a less verbose response, add summary=true to this endpoint
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {String} opts.name the policy name - used for filtering results in searches.
* @param {Boolean} opts.enabled checks to see if policy is enabled - use enabled = true or enabled = false
* @param {Boolean} opts.summary provides a less verbose response of policy lists. (default to false)
* @param {Boolean} opts.hasErrors provides a way to fetch all policies with errors or policies that do not have errors
* @param {Number} opts.deleteDaysThreshold provides a way to fetch all policies with any actions having deleteDays exceeding the provided value
*/
getRecordingCrossplatformMediaretentionpolicies(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'name': opts['name'],'enabled': opts['enabled'],'summary': opts['summary'],'hasErrors': opts['hasErrors'],'deleteDaysThreshold': opts['deleteDaysThreshold'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a media retention policy
*
* @param {String} policyId Policy ID
*/
getRecordingCrossplatformMediaretentionpolicy(policyId) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling getRecordingCrossplatformMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies/{policyId}',
'GET',
{ 'policyId': policyId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status of the job associated with the job id.
*
* @param {String} jobId jobId
*/
getRecordingJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getRecordingJob';
}
return this.apiClient.callApi(
'/api/v2/recording/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get IDs of recordings that the bulk job failed for
*
* @param {String} jobId jobId
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize Page size. Maximum is 100. (default to 25)
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Boolean} opts.includeTotal If false, cursor will be used to locate the page instead of pageNumber. It is recommended to set it to false for improved performance.
* @param {String} opts.cursor Indicates where to resume query results (not required for first page)
*/
getRecordingJobFailedrecordings(jobId, opts) {
opts = opts || {};
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getRecordingJobFailedrecordings';
}
return this.apiClient.callApi(
'/api/v2/recording/jobs/{jobId}/failedrecordings',
'GET',
{ 'jobId': jobId },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'includeTotal': opts['includeTotal'],'cursor': opts['cursor'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status of all jobs within the user's organization
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize Page size (default to 25)
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Object} opts.sortBy Sort by (default to userId)
* @param {Object} opts.state Filter by state
* @param {Boolean} opts.showOnlyMyJobs Show only my jobs
* @param {Object} opts.jobType Job Type (Can be left empty for both)
* @param {Boolean} opts.includeTotal If false, cursor will be used to locate the page instead of pageNumber. It is recommended to set it to false for improved performance.
* @param {String} opts.cursor Indicates where to resume query results (not required for first page)
*/
getRecordingJobs(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/recording/jobs',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'state': opts['state'],'showOnlyMyJobs': opts['showOnlyMyJobs'],'jobType': opts['jobType'],'includeTotal': opts['includeTotal'],'cursor': opts['cursor'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the encryption key configurations
*
* @param {String} keyConfigurationId Key Configurations Id
*/
getRecordingKeyconfiguration(keyConfigurationId) {
// verify the required parameter 'keyConfigurationId' is set
if (keyConfigurationId === undefined || keyConfigurationId === null) {
throw 'Missing the required parameter "keyConfigurationId" when calling getRecordingKeyconfiguration';
}
return this.apiClient.callApi(
'/api/v2/recording/keyconfigurations/{keyConfigurationId}',
'GET',
{ 'keyConfigurationId': keyConfigurationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of key configurations data
*
*/
getRecordingKeyconfigurations() {
return this.apiClient.callApi(
'/api/v2/recording/keyconfigurations',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets media retention policy list with query options to filter on name and enabled.
* for a less verbose response, add summary=true to this endpoint
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {String} opts.name the policy name - used for filtering results in searches.
* @param {Boolean} opts.enabled checks to see if policy is enabled - use enabled = true or enabled = false
* @param {Boolean} opts.summary provides a less verbose response of policy lists. (default to false)
* @param {Boolean} opts.hasErrors provides a way to fetch all policies with errors or policies that do not have errors
* @param {Number} opts.deleteDaysThreshold provides a way to fetch all policies with any actions having deleteDays exceeding the provided value
*/
getRecordingMediaretentionpolicies(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'name': opts['name'],'enabled': opts['enabled'],'summary': opts['summary'],'hasErrors': opts['hasErrors'],'deleteDaysThreshold': opts['deleteDaysThreshold'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a media retention policy
*
* @param {String} policyId Policy ID
*/
getRecordingMediaretentionpolicy(policyId) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling getRecordingMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies/{policyId}',
'GET',
{ 'policyId': policyId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get encryption key list
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize Page size (default to 25)
* @param {Number} opts.pageNumber Page number (default to 1)
*/
getRecordingRecordingkeys(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/recording/recordingkeys',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get key rotation schedule
*
*/
getRecordingRecordingkeysRotationschedule() {
return this.apiClient.callApi(
'/api/v2/recording/recordingkeys/rotationschedule',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the Recording Settings for the Organization
*
* @param {Object} opts Optional parameters
* @param {Boolean} opts.createDefault If no settings are found, a new one is created with default values (default to false)
*/
getRecordingSettings(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/recording/settings',
'GET',
{ },
{ 'createDefault': opts['createDefault'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status of a recording upload status report
*
* @param {String} reportId reportId
*/
getRecordingUploadsReport(reportId) {
// verify the required parameter 'reportId' is set
if (reportId === undefined || reportId === null) {
throw 'Missing the required parameter "reportId" when calling getRecordingUploadsReport';
}
return this.apiClient.callApi(
'/api/v2/recording/uploads/reports/{reportId}',
'GET',
{ 'reportId': reportId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query for recording retention data
*
* @param {Number} retentionThresholdDays Fetch retention data for recordings retained for more days than the provided value.
* @param {Object} opts Optional parameters
* @param {String} opts.cursor Indicates where to resume query results (not required for first page)
* @param {Number} opts.pageSize Page size. Maximum is 500. (default to 25)
*/
getRecordingsRetentionQuery(retentionThresholdDays, opts) {
opts = opts || {};
// verify the required parameter 'retentionThresholdDays' is set
if (retentionThresholdDays === undefined || retentionThresholdDays === null) {
throw 'Missing the required parameter "retentionThresholdDays" when calling getRecordingsRetentionQuery';
}
return this.apiClient.callApi(
'/api/v2/recordings/retention/query',
'GET',
{ },
{ 'retentionThresholdDays': retentionThresholdDays,'cursor': opts['cursor'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves an object containing the total number of concurrent active screen recordings
*
*/
getRecordingsScreensessionsDetails() {
return this.apiClient.callApi(
'/api/v2/recordings/screensessions/details',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Patch a media retention policy
*
* @param {String} policyId Policy ID
* @param {Object} body Policy
*/
patchRecordingCrossplatformMediaretentionpolicy(policyId, body) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling patchRecordingCrossplatformMediaretentionpolicy';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling patchRecordingCrossplatformMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies/{policyId}',
'PATCH',
{ 'policyId': policyId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Patch a media retention policy
*
* @param {String} policyId Policy ID
* @param {Object} body Policy
*/
patchRecordingMediaretentionpolicy(policyId, body) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling patchRecordingMediaretentionpolicy';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling patchRecordingMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies/{policyId}',
'PATCH',
{ 'policyId': policyId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Create annotation
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {Object} body annotation
*/
postConversationRecordingAnnotations(conversationId, recordingId, body) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling postConversationRecordingAnnotations';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling postConversationRecordingAnnotations';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postConversationRecordingAnnotations';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations',
'POST',
{ 'conversationId': conversationId,'recordingId': recordingId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Submit a batch download request for recordings. Recordings in response will be in their original format/codec - configured in the Trunk configuration.
*
* @param {Object} body Job submission criteria
*/
postRecordingBatchrequests(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingBatchrequests';
}
return this.apiClient.callApi(
'/api/v2/recording/batchrequests',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Create media retention policy
* Policy does not work retroactively
* @param {Object} body Policy
*/
postRecordingCrossplatformMediaretentionpolicies(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingCrossplatformMediaretentionpolicies';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Create a recording bulk job.
* Each organization can run up to a maximum of two concurrent jobs that are either in pending or processing state. Furthermore, the recording:recording:viewSensitiveData permission is required to access recordings with PCI DSS and/or PII data when redaction is enabled for their organization. If the requester does not have that permission and includeRecordingsWithSensitiveData is set to true, then their request will be rejected.
* @param {Object} body query
*/
postRecordingJobs(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingJobs';
}
return this.apiClient.callApi(
'/api/v2/recording/jobs',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Setup configurations for encryption key creation
*
* @param {Object} body Encryption Configuration
*/
postRecordingKeyconfigurations(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingKeyconfigurations';
}
return this.apiClient.callApi(
'/api/v2/recording/keyconfigurations',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Validate encryption key configurations without saving it
*
* @param {Object} body Encryption Configuration
*/
postRecordingKeyconfigurationsValidate(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingKeyconfigurationsValidate';
}
return this.apiClient.callApi(
'/api/v2/recording/keyconfigurations/validate',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* create a local key management recording key
*
* @param {Object} body Local Encryption body
*/
postRecordingLocalkeys(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingLocalkeys';
}
return this.apiClient.callApi(
'/api/v2/recording/localkeys',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Create media retention policy
* Policy does not work retroactively
* @param {Object} body Policy
*/
postRecordingMediaretentionpolicies(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingMediaretentionpolicies';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Create encryption key
*
*/
postRecordingRecordingkeys() {
return this.apiClient.callApi(
'/api/v2/recording/recordingkeys',
'POST',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Creates a recording upload status report
*
* @param {Object} body Report parameters
*/
postRecordingUploadsReports(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingUploadsReports';
}
return this.apiClient.callApi(
'/api/v2/recording/uploads/reports',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of conversations with protected recordings
*
* @param {Object} body conversationIds
*/
postRecordingsDeletionprotection(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingsDeletionprotection';
}
return this.apiClient.callApi(
'/api/v2/recordings/deletionprotection',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Acknowledge a screen recording.
*
* @param {Object} body AcknowledgeScreenRecordingRequest
*/
postRecordingsScreensessionsAcknowledge(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingsScreensessionsAcknowledge';
}
return this.apiClient.callApi(
'/api/v2/recordings/screensessions/acknowledge',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Provide meta-data a screen recording.
*
* @param {Object} body ScreenRecordingMetaDataRequest
*/
postRecordingsScreensessionsMetadata(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling postRecordingsScreensessionsMetadata';
}
return this.apiClient.callApi(
'/api/v2/recordings/screensessions/metadata',
'POST',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Updates the retention records on a recording.
* Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. The recording:recording:view permission is required for the recording, as well as either the recording:recording:editRetention or recording:screenRecording:editRetention permissions depending on the type of recording.
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {Object} body recording
* @param {Object} opts Optional parameters
* @param {Boolean} opts.clearExport Whether to clear the pending export for the recording
*/
putConversationRecording(conversationId, recordingId, body, opts) {
opts = opts || {};
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling putConversationRecording';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling putConversationRecording';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putConversationRecording';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}',
'PUT',
{ 'conversationId': conversationId,'recordingId': recordingId },
{ 'clearExport': opts['clearExport'] },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update annotation
*
* @param {String} conversationId Conversation ID
* @param {String} recordingId Recording ID
* @param {String} annotationId Annotation ID
* @param {Object} body annotation
*/
putConversationRecordingAnnotation(conversationId, recordingId, annotationId, body) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling putConversationRecordingAnnotation';
}
// verify the required parameter 'recordingId' is set
if (recordingId === undefined || recordingId === null) {
throw 'Missing the required parameter "recordingId" when calling putConversationRecordingAnnotation';
}
// verify the required parameter 'annotationId' is set
if (annotationId === undefined || annotationId === null) {
throw 'Missing the required parameter "annotationId" when calling putConversationRecordingAnnotation';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putConversationRecordingAnnotation';
}
return this.apiClient.callApi(
'/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}',
'PUT',
{ 'conversationId': conversationId,'recordingId': recordingId,'annotationId': annotationId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Updates an orphan recording to a regular recording with retention values
* If this operation is successful the orphan will no longer exist. It will be replaced by the resulting recording in the response. This replacement recording is accessible by the normal Recording api.
* @param {String} orphanId Orphan ID
* @param {Object} opts Optional parameters
* @param {Object} opts.body
*/
putOrphanrecording(orphanId, opts) {
opts = opts || {};
// verify the required parameter 'orphanId' is set
if (orphanId === undefined || orphanId === null) {
throw 'Missing the required parameter "orphanId" when calling putOrphanrecording';
}
return this.apiClient.callApi(
'/api/v2/orphanrecordings/{orphanId}',
'PUT',
{ 'orphanId': orphanId },
{ },
{ },
{ },
opts['body'],
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update a media retention policy
* Policy does not work retroactively
* @param {String} policyId Policy ID
* @param {Object} body Policy
*/
putRecordingCrossplatformMediaretentionpolicy(policyId, body) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling putRecordingCrossplatformMediaretentionpolicy';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingCrossplatformMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/crossplatform/mediaretentionpolicies/{policyId}',
'PUT',
{ 'policyId': policyId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Execute the recording bulk job.
* A job must be executed by the same user whom originally created the job. In addition, the user must have permission to update the recordings retention.
* @param {String} jobId jobId
* @param {Object} body query
*/
putRecordingJob(jobId, body) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling putRecordingJob';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingJob';
}
return this.apiClient.callApi(
'/api/v2/recording/jobs/{jobId}',
'PUT',
{ 'jobId': jobId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update the encryption key configurations
*
* @param {String} keyConfigurationId Key Configurations Id
* @param {Object} body Encryption key configuration metadata
*/
putRecordingKeyconfiguration(keyConfigurationId, body) {
// verify the required parameter 'keyConfigurationId' is set
if (keyConfigurationId === undefined || keyConfigurationId === null) {
throw 'Missing the required parameter "keyConfigurationId" when calling putRecordingKeyconfiguration';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingKeyconfiguration';
}
return this.apiClient.callApi(
'/api/v2/recording/keyconfigurations/{keyConfigurationId}',
'PUT',
{ 'keyConfigurationId': keyConfigurationId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update a media retention policy
* Policy does not work retroactively
* @param {String} policyId Policy ID
* @param {Object} body Policy
*/
putRecordingMediaretentionpolicy(policyId, body) {
// verify the required parameter 'policyId' is set
if (policyId === undefined || policyId === null) {
throw 'Missing the required parameter "policyId" when calling putRecordingMediaretentionpolicy';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingMediaretentionpolicy';
}
return this.apiClient.callApi(
'/api/v2/recording/mediaretentionpolicies/{policyId}',
'PUT',
{ 'policyId': policyId },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update key rotation schedule
*
* @param {Object} body KeyRotationSchedule
*/
putRecordingRecordingkeysRotationschedule(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingRecordingkeysRotationschedule';
}
return this.apiClient.callApi(
'/api/v2/recording/recordingkeys/rotationschedule',
'PUT',
{ },
{ },
{ },
{ },
body,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Update the Recording Settings for the Organization
*
* @param {Object} body Recording settings
*/
putRecordingSettings(body) {
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling putRecordingSettings';
}
return this.apiClient.callApi(
'/api/v2/recording/settings',
'PUT',
{ },
{ },
{