organization-release.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Return a release for a given organization.",
  5. "operationId": "Retrieve an Organization's Releases",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization the release belongs to.",
  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. "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
  33. },
  34. "example": {
  35. "authors": [],
  36. "commitCount": 0,
  37. "data": {},
  38. "dateCreated": "2018-11-06T21:20:08.033Z",
  39. "dateReleased": null,
  40. "deployCount": 0,
  41. "firstEvent": null,
  42. "lastCommit": null,
  43. "lastDeploy": null,
  44. "lastEvent": null,
  45. "newGroups": 0,
  46. "owner": null,
  47. "projects": [
  48. {
  49. "name": "Pump Station",
  50. "slug": "pump-station"
  51. }
  52. ],
  53. "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  54. "shortVersion": "2.0rc2",
  55. "url": null,
  56. "version": "2.0rc2"
  57. }
  58. }
  59. }
  60. },
  61. "403": {
  62. "description": "Forbidden"
  63. },
  64. "404": {
  65. "description": "Not Found"
  66. }
  67. },
  68. "security": [
  69. {
  70. "auth_token": ["project:releases"]
  71. }
  72. ]
  73. },
  74. "put": {
  75. "tags": ["Releases"],
  76. "description": "Update a release for a given organization.",
  77. "operationId": "Update an Organization's Release",
  78. "parameters": [
  79. {
  80. "name": "organization_slug",
  81. "in": "path",
  82. "description": "The slug of the organization the release belongs to.",
  83. "required": true,
  84. "schema": {
  85. "type": "string"
  86. }
  87. },
  88. {
  89. "name": "version",
  90. "in": "path",
  91. "description": "The version identifier of the release.",
  92. "required": true,
  93. "schema": {
  94. "type": "string"
  95. }
  96. }
  97. ],
  98. "requestBody": {
  99. "content": {
  100. "application/json": {
  101. "schema": {
  102. "type": "object",
  103. "properties": {
  104. "ref": {
  105. "type": "string",
  106. "description": "An optional commit reference. This is useful if a tagged version has been provided."
  107. },
  108. "url": {
  109. "type": "string",
  110. "description": "A URL that points to the release. This can be the path to an online interface to the source code for instance."
  111. },
  112. "dateReleased": {
  113. "type": "string",
  114. "format": "date-time",
  115. "description": "An optional date that indicates when the release went live. If not provided the current time is assumed."
  116. },
  117. "commits": {
  118. "type": "array",
  119. "items": {
  120. "type": "object"
  121. },
  122. "description": "An optional list of commit data to be associated with the release. Commits must include parameters `id` (the sha of the commit), and can optionally include `repository`, `message`, `author_name`, `author_email`, and `timestamp`."
  123. },
  124. "refs": {
  125. "type": "array",
  126. "items": {
  127. "type": "object"
  128. },
  129. "description": "An optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters `repository` and `commit` (the HEAD sha). They can optionally include `previousCommit` (the sha of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data."
  130. }
  131. }
  132. },
  133. "example": {
  134. "ref": "freshtofu",
  135. "url": "https://vcshub.invalid/user/project/refs/freshtofu"
  136. }
  137. }
  138. }
  139. },
  140. "responses": {
  141. "200": {
  142. "description": "Success",
  143. "content": {
  144. "application/json": {
  145. "schema": {
  146. "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
  147. },
  148. "example": {
  149. "authors": [],
  150. "commitCount": 0,
  151. "data": {},
  152. "dateCreated": "2019-01-03T00:12:55.109Z",
  153. "dateReleased": null,
  154. "deployCount": 0,
  155. "firstEvent": null,
  156. "lastCommit": null,
  157. "lastDeploy": null,
  158. "lastEvent": null,
  159. "newGroups": 0,
  160. "owner": null,
  161. "projects": [
  162. {
  163. "name": "Pump Station",
  164. "slug": "pump-station"
  165. }
  166. ],
  167. "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  168. "shortVersion": "2.0rc2",
  169. "url": null,
  170. "version": "2.0rc2"
  171. }
  172. }
  173. }
  174. },
  175. "403": {
  176. "description": "Forbidden"
  177. },
  178. "404": {
  179. "description": "Not Found"
  180. }
  181. },
  182. "security": [
  183. {
  184. "auth_token": ["project:releases"]
  185. }
  186. ]
  187. },
  188. "delete": {
  189. "tags": ["Releases"],
  190. "description": "Delete a release for a given organization.",
  191. "operationId": "Delete an Organization's Release",
  192. "parameters": [
  193. {
  194. "name": "organization_slug",
  195. "in": "path",
  196. "description": "The slug of the organization the release belongs to.",
  197. "required": true,
  198. "schema": {
  199. "type": "string"
  200. }
  201. },
  202. {
  203. "name": "version",
  204. "in": "path",
  205. "description": "The version identifier of the release.",
  206. "required": true,
  207. "schema": {
  208. "type": "string"
  209. }
  210. }
  211. ],
  212. "responses": {
  213. "204": {
  214. "description": "Success"
  215. }
  216. },
  217. "security": [
  218. {
  219. "auth_token": ["project:releases"]
  220. }
  221. ]
  222. }
  223. }