deploys.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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_slug",
  9. "in": "path",
  10. "description": "The 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_slug",
  70. "in": "path",
  71. "description": "The 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. },
  110. "dateStarted": {
  111. "type": "string",
  112. "format": "date-time",
  113. "description": "An optional date that indicates when the deploy started."
  114. },
  115. "dateFinished": {
  116. "type": "string",
  117. "format": "date-time",
  118. "description": "An optional date that indicates when the deploy ended. If not provided, the current time is used."
  119. }
  120. }
  121. },
  122. "example": {
  123. "environment": "prod"
  124. }
  125. }
  126. }
  127. },
  128. "responses": {
  129. "201": {
  130. "description": "Success",
  131. "content": {
  132. "application/json": {
  133. "schema": {
  134. "$ref": "../../components/schemas/releases/deploy.json#/Deploy"
  135. },
  136. "example": {
  137. "environment": "prod",
  138. "name": null,
  139. "url": null,
  140. "dateStarted": null,
  141. "dateFinished": "2020-08-31T19:40:38.651670Z",
  142. "id": "1234567"
  143. }
  144. }
  145. }
  146. },
  147. "208": {
  148. "description": "Already Reported"
  149. },
  150. "403": {
  151. "description": "Forbidden"
  152. },
  153. "404": {
  154. "description": "Not Found"
  155. }
  156. },
  157. "security": [
  158. {
  159. "auth_token": ["project:releases"]
  160. }
  161. ]
  162. }
  163. }