deploys.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Return a list of deploys for a given release.",
  5. "operationId": "List a Release's Deploys",
  6. "parameters": [
  7. {
  8. "name": "organization_id_or_slug",
  9. "in": "path",
  10. "description": "The ID or slug of the organization.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "version",
  18. "in": "path",
  19. "description": "The version identifier of the release.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. }
  25. ],
  26. "responses": {
  27. "200": {
  28. "description": "Success",
  29. "content": {
  30. "application/json": {
  31. "schema": {
  32. "type": "array",
  33. "items": {
  34. "$ref": "../../components/schemas/releases/deploy.json#/Deploy"
  35. }
  36. },
  37. "example": [
  38. {
  39. "environment": "prod",
  40. "name": null,
  41. "url": null,
  42. "dateStarted": null,
  43. "dateFinished": "2020-08-31T19:40:38.651670Z",
  44. "id": "1234567"
  45. }
  46. ]
  47. }
  48. }
  49. },
  50. "403": {
  51. "description": "Forbidden"
  52. },
  53. "404": {
  54. "description": "Not Found"
  55. }
  56. },
  57. "security": [
  58. {
  59. "auth_token": ["project:releases"]
  60. }
  61. ]
  62. },
  63. "post": {
  64. "tags": ["Releases"],
  65. "description": "Create a deploy.",
  66. "operationId": "Create a New Deploy for an Organization",
  67. "parameters": [
  68. {
  69. "name": "organization_id_or_slug",
  70. "in": "path",
  71. "description": "The ID or slug of the organization.",
  72. "required": true,
  73. "schema": {
  74. "type": "string"
  75. }
  76. },
  77. {
  78. "name": "version",
  79. "in": "path",
  80. "description": "The version identifier of the release.",
  81. "required": true,
  82. "schema": {
  83. "type": "string"
  84. }
  85. }
  86. ],
  87. "requestBody": {
  88. "content": {
  89. "application/json": {
  90. "schema": {
  91. "type": "object",
  92. "required": ["environment"],
  93. "properties": {
  94. "environment": {
  95. "type": "string",
  96. "description": "The environment you're deploying to."
  97. },
  98. "url": {
  99. "type": "string",
  100. "description": "The optional URL that points to the deploy."
  101. },
  102. "name": {
  103. "type": "string",
  104. "description": "The optional name of the deploy."
  105. },
  106. "projects": {
  107. "type": "array",
  108. "description": "The optional list of projects to deploy.",
  109. "items": {
  110. "type": "string"
  111. }
  112. },
  113. "dateStarted": {
  114. "type": "string",
  115. "format": "date-time",
  116. "description": "An optional date that indicates when the deploy started."
  117. },
  118. "dateFinished": {
  119. "type": "string",
  120. "format": "date-time",
  121. "description": "An optional date that indicates when the deploy ended. If not provided, the current time is used."
  122. }
  123. }
  124. },
  125. "example": {
  126. "environment": "prod"
  127. }
  128. }
  129. }
  130. },
  131. "responses": {
  132. "201": {
  133. "description": "Success",
  134. "content": {
  135. "application/json": {
  136. "schema": {
  137. "$ref": "../../components/schemas/releases/deploy.json#/Deploy"
  138. },
  139. "example": {
  140. "environment": "prod",
  141. "name": null,
  142. "url": null,
  143. "dateStarted": null,
  144. "dateFinished": "2020-08-31T19:40:38.651670Z",
  145. "id": "1234567"
  146. }
  147. }
  148. }
  149. },
  150. "208": {
  151. "description": "Already Reported"
  152. },
  153. "403": {
  154. "description": "Forbidden"
  155. },
  156. "404": {
  157. "description": "Not Found"
  158. }
  159. },
  160. "security": [
  161. {
  162. "auth_token": ["project:releases"]
  163. }
  164. ]
  165. }
  166. }