organization-releases.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Return a list of releases for a given organization.",
  5. "operationId": "List an Organization's Releases",
  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": "query",
  18. "in": "query",
  19. "description": "This parameter can be used to create a \"starts with\" filter for the version.",
  20. "schema": {
  21. "type": "string"
  22. }
  23. }
  24. ],
  25. "responses": {
  26. "200": {
  27. "description": "Success",
  28. "content": {
  29. "application/json": {
  30. "schema": {
  31. "type": "array",
  32. "items": {
  33. "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
  34. }
  35. },
  36. "example": [
  37. {
  38. "id": 2,
  39. "authors": [],
  40. "commitCount": 0,
  41. "data": {},
  42. "dateCreated": "2018-11-06T21:20:08.033Z",
  43. "dateReleased": null,
  44. "deployCount": 0,
  45. "firstEvent": null,
  46. "lastCommit": null,
  47. "lastDeploy": null,
  48. "lastEvent": null,
  49. "newGroups": 0,
  50. "owner": null,
  51. "projects": [
  52. {
  53. "name": "Pump Station",
  54. "slug": "pump-station"
  55. }
  56. ],
  57. "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  58. "shortVersion": "2.0rc2",
  59. "url": null,
  60. "version": "2.0rc2"
  61. },
  62. {
  63. "id": 1,
  64. "authors": [],
  65. "commitCount": 0,
  66. "data": {},
  67. "dateCreated": "2018-11-06T21:19:58.559Z",
  68. "dateReleased": null,
  69. "deployCount": 0,
  70. "firstEvent": "2018-11-06T21:19:58.639Z",
  71. "lastCommit": null,
  72. "lastDeploy": null,
  73. "lastEvent": "2018-11-06T21:19:58.639Z",
  74. "newGroups": 0,
  75. "owner": null,
  76. "projects": [
  77. {
  78. "name": "Prime Mover",
  79. "slug": "prime-mover"
  80. }
  81. ],
  82. "ref": null,
  83. "shortVersion": "2b6af31",
  84. "url": null,
  85. "version": "2b6af31b2edccc73a629108b17344dfe20858780"
  86. }
  87. ]
  88. }
  89. }
  90. },
  91. "401": {
  92. "description": "Permission Denied"
  93. },
  94. "403": {
  95. "description": "Forbidden"
  96. },
  97. "404": {
  98. "description": "Not Found"
  99. }
  100. },
  101. "security": [
  102. {
  103. "auth_token": ["project:releases"]
  104. }
  105. ]
  106. },
  107. "post": {
  108. "tags": ["Releases"],
  109. "description": "Create a new release for the given organization. Releases are used by\nSentry to improve its error reporting abilities by correlating\nfirst seen events with the release that might have introduced the\nproblem.\nReleases are also necessary for source maps and other debug features\nthat require manual upload for functioning well.",
  110. "operationId": "Create a New Release for an Organization",
  111. "parameters": [
  112. {
  113. "name": "organization_id_or_slug",
  114. "in": "path",
  115. "description": "The id or slug of the organization.",
  116. "required": true,
  117. "schema": {
  118. "type": "string"
  119. }
  120. }
  121. ],
  122. "requestBody": {
  123. "content": {
  124. "application/json": {
  125. "schema": {
  126. "type": "object",
  127. "required": ["version", "projects"],
  128. "properties": {
  129. "version": {
  130. "type": "string",
  131. "description": "A version identifier for this release. Can be a version number, a commit hash, etc."
  132. },
  133. "ref": {
  134. "type": "string",
  135. "description": "An optional commit reference. This is useful if a tagged version has been provided."
  136. },
  137. "url": {
  138. "type": "string",
  139. "description": "A URL that points to the release. This can be the path to an online interface to the source code for instance"
  140. },
  141. "projects": {
  142. "type": "array",
  143. "description": "A list of project slugs that are involved in this release.",
  144. "items": {
  145. "type": "string"
  146. }
  147. },
  148. "dateReleased": {
  149. "type": "string",
  150. "format": "date-time",
  151. "description": "An optional date that indicates when the release went live. If not provided the current time is assumed."
  152. },
  153. "commits": {
  154. "type": "array",
  155. "items": {
  156. "type": "object",
  157. "properties": {
  158. "patch_set": {
  159. "type": "array",
  160. "description": "A list of the files that have been changed in the commit. Specifying the patch_set is necessary to power suspect commits and suggested assignees.",
  161. "items": {
  162. "type": "object",
  163. "required": ["path", "type"],
  164. "properties": {
  165. "path": {
  166. "type": "string",
  167. "description": "The path to the file. Both forward and backward slashes are supported."
  168. },
  169. "type": {
  170. "type": "string",
  171. "enum": ["A", "M", "D"],
  172. "description": "The type of change that happened in the commit."
  173. }
  174. }
  175. }
  176. },
  177. "repository": {
  178. "type": "string",
  179. "description": "The full name of the repository the commit belongs to. If this field is not given Sentry will generate a name in the form: u'organization-<organization_id>' (i.e. if the organization id is 123, then the generated repository name will be u'organization-123)."
  180. },
  181. "author_name": {
  182. "type": "string",
  183. "description": "The name of the commit author."
  184. },
  185. "author_email": {
  186. "type": "string",
  187. "description": "The email of the commit author. The commit author's email is required to enable the suggested assignee feature."
  188. },
  189. "timestamp": {
  190. "type": "string",
  191. "format": "date-time",
  192. "description": "The commit timestamp is used to sort the commits given. If a timestamp is not included, the commits will remain sorted in the order given."
  193. },
  194. "message": {
  195. "type": "string",
  196. "description": "The commit message."
  197. },
  198. "id": {
  199. "type": "string",
  200. "description": "The commit ID (the commit SHA)."
  201. }
  202. }
  203. },
  204. "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`, `patch_set`, `author_name`, `author_email`, and `timestamp`."
  205. },
  206. "refs": {
  207. "type": "array",
  208. "items": {
  209. "type": "object",
  210. "properties": {
  211. "repository": {
  212. "type": "string",
  213. "description": "The full name of the repository the commit belongs to."
  214. },
  215. "commit": {
  216. "type": "string",
  217. "description": "The current release's commit."
  218. },
  219. "previousCommit": {
  220. "type": "string",
  221. "description": "The previous release's commit."
  222. }
  223. }
  224. },
  225. "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. `commit` may contain a range in the form of `previousCommit..commit`."
  226. }
  227. }
  228. },
  229. "example": {
  230. "version": "2.0rc2",
  231. "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  232. "projects": ["pump-station"]
  233. }
  234. }
  235. }
  236. },
  237. "responses": {
  238. "201": {
  239. "description": "Success",
  240. "content": {
  241. "application/json": {
  242. "schema": {
  243. "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
  244. },
  245. "example": {
  246. "id": 2,
  247. "authors": [],
  248. "commitCount": 0,
  249. "data": {},
  250. "dateCreated": "2019-01-03T00:12:55.109Z",
  251. "dateReleased": null,
  252. "deployCount": 0,
  253. "firstEvent": null,
  254. "lastCommit": null,
  255. "lastDeploy": null,
  256. "lastEvent": null,
  257. "newGroups": 0,
  258. "owner": null,
  259. "projects": [
  260. {
  261. "name": "Pump Station",
  262. "slug": "pump-station"
  263. }
  264. ],
  265. "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  266. "shortVersion": "2.0rc2",
  267. "url": null,
  268. "version": "2.0rc2"
  269. }
  270. }
  271. }
  272. },
  273. "400": {
  274. "description": "Bad Input"
  275. },
  276. "403": {
  277. "description": "Forbidden"
  278. }
  279. },
  280. "security": [
  281. {
  282. "auth_token": ["project:releases"]
  283. }
  284. ]
  285. }
  286. }