project-issues.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. {
  2. "get": {
  3. "tags": ["Events"],
  4. "description": "Return a list of issues (groups) bound to a project. All parameters are supplied as query string parameters. \n\n A default query of ``is:unresolved`` is applied. To return results with other statuses send an new query value (i.e. ``?query=`` for all results).\n\nThe ``statsPeriod`` parameter can be used to select the timeline stats which should be present. Possible values are: ``\"\"`` (disable),``\"24h\"``, ``\"14d\"``",
  5. "operationId": "List a Project's Issues",
  6. "parameters": [
  7. {
  8. "name": "organization_id_or_slug",
  9. "in": "path",
  10. "description": "The id or slug of the organization the issues belong to.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "project_id_or_slug",
  18. "in": "path",
  19. "description": "The id or slug of the project the issues belong to.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. },
  25. {
  26. "name": "statsPeriod",
  27. "in": "query",
  28. "description": "An optional stat period (can be one of `\"24h\"`, `\"14d\"`, and `\"\"`). If not provided, the API will return the max time period for the project (90 days for paid accounts, 30 days for free).",
  29. "schema": {
  30. "type": "string"
  31. }
  32. },
  33. {
  34. "name": "shortIdLookup",
  35. "in": "query",
  36. "description": "If this is set to true then short IDs are looked up by this function as well. This can cause the return value of the function to return an event issue of a different project which is why this is an opt-in. Set to 1 to enable.",
  37. "schema": {
  38. "type": "boolean"
  39. }
  40. },
  41. {
  42. "name": "query",
  43. "in": "query",
  44. "description": "An optional Sentry structured search query. If not provided an implied `\"is:unresolved\"` is assumed.",
  45. "schema": {
  46. "type": "string"
  47. }
  48. },
  49. {
  50. "$ref": "../../components/parameters/pagination-cursor.json#/PaginationCursor"
  51. }
  52. ],
  53. "responses": {
  54. "200": {
  55. "description": "Success",
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "type": "array",
  60. "items": {
  61. "$ref": "../../components/schemas/issue.json#/Issue"
  62. }
  63. },
  64. "example": [
  65. {
  66. "annotations": [],
  67. "assignedTo": null,
  68. "count": "1",
  69. "culprit": "raven.scripts.runner in main",
  70. "firstSeen": "2018-11-06T21:19:55Z",
  71. "hasSeen": false,
  72. "id": "1",
  73. "isBookmarked": false,
  74. "isPublic": false,
  75. "isSubscribed": true,
  76. "lastSeen": "2018-11-06T21:19:55Z",
  77. "level": "error",
  78. "logger": null,
  79. "metadata": {
  80. "title": "This is an example Python exception"
  81. },
  82. "numComments": 0,
  83. "permalink": "https://sentry.io/the-interstellar-jurisdiction/pump-station/issues/1/",
  84. "project": {
  85. "id": "2",
  86. "name": "Pump Station",
  87. "slug": "pump-station"
  88. },
  89. "shareId": null,
  90. "shortId": "PUMP-STATION-1",
  91. "stats": {
  92. "24h": [
  93. [1541455200.0, 473],
  94. [1541458800.0, 914],
  95. [1541462400.0, 991],
  96. [1541466000.0, 925],
  97. [1541469600.0, 881],
  98. [1541473200.0, 182],
  99. [1541476800.0, 490],
  100. [1541480400.0, 820],
  101. [1541484000.0, 322],
  102. [1541487600.0, 836],
  103. [1541491200.0, 565],
  104. [1541494800.0, 758],
  105. [1541498400.0, 880],
  106. [1541502000.0, 677],
  107. [1541505600.0, 381],
  108. [1541509200.0, 814],
  109. [1541512800.0, 329],
  110. [1541516400.0, 446],
  111. [1541520000.0, 731],
  112. [1541523600.0, 111],
  113. [1541527200.0, 926],
  114. [1541530800.0, 772],
  115. [1541534400.0, 400],
  116. [1541538000.0, 943]
  117. ]
  118. },
  119. "status": "unresolved",
  120. "statusDetails": {},
  121. "subscriptionDetails": null,
  122. "title": "This is an example Python exception",
  123. "type": "default",
  124. "userCount": 0
  125. }
  126. ]
  127. }
  128. }
  129. },
  130. "403": {
  131. "description": "Forbidden"
  132. }
  133. },
  134. "security": [
  135. {
  136. "auth_token": ["event:read"]
  137. }
  138. ]
  139. },
  140. "put": {
  141. "tags": ["Events"],
  142. "description": "Bulk mutate various attributes on issues. The list of issues to modify is given through the `id` query parameter. It is repeated for each issue that should be modified.\n\n- For non-status updates, the `id` query parameter is required.\n- For status updates, the `id` query parameter may be omitted\nfor a batch \"update all\" query.\n- An optional `status` query parameter may be used to restrict\nmutations to only events with the given status.\n\nThe following attributes can be modified and are supplied as JSON object in the body:\n\nIf any IDs are out of scope this operation will succeed without any data mutation.",
  143. "operationId": "Bulk Mutate a List of Issues",
  144. "parameters": [
  145. {
  146. "name": "organization_id_or_slug",
  147. "in": "path",
  148. "description": "The id or slug of the organization the issues belong to.",
  149. "required": true,
  150. "schema": {
  151. "type": "string"
  152. }
  153. },
  154. {
  155. "name": "project_id_or_slug",
  156. "in": "path",
  157. "description": "The id or slug of the project the issues belong to.",
  158. "required": true,
  159. "schema": {
  160. "type": "string"
  161. }
  162. },
  163. {
  164. "name": "id",
  165. "in": "query",
  166. "description": "A list of IDs of the issues to be mutated. This parameter shall be repeated for each issue. It is optional only if a status is mutated in which case an implicit update all is assumed.",
  167. "required": false,
  168. "schema": {
  169. "type": "integer"
  170. }
  171. },
  172. {
  173. "name": "status",
  174. "in": "query",
  175. "description": "Optionally limits the query to issues of the specified status. Valid values are `\"resolved\"`, `\"reprocessing\"`, `\"unresolved\"`, and `\"ignored\"`.",
  176. "required": false,
  177. "schema": {
  178. "type": "string"
  179. }
  180. }
  181. ],
  182. "requestBody": {
  183. "content": {
  184. "application/json": {
  185. "schema": {
  186. "type": "object",
  187. "properties": {
  188. "status": {
  189. "type": "string",
  190. "description": "The new status for the issues. Valid values are `\"resolved\"`, `\"resolvedInNextRelease\"`, `\"unresolved\"`, and `\"ignored\"`."
  191. },
  192. "statusDetails": {
  193. "type": "object",
  194. "properties": {
  195. "inRelease": {
  196. "type": "string"
  197. },
  198. "inNextRelease": {
  199. "type": "boolean"
  200. },
  201. "inCommit": {
  202. "type": "string"
  203. },
  204. "ignoreDuration": {
  205. "type": "integer"
  206. },
  207. "ignoreCount": {
  208. "type": "integer"
  209. },
  210. "ignoreWindow": {
  211. "type": "integer"
  212. },
  213. "ignoreUserCount": {
  214. "type": "integer"
  215. },
  216. "ignoreUserWindow": {
  217. "type": "integer"
  218. }
  219. },
  220. "description": "Additional details about the resolution. Valid values are `\"inRelease\"`, `\"inNextRelease\"`, `\"inCommit\"`, `\"ignoreDuration\"`, `\"ignoreCount\"`, `\"ignoreWindow\"`, `\"ignoreUserCount\"`, and `\"ignoreUserWindow\"`."
  221. },
  222. "ignoreDuration": {
  223. "type": "integer",
  224. "description": "The number of minutes to ignore this issue."
  225. },
  226. "isPublic": {
  227. "type": "boolean",
  228. "description": "Sets the issue to public or private."
  229. },
  230. "merge": {
  231. "type": "boolean",
  232. "description": "Allows to merge or unmerge different issues."
  233. },
  234. "assignedTo": {
  235. "type": "string",
  236. "description": "The actor ID (or username) of the user or team that should be assigned to this issue."
  237. },
  238. "hasSeen": {
  239. "type": "boolean",
  240. "description": "In case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event."
  241. },
  242. "isBookmarked": {
  243. "type": "boolean",
  244. "description": "In case this API call is invoked with a user context this allows changing of the bookmark flag."
  245. }
  246. }
  247. },
  248. "example": {
  249. "isPublic": false,
  250. "status": "unresolved"
  251. }
  252. }
  253. },
  254. "required": true
  255. },
  256. "responses": {
  257. "200": {
  258. "description": "Success",
  259. "content": {
  260. "application/json": {
  261. "schema": {
  262. "type": "object",
  263. "required": ["isPublic", "status", "statusDetails"],
  264. "properties": {
  265. "isPublic": {
  266. "type": "boolean"
  267. },
  268. "status": {
  269. "type": "string",
  270. "enum": ["resolved", "unresolved", "ignored"]
  271. },
  272. "statusDetails": {
  273. "type": "object"
  274. }
  275. }
  276. },
  277. "example": {
  278. "isPublic": false,
  279. "status": "unresolved",
  280. "statusDetails": {}
  281. }
  282. }
  283. }
  284. },
  285. "400": {
  286. "description": "Bad Input"
  287. },
  288. "403": {
  289. "description": "Forbidden"
  290. },
  291. "404": {
  292. "description": "The requested resource does not exist"
  293. }
  294. },
  295. "security": [
  296. {
  297. "auth_token": ["event:write"]
  298. }
  299. ]
  300. },
  301. "delete": {
  302. "tags": ["Events"],
  303. "description": "Permanently remove the given issues. The list of issues to modify is given through the `id` query parameter. It is repeated for each issue that should be removed.\n\nOnly queries by 'id' are accepted.\n\nIf any IDs are out of scope this operation will succeed without any data mutation.",
  304. "operationId": "Bulk Remove a List of Issues",
  305. "parameters": [
  306. {
  307. "name": "organization_id_or_slug",
  308. "in": "path",
  309. "description": "The id or slug of the organization the issues belong to.",
  310. "required": true,
  311. "schema": {
  312. "type": "string"
  313. }
  314. },
  315. {
  316. "name": "project_id_or_slug",
  317. "in": "path",
  318. "description": "The id or slug of the project the issues belong to.",
  319. "required": true,
  320. "schema": {
  321. "type": "string"
  322. }
  323. },
  324. {
  325. "name": "id",
  326. "in": "query",
  327. "description": "A list of IDs of the issues to be removed. This parameter shall be repeated for each issue, e.g. `?id=1&id=2&id=3`. If this parameter is not provided, it will attempt to remove the first 1000 issues.",
  328. "schema": {
  329. "type": "integer"
  330. }
  331. }
  332. ],
  333. "responses": {
  334. "204": {
  335. "description": "Success"
  336. },
  337. "403": {
  338. "description": "Forbidden"
  339. },
  340. "404": {
  341. "description": "Project not found"
  342. }
  343. },
  344. "security": [
  345. {
  346. "auth_token": ["event:admin"]
  347. }
  348. ]
  349. }
  350. }