mailboxes.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {
  2. "_copyright": "Copyright (C) 2013, Digium, Inc.",
  3. "_author": "Jonathan Rose <jrose@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/mailboxes.{format}",
  9. "apis": [
  10. {
  11. "path": "/mailboxes",
  12. "description": "Mailboxes",
  13. "operations": [
  14. {
  15. "httpMethod": "GET",
  16. "summary": "List all mailboxes.",
  17. "nickname": "list",
  18. "responseClass": "List[Mailbox]"
  19. }
  20. ]
  21. },
  22. {
  23. "path": "/mailboxes/{mailboxName}",
  24. "description": "Mailbox state",
  25. "operations": [
  26. {
  27. "httpMethod": "GET",
  28. "summary": "Retrieve the current state of a mailbox.",
  29. "nickname": "get",
  30. "responseClass": "Mailbox",
  31. "parameters": [
  32. {
  33. "name": "mailboxName",
  34. "description": "Name of the mailbox",
  35. "paramType": "path",
  36. "required": true,
  37. "allowMultiple": false,
  38. "dataType": "string"
  39. }
  40. ],
  41. "errorResponses": [
  42. {
  43. "code": 404,
  44. "reason": "Mailbox not found"
  45. }
  46. ]
  47. },
  48. {
  49. "httpMethod": "PUT",
  50. "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).",
  51. "nickname": "update",
  52. "responseClass": "void",
  53. "parameters": [
  54. {
  55. "name": "mailboxName",
  56. "description": "Name of the mailbox",
  57. "paramType": "path",
  58. "required": true,
  59. "allowMultiple": false,
  60. "dataType": "string"
  61. },
  62. {
  63. "name": "oldMessages",
  64. "description": "Count of old messages in the mailbox",
  65. "paramType": "query",
  66. "required": true,
  67. "allowMultiple": false,
  68. "dataType": "int"
  69. },
  70. {
  71. "name": "newMessages",
  72. "description": "Count of new messages in the mailbox",
  73. "paramType": "query",
  74. "required": true,
  75. "allowMultiple": false,
  76. "dataType": "int"
  77. }
  78. ],
  79. "errorResponses": [
  80. {
  81. "code": 404,
  82. "reason": "Mailbox not found"
  83. }
  84. ]
  85. },
  86. {
  87. "httpMethod": "DELETE",
  88. "summary": "Destroy a mailbox.",
  89. "nickname": "delete",
  90. "responseClass": "void",
  91. "parameters": [
  92. {
  93. "name": "mailboxName",
  94. "description": "Name of the mailbox",
  95. "paramType": "path",
  96. "required": true,
  97. "allowMultiple": false,
  98. "dataType": "string"
  99. }
  100. ],
  101. "errorResponses": [
  102. {
  103. "code": 404,
  104. "reason": "Mailbox not found"
  105. }
  106. ]
  107. }
  108. ]
  109. }
  110. ],
  111. "models": {
  112. "Mailbox": {
  113. "id": "Mailbox",
  114. "description": "Represents the state of a mailbox.",
  115. "properties": {
  116. "name": {
  117. "type": "string",
  118. "description": "Name of the mailbox.",
  119. "required": true
  120. },
  121. "old_messages": {
  122. "type": "int",
  123. "description": "Count of old messages in the mailbox.",
  124. "required": true
  125. },
  126. "new_messages": {
  127. "type": "int",
  128. "description": "Count of new messages in the mailbox.",
  129. "required": true
  130. }
  131. }
  132. }
  133. }
  134. }