api-with-examples.yaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. swagger: "2.0"
  2. info:
  3. title: Simple API overview
  4. version: v2
  5. paths:
  6. /:
  7. get:
  8. operationId: listVersionsv2
  9. summary: List API versions
  10. produces:
  11. - application/json
  12. responses:
  13. "200":
  14. description: |-
  15. 200 300 response
  16. examples:
  17. application/json: |-
  18. {
  19. "versions": [
  20. {
  21. "status": "CURRENT",
  22. "updated": "2011-01-21T11:33:21Z",
  23. "id": "v2.0",
  24. "links": [
  25. {
  26. "href": "http://127.0.0.1:8774/v2/",
  27. "rel": "self"
  28. }
  29. ]
  30. },
  31. {
  32. "status": "EXPERIMENTAL",
  33. "updated": "2013-07-23T11:33:21Z",
  34. "id": "v3.0",
  35. "links": [
  36. {
  37. "href": "http://127.0.0.1:8774/v3/",
  38. "rel": "self"
  39. }
  40. ]
  41. }
  42. ]
  43. }
  44. "300":
  45. description: |-
  46. 200 300 response
  47. examples:
  48. application/json: |-
  49. {
  50. "versions": [
  51. {
  52. "status": "CURRENT",
  53. "updated": "2011-01-21T11:33:21Z",
  54. "id": "v2.0",
  55. "links": [
  56. {
  57. "href": "http://127.0.0.1:8774/v2/",
  58. "rel": "self"
  59. }
  60. ]
  61. },
  62. {
  63. "status": "EXPERIMENTAL",
  64. "updated": "2013-07-23T11:33:21Z",
  65. "id": "v3.0",
  66. "links": [
  67. {
  68. "href": "http://127.0.0.1:8774/v3/",
  69. "rel": "self"
  70. }
  71. ]
  72. }
  73. ]
  74. }
  75. /v2:
  76. get:
  77. operationId: getVersionDetailsv2
  78. summary: Show API version details
  79. produces:
  80. - application/json
  81. responses:
  82. "200":
  83. description: |-
  84. 200 203 response
  85. examples:
  86. application/json: |-
  87. {
  88. "version": {
  89. "status": "CURRENT",
  90. "updated": "2011-01-21T11:33:21Z",
  91. "media-types": [
  92. {
  93. "base": "application/xml",
  94. "type": "application/vnd.openstack.compute+xml;version=2"
  95. },
  96. {
  97. "base": "application/json",
  98. "type": "application/vnd.openstack.compute+json;version=2"
  99. }
  100. ],
  101. "id": "v2.0",
  102. "links": [
  103. {
  104. "href": "http://127.0.0.1:8774/v2/",
  105. "rel": "self"
  106. },
  107. {
  108. "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
  109. "type": "application/pdf",
  110. "rel": "describedby"
  111. },
  112. {
  113. "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
  114. "type": "application/vnd.sun.wadl+xml",
  115. "rel": "describedby"
  116. },
  117. {
  118. "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
  119. "type": "application/vnd.sun.wadl+xml",
  120. "rel": "describedby"
  121. }
  122. ]
  123. }
  124. }
  125. "203":
  126. description: |-
  127. 200 203 response
  128. examples:
  129. application/json: |-
  130. {
  131. "version": {
  132. "status": "CURRENT",
  133. "updated": "2011-01-21T11:33:21Z",
  134. "media-types": [
  135. {
  136. "base": "application/xml",
  137. "type": "application/vnd.openstack.compute+xml;version=2"
  138. },
  139. {
  140. "base": "application/json",
  141. "type": "application/vnd.openstack.compute+json;version=2"
  142. }
  143. ],
  144. "id": "v2.0",
  145. "links": [
  146. {
  147. "href": "http://23.253.228.211:8774/v2/",
  148. "rel": "self"
  149. },
  150. {
  151. "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
  152. "type": "application/pdf",
  153. "rel": "describedby"
  154. },
  155. {
  156. "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
  157. "type": "application/vnd.sun.wadl+xml",
  158. "rel": "describedby"
  159. }
  160. ]
  161. }
  162. }
  163. consumes:
  164. - application/json