From e773e3a9bbaf378d53647e4bac3ffcd61afb4ae6 Mon Sep 17 00:00:00 2001 From: Matt Jordan Date: Wed, 18 May 2016 06:19:58 -0500 Subject: ARI: Add the ability to download the media associated with a stored recording This patch adds a new feature to ARI that allows a client to download the media associated with a stored recording. The new route is /recordings/stored/{name}/file, and transmits the underlying binary file using Asterisk's HTTP server's underlying file transfer facilities. Because this REST route returns non-JSON, a few small enhancements had to be made to the Python Swagger generation code, as well as the mustache templates that generate the ARI bindings. ASTERISK-26042 #close Change-Id: I49ec5c4afdec30bb665d9c977ab423b5387e0181 --- rest-api/api-docs/recordings.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'rest-api/api-docs/recordings.json') diff --git a/rest-api/api-docs/recordings.json b/rest-api/api-docs/recordings.json index 51f0a21f4..d173ac98e 100644 --- a/rest-api/api-docs/recordings.json +++ b/rest-api/api-docs/recordings.json @@ -69,6 +69,38 @@ } ] }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, { "path": "/recordings/stored/{recordingName}/copy", "description": "Copy an individual recording", -- cgit v1.2.3