organization-release.json 6.5 KB

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