Merge "addons/res_config_mysql: silense warnings about printf format errors."
[asterisk/asterisk.git] / rest-api / api-docs / playbacks.json
1 {
2         "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
3         "_author": "David M. Lee, II <dlee@digium.com>",
4         "_svn_revision": "$Revision$",
5         "apiVersion": "2.0.0",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/ari",
8         "resourcePath": "/api-docs/playbacks.{format}",
9         "requiresModules": [
10                 "res_stasis_playback"
11         ],
12         "apis": [
13                 {
14                         "path": "/playbacks/{playbackId}",
15                         "description": "Control object for a playback operation.",
16                         "operations": [
17                                 {
18                                         "httpMethod": "GET",
19                                         "summary": "Get a playback's details.",
20                                         "nickname": "get",
21                                         "responseClass": "Playback",
22                                         "parameters": [
23                                                 {
24                                                         "name": "playbackId",
25                                                         "description": "Playback's id",
26                                                         "paramType": "path",
27                                                         "required": true,
28                                                         "allowMultiple": false,
29                                                         "dataType": "string"
30                                                 }
31                                         ],
32                                         "errorResponses": [
33                                                 {
34                                                         "code": 404,
35                                                         "reason": "The playback cannot be found"
36                                                 }
37                                         ]
38                                 },
39                                 {
40                                         "httpMethod": "DELETE",
41                                         "summary": "Stop a playback.",
42                                         "nickname": "stop",
43                                         "responseClass": "void",
44                                         "parameters": [
45                                                 {
46                                                         "name": "playbackId",
47                                                         "description": "Playback's id",
48                                                         "paramType": "path",
49                                                         "required": true,
50                                                         "allowMultiple": false,
51                                                         "dataType": "string"
52                                                 }
53                                         ],
54                                         "errorResponses": [
55                                                 {
56                                                         "code": 404,
57                                                         "reason": "The playback cannot be found"
58                                                 }
59                                         ]
60                                 }
61                         ]
62                 },
63                 {
64                         "path": "/playbacks/{playbackId}/control",
65                         "description": "Control object for a playback operation.",
66                         "operations": [
67                                 {
68                                         "httpMethod": "POST",
69                                         "summary": "Control a playback.",
70                                         "nickname": "control",
71                                         "responseClass": "void",
72                                         "parameters": [
73                                                 {
74                                                         "name": "playbackId",
75                                                         "description": "Playback's id",
76                                                         "paramType": "path",
77                                                         "required": true,
78                                                         "allowMultiple": false,
79                                                         "dataType": "string"
80                                                 },
81                                                 {
82                                                         "name": "operation",
83                                                         "description": "Operation to perform on the playback.",
84                                                         "paramType": "query",
85                                                         "required": true,
86                                                         "allowMultiple": false,
87                                                         "dataType": "string",
88                                                         "allowableValues": {
89                                                                 "valueType": "LIST",
90                                                                 "values": [
91                                                                         "restart",
92                                                                         "pause",
93                                                                         "unpause",
94                                                                         "reverse",
95                                                                         "forward"
96                                                                 ]
97                                                         }
98                                                 }
99                                         ],
100                                         "errorResponses": [
101                                                 {
102                                                         "code": 400,
103                                                         "reason": "The provided operation parameter was invalid"
104                                                 },
105                                                 {
106                                                         "code": 404,
107                                                         "reason": "The playback cannot be found"
108                                                 },
109                                                 {
110                                                         "code": 409,
111                                                         "reason": "The operation cannot be performed in the playback's current state"
112                                                 }
113 ]
114                                 }
115                         ]
116                 }
117         ],
118         "models": {
119                 "Playback": {
120                         "id": "Playback",
121                         "description": "Object representing the playback of media to a channel",
122                         "properties": {
123                                 "id": {
124                                         "type": "string",
125                                         "description": "ID for this playback operation",
126                                         "required": true
127                                 },
128                                 "media_uri": {
129                                         "type": "string",
130                                         "description": "The URI for the media currently being played back.",
131                                         "required": true
132                                 },
133                                 "next_media_uri": {
134                                         "type": "string",
135                                         "description": "If a list of URIs is being played, the next media URI to be played back.",
136                                         "required": false
137                                 },
138                                 "target_uri": {
139                                         "type": "string",
140                                         "description": "URI for the channel or bridge to play the media on",
141                                         "required": true
142                                 },
143                                 "language": {
144                                         "type": "string",
145                                         "description": "For media types that support multiple languages, the language requested for playback."
146                                 },
147                                 "state": {
148                                         "type": "string",
149                                         "description": "Current state of the playback operation.",
150                                         "required": true,
151                                         "allowableValues": {
152                                                 "valueType": "LIST",
153                                                 "values": [
154                                                         "queued",
155                                                         "playing",
156                                                         "continuing",
157                                                         "done"
158                                                 ]
159                                         }
160                                 }
161                         }
162                 }
163         }
164 }