ARI - GET /ari/asterisk/info
[asterisk/asterisk.git] / rest-api / api-docs / asterisk.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/asterisk.{format}",
9         "apis": [
10                 {
11                         "path": "/asterisk/info",
12                         "description": "Asterisk system information (similar to core show settings)",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "Gets Asterisk system information.",
17                                         "nickname": "getAsteriskInfo",
18                                         "responseClass": "AsteriskInfo",
19                                         "parameters": [
20                                                 {
21                                                         "name": "only",
22                                                         "description": "Filter information returned",
23                                                         "paramType": "query",
24                                                         "required": false,
25                                                         "allowMultiple": true,
26                                                         "dataType": "string",
27                                                         "allowableValues": {
28                                                                 "valueType": "LIST",
29                                                                 "values": [
30                                                                         "version",
31                                                                         "modules",
32                                                                         "uptime"
33                                                                 ]
34                                                         }
35                                                 }
36                                         ]
37                                 }
38                         ]
39                 },
40                 {
41                         "path": "/asterisk/variable",
42                         "description": "Global variables",
43                         "operations": [
44                                 {
45                                         "httpMethod": "GET",
46                                         "summary": "Get the value of a global variable.",
47                                         "nickname": "getGlobalVar",
48                                         "responseClass": "Variable",
49                                         "parameters": [
50                                                 {
51                                                         "name": "variable",
52                                                         "description": "The variable to get",
53                                                         "paramType": "query",
54                                                         "required": true,
55                                                         "allowMultiple": false,
56                                                         "dataType": "string"
57                                                 }
58                                         ]
59                                 },
60                                 {
61                                         "httpMethod": "POST",
62                                         "summary": "Set the value of a global variable.",
63                                         "nickname": "setGlobalVar",
64                                         "responseClass": "void",
65                                         "parameters": [
66                                                 {
67                                                         "name": "variable",
68                                                         "description": "The variable to set",
69                                                         "paramType": "query",
70                                                         "required": true,
71                                                         "allowMultiple": false,
72                                                         "dataType": "string"
73                                                 },
74                                                 {
75                                                         "name": "value",
76                                                         "description": "The value to set the variable to",
77                                                         "paramType": "query",
78                                                         "required": false,
79                                                         "allowMultiple": false,
80                                                         "dataType": "string"
81                                                 }
82                                         ]
83                                 }
84                         ]
85                 }
86         ],
87         "models": {
88                 "BuildInfo": {
89                         "id": "BuildInfo",
90                         "description": "Info about how Asterisk was built",
91                         "properties": {
92                                 "os": {
93                                         "required": true,
94                                         "type": "string",
95                                         "description": "OS Asterisk was built on."
96                                 },
97                                 "kernel": {
98                                         "required": true,
99                                         "type": "string",
100                                         "description": "Kernel version Asterisk was built on."
101                                 },
102                                 "options": {
103                                         "required": true,
104                                         "type": "string",
105                                         "description": "Compile time options, or empty string if default."
106                                 },
107                                 "machine": {
108                                         "required": true,
109                                         "type": "string",
110                                         "description": "Machine architecture (x86_64, i686, ppc, etc.)"
111                                 },
112                                 "date": {
113                                         "required": true,
114                                         "type": "string",
115                                         "description": "Date and time when Asterisk was built."
116                                 },
117                                 "user": {
118                                         "required": true,
119                                         "type": "string",
120                                         "description": "Username that build Asterisk"
121                                 }
122                         }
123                 },
124                 "SystemInfo": {
125                         "id": "SystemInfo",
126                         "description": "Info about Asterisk",
127                         "properties": {
128                                 "version": {
129                                         "required": true,
130                                         "type": "string",
131                                         "description": "Asterisk version."
132                                 },
133                                 "entity_id": {
134                                         "required": true,
135                                         "type": "string",
136                                         "description": ""
137                                 }
138                         }
139                 },
140                 "SetId": {
141                         "id": "SetId",
142                         "description": "Effective user/group id",
143                         "properties": {
144                                 "user": {
145                                         "required": true,
146                                         "type": "string",
147                                         "description": "Effective user id."
148                                 },
149                                 "group": {
150                                         "required": true,
151                                         "type": "string",
152                                         "description": "Effective group id."
153                                 }
154                         }
155                 },
156                 "ConfigInfo": {
157                         "id": "ConfigInfo",
158                         "description": "Info about Asterisk configuration",
159                         "properties": {
160                                 "name": {
161                                         "required": true,
162                                         "type": "string",
163                                         "description": "Asterisk system name."
164                                 },
165                                 "default_language": {
166                                         "required": true,
167                                         "type": "string",
168                                         "description": "Default language for media playback."
169                                 },
170                                 "max_channels": {
171                                         "required": false,
172                                         "type": "int",
173                                         "description": "Maximum number of simultaneous channels."
174                                 },
175                                 "max_open_files": {
176                                         "required": false,
177                                         "type": "int",
178                                         "description": "Maximum number of open file handles (files, sockets)."
179                                 },
180                                 "max_load": {
181                                         "required": false,
182                                         "type": "double",
183                                         "description": "Maximum load avg on system."
184                                 },
185                                 "setid": {
186                                         "required": true,
187                                         "type": "SetId",
188                                         "description": "Effective user/group id for running Asterisk."
189                                 }
190                         }
191                 },
192                 "StatusInfo": {
193                         "id": "StatusInfo",
194                         "description": "Info about Asterisk status",
195                         "properties": {
196                                 "startup_time": {
197                                         "required": true,
198                                         "type": "Date",
199                                         "description": "Time when Asterisk was started."
200                                 },
201                                 "last_reload_time": {
202                                         "required": true,
203                                         "type": "Date",
204                                         "description": "Time when Asterisk was last reloaded."
205                                 }
206                         }
207                 },
208                 "AsteriskInfo": {
209                         "id": "AsteriskInfo",
210                         "description": "Asterisk system information",
211                         "properties": {
212                                 "build": {
213                                         "required": false,
214                                         "type": "BuildInfo",
215                                         "description": "Info about how Asterisk was built"
216                                 },
217                                 "system": {
218                                         "required": false,
219                                         "type": "SystemInfo",
220                                         "description": "Info about the system running Asterisk"
221                                 },
222                                 "config": {
223                                         "required": false,
224                                         "type": "ConfigInfo",
225                                         "description": "Info about Asterisk configuration"
226                                 },
227                                 "status": {
228                                         "required": false,
229                                         "type": "StatusInfo",
230                                         "description": "Info about Asterisk status"
231                                 }
232                         }
233                 },
234                 "Variable": {
235                         "id": "Variable",
236                         "description": "The value of a channel variable",
237                         "properties": {
238                                 "value": {
239                                         "required": true,
240                                         "type": "string",
241                                         "description": "The value of the variable requested"
242                                 }
243                         }
244                 }
245         }
246 }