deviceStates.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
  3. "_author": "Kevin Harwell <kharwell@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/deviceStates.{format}",
  9. "apis": [
  10. {
  11. "path": "/deviceStates",
  12. "description": "Device states",
  13. "operations": [
  14. {
  15. "httpMethod": "GET",
  16. "summary": "List all ARI controlled device states.",
  17. "nickname": "list",
  18. "responseClass": "List[DeviceState]"
  19. }
  20. ]
  21. },
  22. {
  23. "path": "/deviceStates/{deviceName}",
  24. "description": "Device state",
  25. "operations": [
  26. {
  27. "httpMethod": "GET",
  28. "summary": "Retrieve the current state of a device.",
  29. "nickname": "get",
  30. "responseClass": "DeviceState",
  31. "parameters": [
  32. {
  33. "name": "deviceName",
  34. "description": "Name of the device",
  35. "paramType": "path",
  36. "required": true,
  37. "allowMultiple": false,
  38. "dataType": "string"
  39. }
  40. ]
  41. },
  42. {
  43. "httpMethod": "PUT",
  44. "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).",
  45. "nickname": "update",
  46. "responseClass": "void",
  47. "parameters": [
  48. {
  49. "name": "deviceName",
  50. "description": "Name of the device",
  51. "paramType": "path",
  52. "required": true,
  53. "allowMultiple": false,
  54. "dataType": "string"
  55. },
  56. {
  57. "name": "deviceState",
  58. "description": "Device state value",
  59. "paramType": "query",
  60. "required": true,
  61. "allowMultiple": false,
  62. "dataType": "string",
  63. "allowableValues": {
  64. "valueType": "LIST",
  65. "values": [
  66. "NOT_INUSE",
  67. "INUSE",
  68. "BUSY",
  69. "INVALID",
  70. "UNAVAILABLE",
  71. "RINGING",
  72. "RINGINUSE",
  73. "ONHOLD"
  74. ]
  75. }
  76. }
  77. ],
  78. "errorResponses": [
  79. {
  80. "code": 404,
  81. "reason": "Device name is missing"
  82. },
  83. {
  84. "code": 409,
  85. "reason": "Uncontrolled device specified"
  86. }
  87. ]
  88. },
  89. {
  90. "httpMethod": "DELETE",
  91. "summary": "Destroy a device-state controlled by ARI.",
  92. "nickname": "delete",
  93. "responseClass": "void",
  94. "parameters": [
  95. {
  96. "name": "deviceName",
  97. "description": "Name of the device",
  98. "paramType": "path",
  99. "required": true,
  100. "allowMultiple": false,
  101. "dataType": "string"
  102. }
  103. ],
  104. "errorResponses": [
  105. {
  106. "code": 404,
  107. "reason": "Device name is missing"
  108. },
  109. {
  110. "code": 409,
  111. "reason": "Uncontrolled device specified"
  112. }
  113. ]
  114. }
  115. ]
  116. }
  117. ],
  118. "models": {
  119. "DeviceState": {
  120. "id": "DeviceState",
  121. "description": "Represents the state of a device.",
  122. "properties": {
  123. "name": {
  124. "type": "string",
  125. "description": "Name of the device.",
  126. "required": true
  127. },
  128. "state": {
  129. "type": "string",
  130. "description": "Device's state",
  131. "required": true,
  132. "allowableValues": {
  133. "valueType": "LIST",
  134. "values": [
  135. "UNKNOWN",
  136. "NOT_INUSE",
  137. "INUSE",
  138. "BUSY",
  139. "INVALID",
  140. "UNAVAILABLE",
  141. "RINGING",
  142. "RINGINUSE",
  143. "ONHOLD"
  144. ]
  145. }
  146. }
  147. }
  148. }
  149. }
  150. }