Index installed sounds and implement ARI sounds queries
[asterisk/asterisk.git] / rest-api / api-docs / sounds.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/sounds.{format}",
9         "apis": [
10                 {
11                         "path": "/sounds",
12                         "description": "Sounds",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "List all sounds.",
17                                         "nickname": "getSounds",
18                                         "responseClass": "List[Sound]",
19                                         "parameters": [
20                                                 {
21                                                         "name": "lang",
22                                                         "paramType": "query",
23                                                         "dataType": "string",
24                                                         "required": false
25                                                 },
26                                                 {
27                                                         "name": "format",
28                                                         "paramType": "query",
29                                                         "dataType": "string",
30                                                         "required": false,
31                                                         "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats."
32                                                 }
33                                         ]
34                                 }
35                         ]
36                 },
37                 {
38                         "path": "/sounds/{soundId}",
39                         "description": "Individual sound",
40                         "operations": [
41                                 {
42                                         "httpMethod": "GET",
43                                         "summary": "Get a sound's details.",
44                                         "nickname": "getStoredSound",
45                                         "responseClass": "Sound",
46                                         "parameters": [
47                                                 {
48                                                         "name": "soundId",
49                                                         "description": "Sound's id",
50                                                         "paramType": "path",
51                                                         "required": true,
52                                                         "allowMultiple": false,
53                                                         "dataType": "string"
54                                                 }
55                                         ]
56                                 }
57                         ]
58                 }
59         ],
60         "models": {
61                 "FormatLangPair": {
62                         "id": "FormatLangPair",
63                         "properties": {
64                                 "language": {
65                                         "required": true,
66                                         "type": "string"
67                                 },
68                                 "format": {
69                                         "required": true,
70                                         "type": "string"
71                                 }
72                         }
73                 },
74                 "Sound": {
75                         "id": "Sound",
76                         "properties": {
77                                 "id": {
78                                         "required": true,
79                                         "description": "Sound's identifier.",
80                                         "type": "string"
81                                 },
82                                 "text": {
83                                         "required": false,
84                                         "description": "Text description of the sound, usually the words spoken.",
85                                         "type": "string"
86                                 },
87                                 "formats": {
88                                         "required": true,
89                                         "description": "The formats and languages in which this sound is available.",
90                                         "type": "List[FormatLangPair]"
91                                 }
92                         }
93                 }
94         }
95 }