manager/ARI: Update version to 2.4.0/1.4.0; Update UPGRADE.txt
[asterisk/asterisk.git] / rest-api / api-docs / recordings.json
index b564ede..1f825a2 100644 (file)
@@ -2,7 +2,7 @@
        "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
        "_author": "David M. Lee, II <dlee@digium.com>",
        "_svn_revision": "$Revision$",
-       "apiVersion": "0.0.1",
+       "apiVersion": "1.4.0",
        "swaggerVersion": "1.1",
        "basePath": "http://localhost:8088/stasis",
        "resourcePath": "/api-docs/recordings.{format}",
@@ -14,7 +14,7 @@
                                {
                                        "httpMethod": "GET",
                                        "summary": "List recordings that are complete.",
-                                       "nickname": "getStoredRecordings",
+                                       "nickname": "listStored",
                                        "responseClass": "List[StoredRecording]"
                                }
                        ]
@@ -26,7 +26,7 @@
                                {
                                        "httpMethod": "GET",
                                        "summary": "Get a stored recording's details.",
-                                       "nickname": "getStoredRecording",
+                                       "nickname": "getStored",
                                        "responseClass": "StoredRecording",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               }
                                        ]
                                },
                                {
                                        "httpMethod": "DELETE",
                                        "summary": "Delete a stored recording.",
-                                       "nickname": "deleteStoredRecording",
+                                       "nickname": "deleteStored",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               }
                                        ]
                                }
                        ]
                },
                {
-                       "path": "/recordings/live",
-                       "description": "Recordings that are in progress",
-                       "operations": [
-                               {
-                                       "httpMethod": "GET",
-                                       "summary": "List libe recordings.",
-                                       "nickname": "getLiveRecordings",
-                                       "responseClass": "List[LiveRecording]"
-                               }
-                       ]
-               },
-               {
                        "path": "/recordings/live/{recordingName}",
                        "description": "A recording that is in progress",
                        "operations": [
                                {
                                        "httpMethod": "GET",
                                        "summary": "List live recordings.",
-                                       "nickname": "getLiveRecording",
+                                       "nickname": "getLive",
                                        "responseClass": "LiveRecording",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               }
                                        ]
                                },
                                {
                                        "httpMethod": "DELETE",
                                        "summary": "Stop a live recording and discard it.",
-                                       "nickname": "cancelRecording",
+                                       "nickname": "cancel",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               }
                                        ]
                                }
                        ]
                                {
                                        "httpMethod": "POST",
                                        "summary": "Stop a live recording and store it.",
-                                       "nickname": "stopRecording",
+                                       "nickname": "stop",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               }
                                        ]
                                }
                        ]
                                {
                                        "httpMethod": "POST",
                                        "summary": "Pause a live recording.",
-                                       "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused.",
-                                       "nickname": "pauseRecording",
+                                       "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.",
+                                       "nickname": "pause",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               },
+                                               {
+                                                       "code": 409,
+                                                       "reason": "Recording not in session"
+                                               }
                                        ]
-                               }
-                       ]
-               },
-               {
-                       "path": "/recordings/live/{recordingName}/unpause",
-                       "operations": [
+                               },
                                {
-                                       "httpMethod": "POST",
+                                       "httpMethod": "DELETE",
                                        "summary": "Unpause a live recording.",
-                                       "nickname": "unpauseRecording",
+                                       "nickname": "unpause",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               },
+                                               {
+                                                       "code": 409,
+                                                       "reason": "Recording not in session"
+                                               }
                                        ]
                                }
                        ]
                                        "httpMethod": "POST",
                                        "summary": "Mute a live recording.",
                                        "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.",
-                                       "nickname": "muteRecording",
+                                       "nickname": "mute",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               },
+                                               {
+                                                       "code": 409,
+                                                       "reason": "Recording not in session"
+                                               }
                                        ]
-                               }
-                       ]
-               },
-               {
-                       "path": "/recordings/live/{recordingName}/unmute",
-                       "operations": [
+                               },
                                {
-                                       "httpMethod": "POST",
+                                       "httpMethod": "DELETE",
                                        "summary": "Unmute a live recording.",
-                                       "nickname": "unmuteRecording",
+                                       "nickname": "unmute",
                                        "responseClass": "void",
                                        "parameters": [
                                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "Recording not found"
+                                               },
+                                               {
+                                                       "code": 409,
+                                                       "reason": "Recording not in session"
+                                               }
                                        ]
                                }
                        ]
                        "id": "StoredRecording",
                        "description": "A past recording that may be played back.",
                        "properties": {
-                               "id": {
+                               "name": {
                                        "required": true,
                                        "type": "string"
                                },
-                               "formats": {
+                               "format": {
                                        "required": true,
-                                       "type": "List[string]"
-                               },
-                               "duration_seconds": {
-                                       "required": false,
-                                       "type": "int"
-                               },
-                               "time": {
-                                       "description": "Time recording was started",
-                                       "required": false,
-                                       "type": "Date"
+                                       "type": "string"
                                }
                        }
                },
                        "properties": {
                                "name": {
                                        "required": true,
-                                       "type": "string"
+                                       "type": "string",
+                                       "description": "Base name for the recording"
+                               },
+                               "format": {
+                                       "required": true,
+                                       "type": "string",
+                                       "description": "Recording format (wav, gsm, etc.)"
+                               },
+                               "target_uri": {
+                                       "required": true,
+                                       "type": "string",
+                                       "description": "URI for the channel or bridge being recorded"
+                               },
+                               "state": {
+                                       "required": false,
+                                       "type": "string",
+                                       "allowableValues": {
+                                               "valueType": "LIST",
+                                               "values": [
+                                                       "queued",
+                                                       "recording",
+                                                       "paused",
+                                                       "done",
+                                                       "failed",
+                                                       "canceled"
+                                               ]
+                                       }
+                               },
+                               "cause": {
+                                       "required": false,
+                                       "type": "string",
+                                       "description": "Cause for recording failure if failed"
                                },
                                "state": {
                                        "required": true,