applications.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {
  2. "_copyright": "Copyright (C) 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/applications.{format}",
  9. "apis": [
  10. {
  11. "path": "/applications",
  12. "description": "Stasis applications",
  13. "operations": [
  14. {
  15. "httpMethod": "GET",
  16. "summary": "List all applications.",
  17. "nickname": "list",
  18. "responseClass": "List[Application]"
  19. }
  20. ]
  21. },
  22. {
  23. "path": "/applications/{applicationName}",
  24. "description": "Stasis application",
  25. "operations": [
  26. {
  27. "httpMethod": "GET",
  28. "summary": "Get details of an application.",
  29. "nickname": "get",
  30. "responseClass": "Application",
  31. "parameters": [
  32. {
  33. "name": "applicationName",
  34. "description": "Application's name",
  35. "paramType": "path",
  36. "required": true,
  37. "allowMultiple": false,
  38. "dataType": "string"
  39. }
  40. ],
  41. "errorResponses": [
  42. {
  43. "code": 404,
  44. "reason": "Application does not exist."
  45. }
  46. ]
  47. }
  48. ]
  49. },
  50. {
  51. "path": "/applications/{applicationName}/subscription",
  52. "description": "Stasis application",
  53. "operations": [
  54. {
  55. "httpMethod": "POST",
  56. "summary": "Subscribe an application to a event source.",
  57. "notes": "Returns the state of the application after the subscriptions have changed",
  58. "nickname": "subscribe",
  59. "responseClass": "Application",
  60. "parameters": [
  61. {
  62. "name": "applicationName",
  63. "description": "Application's name",
  64. "paramType": "path",
  65. "required": true,
  66. "allowMultiple": false,
  67. "dataType": "string"
  68. },
  69. {
  70. "name": "eventSource",
  71. "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}",
  72. "paramType": "query",
  73. "required": true,
  74. "allowMultiple": true,
  75. "dataType": "string"
  76. }
  77. ],
  78. "errorResponses": [
  79. {
  80. "code": 400,
  81. "reason": "Missing parameter."
  82. },
  83. {
  84. "code": 404,
  85. "reason": "Application does not exist."
  86. },
  87. {
  88. "code": 422,
  89. "reason": "Event source does not exist."
  90. }
  91. ]
  92. },
  93. {
  94. "httpMethod": "DELETE",
  95. "summary": "Unsubscribe an application from an event source.",
  96. "notes": "Returns the state of the application after the subscriptions have changed",
  97. "nickname": "unsubscribe",
  98. "responseClass": "Application",
  99. "parameters": [
  100. {
  101. "name": "applicationName",
  102. "description": "Application's name",
  103. "paramType": "path",
  104. "required": true,
  105. "allowMultiple": false,
  106. "dataType": "string"
  107. },
  108. {
  109. "name": "eventSource",
  110. "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}",
  111. "paramType": "query",
  112. "required": true,
  113. "allowMultiple": true,
  114. "dataType": "string"
  115. }
  116. ],
  117. "errorResponses": [
  118. {
  119. "code": 400,
  120. "reason": "Missing parameter; event source scheme not recognized."
  121. },
  122. {
  123. "code": 404,
  124. "reason": "Application does not exist."
  125. },
  126. {
  127. "code": 409,
  128. "reason": "Application not subscribed to event source."
  129. },
  130. {
  131. "code": 422,
  132. "reason": "Event source does not exist."
  133. }
  134. ]
  135. }
  136. ]
  137. }
  138. ],
  139. "models": {
  140. "Application": {
  141. "id": "Application",
  142. "description": "Details of a Stasis application",
  143. "properties": {
  144. "name": {
  145. "type": "string",
  146. "description": "Name of this application",
  147. "required": true
  148. },
  149. "channel_ids": {
  150. "type": "List[string]",
  151. "description": "Id's for channels subscribed to.",
  152. "required": true
  153. },
  154. "bridge_ids": {
  155. "type": "List[string]",
  156. "description": "Id's for bridges subscribed to.",
  157. "required": true
  158. },
  159. "endpoint_ids": {
  160. "type": "List[string]",
  161. "description": "{tech}/{resource} for endpoints subscribed to.",
  162. "required": true
  163. },
  164. "device_names": {
  165. "type": "List[string]",
  166. "description": "Names of the devices subscribed to.",
  167. "required": true
  168. }
  169. }
  170. }
  171. }
  172. }