From b299052e203807c9a2111eb2cd919246d7589cb3 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Fri, 18 Jul 2014 21:48:46 +0000 Subject: ari: Add a copy operation for stored recordings This patch adds a new operation for stored recordings, copy. It takes an existing stored recording and makes a copy of it in the same directory or a relative directory under the stored recording directory. /ari/recordings/stored/{recordingName}/copy?destinationRecordingName={copy_name} This is particularly useful for voicemail-esque applications, which may need to copy or move recordings around a directory structure. Review: https://reviewboard.asterisk.org/r/3768/ ASTERISK-24036 #close Reported by: Sam Galarneau Tested by: Sam Galarneau ........ Merged revisions 419021 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419022 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rest-api/api-docs/recordings.json | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'rest-api') diff --git a/rest-api/api-docs/recordings.json b/rest-api/api-docs/recordings.json index 1f825a2b0..54daa33cf 100644 --- a/rest-api/api-docs/recordings.json +++ b/rest-api/api-docs/recordings.json @@ -69,6 +69,46 @@ } ] }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, { "path": "/recordings/live/{recordingName}", "description": "A recording that is in progress", -- cgit v1.2.3