recordings.json 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. {
  2. "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
  3. "_author": "David M. Lee, II <dlee@digium.com>",
  4. "_svn_revision": "$Revision$",
  5. "apiVersion": "1.10.0",
  6. "swaggerVersion": "1.1",
  7. "basePath": "http://localhost:8088/ari",
  8. "resourcePath": "/api-docs/recordings.{format}",
  9. "apis": [
  10. {
  11. "path": "/recordings/stored",
  12. "description": "Recordings",
  13. "operations": [
  14. {
  15. "httpMethod": "GET",
  16. "summary": "List recordings that are complete.",
  17. "nickname": "listStored",
  18. "responseClass": "List[StoredRecording]"
  19. }
  20. ]
  21. },
  22. {
  23. "path": "/recordings/stored/{recordingName}",
  24. "description": "Individual recording",
  25. "operations": [
  26. {
  27. "httpMethod": "GET",
  28. "summary": "Get a stored recording's details.",
  29. "nickname": "getStored",
  30. "responseClass": "StoredRecording",
  31. "parameters": [
  32. {
  33. "name": "recordingName",
  34. "description": "The name of the recording",
  35. "paramType": "path",
  36. "required": true,
  37. "allowMultiple": false,
  38. "dataType": "string"
  39. }
  40. ],
  41. "errorResponses": [
  42. {
  43. "code": 404,
  44. "reason": "Recording not found"
  45. }
  46. ]
  47. },
  48. {
  49. "httpMethod": "DELETE",
  50. "summary": "Delete a stored recording.",
  51. "nickname": "deleteStored",
  52. "responseClass": "void",
  53. "parameters": [
  54. {
  55. "name": "recordingName",
  56. "description": "The name of the recording",
  57. "paramType": "path",
  58. "required": true,
  59. "allowMultiple": false,
  60. "dataType": "string"
  61. }
  62. ],
  63. "errorResponses": [
  64. {
  65. "code": 404,
  66. "reason": "Recording not found"
  67. }
  68. ]
  69. }
  70. ]
  71. },
  72. {
  73. "path": "/recordings/stored/{recordingName}/copy",
  74. "description": "Copy an individual recording",
  75. "operations": [
  76. {
  77. "httpMethod": "POST",
  78. "summary": "Copy a stored recording.",
  79. "nickname": "copyStored",
  80. "responseClass": "StoredRecording",
  81. "parameters": [
  82. {
  83. "name": "recordingName",
  84. "description": "The name of the recording to copy",
  85. "paramType": "path",
  86. "required": true,
  87. "allowMultiple": false,
  88. "dataType": "string"
  89. },
  90. {
  91. "name": "destinationRecordingName",
  92. "description": "The destination name of the recording",
  93. "paramType": "query",
  94. "required": true,
  95. "allowMultiple": false,
  96. "dataType": "string"
  97. }
  98. ],
  99. "errorResponses": [
  100. {
  101. "code": 404,
  102. "reason": "Recording not found"
  103. },
  104. {
  105. "code": 409,
  106. "reason": "A recording with the same name already exists on the system"
  107. }
  108. ]
  109. }
  110. ]
  111. },
  112. {
  113. "path": "/recordings/live/{recordingName}",
  114. "description": "A recording that is in progress",
  115. "operations": [
  116. {
  117. "httpMethod": "GET",
  118. "summary": "List live recordings.",
  119. "nickname": "getLive",
  120. "responseClass": "LiveRecording",
  121. "parameters": [
  122. {
  123. "name": "recordingName",
  124. "description": "The name of the recording",
  125. "paramType": "path",
  126. "required": true,
  127. "allowMultiple": false,
  128. "dataType": "string"
  129. }
  130. ],
  131. "errorResponses": [
  132. {
  133. "code": 404,
  134. "reason": "Recording not found"
  135. }
  136. ]
  137. },
  138. {
  139. "httpMethod": "DELETE",
  140. "summary": "Stop a live recording and discard it.",
  141. "nickname": "cancel",
  142. "responseClass": "void",
  143. "parameters": [
  144. {
  145. "name": "recordingName",
  146. "description": "The name of the recording",
  147. "paramType": "path",
  148. "required": true,
  149. "allowMultiple": false,
  150. "dataType": "string"
  151. }
  152. ],
  153. "errorResponses": [
  154. {
  155. "code": 404,
  156. "reason": "Recording not found"
  157. }
  158. ]
  159. }
  160. ]
  161. },
  162. {
  163. "path": "/recordings/live/{recordingName}/stop",
  164. "operations": [
  165. {
  166. "httpMethod": "POST",
  167. "summary": "Stop a live recording and store it.",
  168. "nickname": "stop",
  169. "responseClass": "void",
  170. "parameters": [
  171. {
  172. "name": "recordingName",
  173. "description": "The name of the recording",
  174. "paramType": "path",
  175. "required": true,
  176. "allowMultiple": false,
  177. "dataType": "string"
  178. }
  179. ],
  180. "errorResponses": [
  181. {
  182. "code": 404,
  183. "reason": "Recording not found"
  184. }
  185. ]
  186. }
  187. ]
  188. },
  189. {
  190. "path": "/recordings/live/{recordingName}/pause",
  191. "operations": [
  192. {
  193. "httpMethod": "POST",
  194. "summary": "Pause a live recording.",
  195. "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.",
  196. "nickname": "pause",
  197. "responseClass": "void",
  198. "parameters": [
  199. {
  200. "name": "recordingName",
  201. "description": "The name of the recording",
  202. "paramType": "path",
  203. "required": true,
  204. "allowMultiple": false,
  205. "dataType": "string"
  206. }
  207. ],
  208. "errorResponses": [
  209. {
  210. "code": 404,
  211. "reason": "Recording not found"
  212. },
  213. {
  214. "code": 409,
  215. "reason": "Recording not in session"
  216. }
  217. ]
  218. },
  219. {
  220. "httpMethod": "DELETE",
  221. "summary": "Unpause a live recording.",
  222. "nickname": "unpause",
  223. "responseClass": "void",
  224. "parameters": [
  225. {
  226. "name": "recordingName",
  227. "description": "The name of the recording",
  228. "paramType": "path",
  229. "required": true,
  230. "allowMultiple": false,
  231. "dataType": "string"
  232. }
  233. ],
  234. "errorResponses": [
  235. {
  236. "code": 404,
  237. "reason": "Recording not found"
  238. },
  239. {
  240. "code": 409,
  241. "reason": "Recording not in session"
  242. }
  243. ]
  244. }
  245. ]
  246. },
  247. {
  248. "path": "/recordings/live/{recordingName}/mute",
  249. "operations": [
  250. {
  251. "httpMethod": "POST",
  252. "summary": "Mute a live recording.",
  253. "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.",
  254. "nickname": "mute",
  255. "responseClass": "void",
  256. "parameters": [
  257. {
  258. "name": "recordingName",
  259. "description": "The name of the recording",
  260. "paramType": "path",
  261. "required": true,
  262. "allowMultiple": false,
  263. "dataType": "string"
  264. }
  265. ],
  266. "errorResponses": [
  267. {
  268. "code": 404,
  269. "reason": "Recording not found"
  270. },
  271. {
  272. "code": 409,
  273. "reason": "Recording not in session"
  274. }
  275. ]
  276. },
  277. {
  278. "httpMethod": "DELETE",
  279. "summary": "Unmute a live recording.",
  280. "nickname": "unmute",
  281. "responseClass": "void",
  282. "parameters": [
  283. {
  284. "name": "recordingName",
  285. "description": "The name of the recording",
  286. "paramType": "path",
  287. "required": true,
  288. "allowMultiple": false,
  289. "dataType": "string"
  290. }
  291. ],
  292. "errorResponses": [
  293. {
  294. "code": 404,
  295. "reason": "Recording not found"
  296. },
  297. {
  298. "code": 409,
  299. "reason": "Recording not in session"
  300. }
  301. ]
  302. }
  303. ]
  304. }
  305. ],
  306. "models": {
  307. "StoredRecording": {
  308. "id": "StoredRecording",
  309. "description": "A past recording that may be played back.",
  310. "properties": {
  311. "name": {
  312. "required": true,
  313. "type": "string"
  314. },
  315. "format": {
  316. "required": true,
  317. "type": "string"
  318. }
  319. }
  320. },
  321. "LiveRecording": {
  322. "id": "LiveRecording",
  323. "description": "A recording that is in progress",
  324. "properties": {
  325. "name": {
  326. "required": true,
  327. "type": "string",
  328. "description": "Base name for the recording"
  329. },
  330. "format": {
  331. "required": true,
  332. "type": "string",
  333. "description": "Recording format (wav, gsm, etc.)"
  334. },
  335. "target_uri": {
  336. "required": true,
  337. "type": "string",
  338. "description": "URI for the channel or bridge being recorded"
  339. },
  340. "state": {
  341. "required": true,
  342. "type": "string",
  343. "allowableValues": {
  344. "valueType": "LIST",
  345. "values": [
  346. "queued",
  347. "recording",
  348. "paused",
  349. "done",
  350. "failed",
  351. "canceled"
  352. ]
  353. }
  354. },
  355. "duration": {
  356. "required": false,
  357. "type": "int",
  358. "description": "Duration in seconds of the recording"
  359. },
  360. "talking_duration": {
  361. "required": false,
  362. "type": "int",
  363. "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds."
  364. },
  365. "silence_duration": {
  366. "required": false,
  367. "type": "int",
  368. "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds."
  369. },
  370. "cause": {
  371. "required": false,
  372. "type": "string",
  373. "description": "Cause for recording failure if failed"
  374. }
  375. }
  376. }
  377. }
  378. }