asterisk.json 5.9 KB

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