openapi.json 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. {
  2. "openapi": "3.0.1",
  3. "info": {
  4. "title": "API Reference",
  5. "description": "Sentry Public API",
  6. "termsOfService": "http://sentry.io/terms/",
  7. "contact": {
  8. "email": "partners@sentry.io"
  9. },
  10. "license": {
  11. "name": "Apache 2.0",
  12. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  13. },
  14. "version": "v0"
  15. },
  16. "servers": [
  17. {
  18. "url": "https://sentry.io/"
  19. }
  20. ],
  21. "tags": [
  22. {
  23. "name": "Teams",
  24. "description": "Endpoints for teams",
  25. "x-display-description": false,
  26. "externalDocs": {
  27. "description": "Found an error? Let us know.",
  28. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/teams/&template=api_error_template.md"
  29. }
  30. },
  31. {
  32. "name": "Organizations",
  33. "description": "Endpoints for organizations",
  34. "x-display-description": false,
  35. "externalDocs": {
  36. "description": "Found an error? Let us know.",
  37. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/organizations/&template=api_error_template.md"
  38. }
  39. },
  40. {
  41. "name": "Projects",
  42. "description": "Endpoints for projects",
  43. "x-display-description": false,
  44. "externalDocs": {
  45. "description": "Found an error? Let us know.",
  46. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/projects/&template=api_error_template.md"
  47. }
  48. },
  49. {
  50. "name": "Events",
  51. "x-sidebar-name": "Events & Issues",
  52. "description": "Endpoints for events and issues",
  53. "x-display-description": false,
  54. "externalDocs": {
  55. "description": "Found an error? Let us know.",
  56. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/events/&template=api_error_template.md"
  57. }
  58. },
  59. {
  60. "name": "Releases",
  61. "description": "Endpoints for releases",
  62. "x-display-description": false,
  63. "externalDocs": {
  64. "description": "Found an error? Let us know.",
  65. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/releases/&template=api_error_template.md"
  66. }
  67. },
  68. {
  69. "name": "Integration",
  70. "x-sidebar-name": "Integration Platform",
  71. "description": "Endpoints for the integration platform",
  72. "x-display-description": false,
  73. "externalDocs": {
  74. "description": "Found an error? Let us know.",
  75. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/integration-platform/&template=api_error_template.md"
  76. }
  77. },
  78. {
  79. "name": "SCIM",
  80. "x-sidebar-name": "SCIM",
  81. "description": "System for Cross-Domain Identity Management ([SCIM](http://www.simplecloud.info/)) is a standard implemented by Identity Providers and applications in order to facilitate federated identity management. Through these APIs you can add and delete members as well as teams. Sentry SaaS customers must be on a Business Plan with SAML2 Enabled. SCIM uses a bearer token for authentication that is created when SCIM is enabled. For how to enable SCIM, see our docs [here](/product/accounts/sso/#scim-provisioning).\n Sentry's SCIM API does not currently support syncing passwords, or setting any User attributes other than `active`.",
  82. "x-display-description": true,
  83. "externalDocs": {
  84. "description": "Found an error? Let us know.",
  85. "url": "https://github.com/getsentry/sentry-docs/issues/new/?title=API%20Documentation%20Error:%20/api/integration-platform/&template=api_error_template.md"
  86. }
  87. }
  88. ],
  89. "paths": {
  90. "/api/0/organizations/{organization_slug}/teams/": {
  91. "$ref": "paths/teams/index.json"
  92. },
  93. "/api/0/teams/{organization_slug}/{team_slug}/": {
  94. "$ref": "paths/teams/by-slug.json"
  95. },
  96. "/api/0/teams/{organization_slug}/{team_slug}/projects/": {
  97. "$ref": "paths/teams/projects.json"
  98. },
  99. "/api/0/teams/{organization_slug}/{team_slug}/stats/": {
  100. "$ref": "paths/teams/stats.json"
  101. },
  102. "/api/0/organizations/": {
  103. "$ref": "paths/organizations/index.json"
  104. },
  105. "/api/0/organizations/{organization_slug}/eventids/{event_id}/": {
  106. "$ref": "paths/organizations/event-id-lookup.json"
  107. },
  108. "/api/0/organizations/{organization_slug}/": {
  109. "$ref": "paths/organizations/details.json"
  110. },
  111. "/api/0/organizations/{organization_slug}/repos/": {
  112. "$ref": "paths/organizations/repos.json"
  113. },
  114. "/api/0/organizations/{organization_slug}/repos/{repo_id}/commits/": {
  115. "$ref": "paths/organizations/repo-commits.json"
  116. },
  117. "/api/0/organizations/{organization_slug}/stats/": {
  118. "$ref": "paths/organizations/stats.json"
  119. },
  120. "/api/0/organizations/{organization_slug}/sessions/": {
  121. "$ref": "paths/releases/sessions.json"
  122. },
  123. "/api/0/organizations/{organization_slug}/users/": {
  124. "$ref": "paths/organizations/users.json"
  125. },
  126. "/api/0/organizations/{organization_slug}/shortids/{short_id}/": {
  127. "$ref": "paths/organizations/shortid.json"
  128. },
  129. "/api/0/projects/": {
  130. "$ref": "paths/projects/index.json"
  131. },
  132. "/api/0/projects/{organization_slug}/{project_slug}/": {
  133. "$ref": "paths/projects/details.json"
  134. },
  135. "/api/0/projects/{organization_slug}/{project_slug}/files/dsyms/": {
  136. "$ref": "paths/projects/dsyms.json"
  137. },
  138. "/api/0/projects/{organization_slug}/{project_slug}/users/": {
  139. "$ref": "paths/projects/users.json"
  140. },
  141. "/api/0/projects/{organization_slug}/{project_slug}/tags/{key}/values/": {
  142. "$ref": "paths/projects/tag-values.json"
  143. },
  144. "/api/0/projects/{organization_slug}/{project_slug}/stats/": {
  145. "$ref": "paths/projects/stats.json"
  146. },
  147. "/api/0/projects/{organization_slug}/{project_slug}/user-feedback/": {
  148. "$ref": "paths/projects/user-feedback.json"
  149. },
  150. "/api/0/projects/{organization_slug}/{project_slug}/keys/": {
  151. "$ref": "paths/projects/keys.json"
  152. },
  153. "/api/0/projects/{organization_slug}/{project_slug}/keys/{key_id}/": {
  154. "$ref": "paths/projects/key-details.json"
  155. },
  156. "/api/0/projects/{organization_slug}/{project_slug}/hooks/": {
  157. "$ref": "paths/projects/service-hooks.json"
  158. },
  159. "/api/0/projects/{organization_slug}/{project_slug}/hooks/{hook_id}/": {
  160. "$ref": "paths/projects/service-hook-details.json"
  161. },
  162. "/api/0/projects/{organization_slug}/{project_slug}/events/{event_id}/": {
  163. "$ref": "paths/events/project-event-details.json"
  164. },
  165. "/api/0/projects/{organization_slug}/{project_slug}/events/": {
  166. "$ref": "paths/events/project-events.json"
  167. },
  168. "/api/0/projects/{organization_slug}/{project_slug}/issues/": {
  169. "$ref": "paths/events/project-issues.json"
  170. },
  171. "/api/0/issues/{issue_id}/tags/{key}/values/": {
  172. "$ref": "paths/events/tag-values.json"
  173. },
  174. "/api/0/issues/{issue_id}/tags/{key}/": {
  175. "$ref": "paths/events/tag-details.json"
  176. },
  177. "/api/0/issues/{issue_id}/hashes/": {
  178. "$ref": "paths/events/issue-hashes.json"
  179. },
  180. "/api/0/issues/{issue_id}/events/oldest/": {
  181. "$ref": "paths/events/oldest-event.json"
  182. },
  183. "/api/0/issues/{issue_id}/events/latest/": {
  184. "$ref": "paths/events/latest-event.json"
  185. },
  186. "/api/0/issues/{issue_id}/events/": {
  187. "$ref": "paths/events/issue-events.json"
  188. },
  189. "/api/0/issues/{issue_id}/": {
  190. "$ref": "paths/events/issue-details.json"
  191. },
  192. "/api/0/organizations/{organization_slug}/releases/": {
  193. "$ref": "paths/releases/organization-releases.json"
  194. },
  195. "/api/0/organizations/{organization_slug}/releases/{version}/": {
  196. "$ref": "paths/releases/organization-release.json"
  197. },
  198. "/api/0/organizations/{organization_slug}/releases/{version}/files/": {
  199. "$ref": "paths/releases/release-files.json"
  200. },
  201. "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/files/": {
  202. "$ref": "paths/releases/project-release-files.json"
  203. },
  204. "/api/0/organizations/{organization_slug}/releases/{version}/files/{file_id}/": {
  205. "$ref": "paths/releases/release-file.json"
  206. },
  207. "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/files/{file_id}/": {
  208. "$ref": "paths/releases/project-release-file.json"
  209. },
  210. "/api/0/organizations/{organization_slug}/releases/{version}/commits/": {
  211. "$ref": "paths/releases/organization-release-commits.json"
  212. },
  213. "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/commits/": {
  214. "$ref": "paths/releases/project-release-commits.json"
  215. },
  216. "/api/0/organizations/{organization_slug}/releases/{version}/commitfiles/": {
  217. "$ref": "paths/releases/organization-release-commit-files.json"
  218. },
  219. "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/resolved/": {
  220. "$ref": "paths/releases/project-issues-resolved-in-release.json"
  221. },
  222. "/api/0/organizations/{organization_slug}/releases/{version}/deploys/": {
  223. "$ref": "paths/releases/deploys.json"
  224. },
  225. "/api/0/organizations/{organization_slug}/sentry-app-installations/": {
  226. "$ref": "paths/integration-platform/sentry-app-installations.json"
  227. },
  228. "/api/0/sentry-app-installations/{uuid}/external-issues/": {
  229. "$ref": "paths/integration-platform/sentry-app-external-issues.json"
  230. },
  231. "/api/0/sentry-app-installations/{uuid}/external-issues/{external_issue_id}/": {
  232. "$ref": "paths/integration-platform/sentry-app-external-issue-details.json"
  233. },
  234. "/api/0/organizations/{organization_slug}/scim/v2/Groups": {
  235. "$ref": "paths/scim/team_index.json"
  236. },
  237. "/api/0/organizations/{organization_slug}/monitors/{monitor_id}/checkins/": {
  238. "get": {
  239. "operationId": "Retrieve check-ins for a monitor",
  240. "description": "Retrieve a list of check-ins for a monitor",
  241. "parameters": [
  242. {
  243. "in": "path",
  244. "name": "organization_slug",
  245. "schema": {
  246. "type": "string"
  247. },
  248. "description": "The slug of the organization the resource belongs to.",
  249. "required": true
  250. },
  251. {
  252. "in": "path",
  253. "name": "monitor_id",
  254. "schema": {
  255. "type": "string",
  256. "format": "uuid"
  257. },
  258. "description": "The id of the monitor",
  259. "required": true
  260. },
  261. {
  262. "in": "path",
  263. "name": "checkin_id",
  264. "schema": {
  265. "type": "string",
  266. "format": "uuid"
  267. },
  268. "description": "The id of the check-in",
  269. "required": true
  270. }
  271. ],
  272. "tags": ["Crons"],
  273. "security": [
  274. {
  275. "auth_token": ["project:admin", "project:read", "project:write"]
  276. }
  277. ],
  278. "responses": {
  279. "200": {
  280. "content": {
  281. "application/json": {
  282. "schema": {
  283. "type": "array",
  284. "items": {
  285. "type": "object",
  286. "properties": {
  287. "id": {
  288. "type": "string"
  289. },
  290. "status": {
  291. "type": "string"
  292. },
  293. "duration": {
  294. "type": "integer"
  295. },
  296. "dateCreated": {
  297. "type": "string",
  298. "format": "date-time"
  299. },
  300. "attachmentId": {
  301. "type": "string"
  302. }
  303. },
  304. "required": [
  305. "attachmentId",
  306. "dateCreated",
  307. "duration",
  308. "id",
  309. "status"
  310. ]
  311. }
  312. }
  313. }
  314. },
  315. "description": ""
  316. },
  317. "401": {
  318. "description": "Unauthorized"
  319. },
  320. "403": {
  321. "description": "Forbidden"
  322. },
  323. "404": {
  324. "description": "Not Found"
  325. }
  326. }
  327. },
  328. "post": {
  329. "operationId": "Create a new check-in",
  330. "description": "Creates a new check-in for a monitor.\n\nIf `status` is not present, it will be assumed that the check-in is starting, and be marked as `in_progress`.\n\nTo achieve a ping-like behavior, you can simply define `status` and optionally `duration` and\nthis check-in will be automatically marked as finished.\n\nNote: If a DSN is utilized for authentication, the response will be limited in details.",
  331. "parameters": [
  332. {
  333. "in": "path",
  334. "name": "organization_slug",
  335. "schema": {
  336. "type": "string"
  337. },
  338. "description": "The slug of the organization the resource belongs to.",
  339. "required": true
  340. },
  341. {
  342. "in": "path",
  343. "name": "monitor_id",
  344. "schema": {
  345. "type": "string",
  346. "format": "uuid"
  347. },
  348. "description": "The id of the monitor",
  349. "required": true
  350. }
  351. ],
  352. "tags": ["Crons"],
  353. "requestBody": {
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "type": "object",
  358. "properties": {
  359. "status": {
  360. "enum": ["ok", "error", "in_progress"],
  361. "type": "string"
  362. },
  363. "duration": {
  364. "type": "integer",
  365. "nullable": true
  366. },
  367. "environment": {
  368. "type": "string",
  369. "nullable": true
  370. }
  371. },
  372. "required": ["status"]
  373. }
  374. }
  375. },
  376. "required": true
  377. },
  378. "security": [
  379. {
  380. "auth_token": ["project:admin", "project:read", "project:write"]
  381. }
  382. ],
  383. "responses": {
  384. "200": {
  385. "content": {
  386. "application/json": {
  387. "schema": {
  388. "type": "object",
  389. "properties": {
  390. "id": {
  391. "type": "string"
  392. },
  393. "status": {
  394. "type": "string"
  395. },
  396. "duration": {
  397. "type": "integer"
  398. },
  399. "dateCreated": {
  400. "type": "string",
  401. "format": "date-time"
  402. },
  403. "attachmentId": {
  404. "type": "string"
  405. }
  406. },
  407. "required": ["attachmentId", "dateCreated", "duration", "id", "status"]
  408. }
  409. }
  410. },
  411. "description": ""
  412. },
  413. "201": {
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "type": "object",
  418. "properties": {
  419. "id": {
  420. "type": "string"
  421. },
  422. "status": {
  423. "type": "string"
  424. },
  425. "duration": {
  426. "type": "integer"
  427. },
  428. "dateCreated": {
  429. "type": "string",
  430. "format": "date-time"
  431. },
  432. "attachmentId": {
  433. "type": "string"
  434. }
  435. },
  436. "required": ["attachmentId", "dateCreated", "duration", "id", "status"]
  437. }
  438. }
  439. },
  440. "description": ""
  441. },
  442. "400": {
  443. "description": "Bad Request"
  444. },
  445. "401": {
  446. "description": "Unauthorized"
  447. },
  448. "403": {
  449. "description": "Forbidden"
  450. },
  451. "404": {
  452. "description": "Not Found"
  453. }
  454. }
  455. }
  456. },
  457. "/api/0/organizations/{organization_slug}/monitors/{monitor_id}/checkins/{checkin_id}/": {
  458. "put": {
  459. "operationId": "Update a check-in",
  460. "description": "Updates a check-in.\n\nOnce a check-in is finished (indicated via an `ok` or `error` status) it can no longer be changed.\n\nIf you simply wish to update that the task is still running, you can simply send an empty payload.\n\nYou may use `latest` for the `checkin_id` parameter in order to retrieve\nthe most recent (by creation date) check-in which is still mutable (not marked as finished).",
  461. "parameters": [
  462. {
  463. "in": "path",
  464. "name": "organization_slug",
  465. "schema": {
  466. "type": "string"
  467. },
  468. "description": "The slug of the organization the resource belongs to.",
  469. "required": true
  470. },
  471. {
  472. "in": "path",
  473. "name": "monitor_id",
  474. "schema": {
  475. "type": "string",
  476. "format": "uuid"
  477. },
  478. "description": "The id of the monitor",
  479. "required": true
  480. },
  481. {
  482. "in": "path",
  483. "name": "checkin_id",
  484. "schema": {
  485. "type": "string",
  486. "format": "uuid"
  487. },
  488. "description": "The id of the check-in",
  489. "required": true
  490. }
  491. ],
  492. "tags": ["Crons"],
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "status": {
  500. "enum": ["ok", "error", "in_progress"],
  501. "type": "string"
  502. },
  503. "duration": {
  504. "type": "integer",
  505. "nullable": true
  506. },
  507. "environment": {
  508. "type": "string",
  509. "nullable": true
  510. }
  511. },
  512. "required": ["status"]
  513. }
  514. }
  515. },
  516. "required": true
  517. },
  518. "security": [
  519. {
  520. "auth_token": ["project:admin", "project:read", "project:write"]
  521. }
  522. ],
  523. "responses": {
  524. "200": {
  525. "content": {
  526. "application/json": {
  527. "schema": {
  528. "type": "object",
  529. "properties": {
  530. "id": {
  531. "type": "string"
  532. },
  533. "status": {
  534. "type": "string"
  535. },
  536. "duration": {
  537. "type": "integer"
  538. },
  539. "dateCreated": {
  540. "type": "string",
  541. "format": "date-time"
  542. },
  543. "attachmentId": {
  544. "type": "string"
  545. }
  546. },
  547. "required": ["attachmentId", "dateCreated", "duration", "id", "status"]
  548. }
  549. }
  550. },
  551. "description": ""
  552. },
  553. "208": {
  554. "description": "Already Reported"
  555. },
  556. "400": {
  557. "description": "Bad Request"
  558. },
  559. "401": {
  560. "description": "Unauthorized"
  561. },
  562. "403": {
  563. "description": "Forbidden"
  564. },
  565. "404": {
  566. "description": "Not Found"
  567. }
  568. }
  569. }
  570. }
  571. },
  572. "components": {
  573. "securitySchemes": {
  574. "auth_token": {
  575. "type": "http",
  576. "scheme": "bearer"
  577. },
  578. "dsn": {
  579. "type": "http",
  580. "scheme": "DSN"
  581. }
  582. },
  583. "schemas": {
  584. "CheckInList__deleted": {
  585. "type": "array",
  586. "items": {
  587. "type": "object",
  588. "properties": {
  589. "id": {
  590. "type": "string"
  591. },
  592. "status": {
  593. "type": "string"
  594. },
  595. "duration": {
  596. "type": "integer"
  597. },
  598. "dateCreated": {
  599. "type": "string",
  600. "format": "date-time"
  601. },
  602. "attachmentId": {
  603. "type": "string"
  604. }
  605. },
  606. "required": ["attachmentId", "dateCreated", "duration", "id", "status"]
  607. }
  608. },
  609. "MonitorCheckIn__deleted": {
  610. "type": "object",
  611. "properties": {
  612. "id": {
  613. "type": "string"
  614. },
  615. "status": {
  616. "type": "string"
  617. },
  618. "duration": {
  619. "type": "integer"
  620. },
  621. "dateCreated": {
  622. "type": "string",
  623. "format": "date-time"
  624. },
  625. "attachmentId": {
  626. "type": "string"
  627. }
  628. },
  629. "required": ["attachmentId", "dateCreated", "duration", "id", "status"]
  630. },
  631. "MonitorCheckInValidator__deleted": {
  632. "type": "object",
  633. "properties": {
  634. "status": {
  635. "enum": ["ok", "error", "in_progress"],
  636. "type": "string"
  637. },
  638. "duration": {
  639. "type": "integer",
  640. "nullable": true
  641. },
  642. "environment": {
  643. "type": "string",
  644. "nullable": true
  645. }
  646. },
  647. "required": ["status"]
  648. }
  649. }
  650. }
  651. }