ARI playback: Rename ARI Playback to Playbacks
[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": "0.0.1",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/stasis",
8         "resourcePath": "/api-docs/playbacks.{format}",
9         "apis": [
10                 {
11                         "path": "/playbacks/{playbackId}",
12                         "description": "Control object for a playback operation.",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "Get a playback's details.",
17                                         "nickname": "get",
18                                         "responseClass": "Playback",
19                                         "parameters": [
20                                                 {
21                                                         "name": "playbackId",
22                                                         "description": "Playback's id",
23                                                         "paramType": "path",
24                                                         "required": true,
25                                                         "allowMultiple": false,
26                                                         "dataType": "string"
27                                                 }
28                                         ],
29                                         "errorResponses": [
30                                                 {
31                                                         "code": 404,
32                                                         "reason": "The playback cannot be found"
33                                                 }
34                                         ]
35                                 },
36                                 {
37                                         "httpMethod": "DELETE",
38                                         "summary": "Stop a playback.",
39                                         "nickname": "stop",
40                                         "responseClass": "void",
41                                         "parameters": [
42                                                 {
43                                                         "name": "playbackId",
44                                                         "description": "Playback's id",
45                                                         "paramType": "path",
46                                                         "required": true,
47                                                         "allowMultiple": false,
48                                                         "dataType": "string"
49                                                 }
50                                         ],
51                                         "errorResponses": [
52                                                 {
53                                                         "code": 404,
54                                                         "reason": "The playback cannot be found"
55                                                 }
56                                         ]
57                                 }
58                         ]
59                 },
60                 {
61                         "path": "/playbacks/{playbackId}/control",
62                         "description": "Control object for a playback operation.",
63                         "operations": [
64                                 {
65                                         "httpMethod": "POST",
66                                         "summary": "Control a playback.",
67                                         "nickname": "control",
68                                         "responseClass": "void",
69                                         "parameters": [
70                                                 {
71                                                         "name": "playbackId",
72                                                         "description": "Playback's id",
73                                                         "paramType": "path",
74                                                         "required": true,
75                                                         "allowMultiple": false,
76                                                         "dataType": "string"
77                                                 },
78                                                 {
79                                                         "name": "operation",
80                                                         "description": "Operation to perform on the playback.",
81                                                         "paramType": "query",
82                                                         "required": true,
83                                                         "allowMultiple": false,
84                                                         "dataType": "string",
85                                                         "allowableValues": {
86                                                                 "valueType": "LIST",
87                                                                 "values": [
88                                                                         "restart",
89                                                                         "pause",
90                                                                         "unpause",
91                                                                         "reverse",
92                                                                         "forward"
93                                                                 ]
94                                                         }
95                                                 }
96                                         ],
97                                         "errorResponses": [
98                                                 {
99                                                         "code": 400,
100                                                         "reason": "The provided operation parameter was invalid"
101                                                 },
102                                                 {
103                                                         "code": 404,
104                                                         "reason": "The playback cannot be found"
105                                                 },
106                                                 {
107                                                         "code": 409,
108                                                         "reason": "The operation cannot be performed in the playback's current state"
109                                                 }
110 ]
111                                 }
112                         ]
113                 }
114         ],
115         "models": {
116                 "Playback": {
117                         "id": "Playback",
118                         "description": "Object representing the playback of media to a channel",
119                         "properties": {
120                                 "id": {
121                                         "type": "string",
122                                         "description": "ID for this playback operation",
123                                         "required": true
124                                 },
125                                 "media_uri": {
126                                         "type": "string",
127                                         "description": "URI for the media to play back.",
128                                         "required": true
129                                 },
130                                 "target_uri": {
131                                         "type": "string",
132                                         "description": "URI for the channel or bridge to play the media on",
133                                         "required": true
134                                 },
135                                 "language": {
136                                         "type": "string",
137                                         "description": "For media types that support multiple languages, the language requested for playback."
138                                 },
139                                 "state": {
140                                         "type": "string",
141                                         "description": "Current state of the playback operation.",
142                                         "required": true,
143                                         "allowableValues": {
144                                                 "valueType": "LIST",
145                                                 "values": [
146                                                         "queued",
147                                                         "playing",
148                                                         "complete"
149                                                 ]
150                                         }
151                                 }
152                         }
153                 }
154         }
155 }