Create a New Release for an Organization¶
- POST /api/0/organizations/{organization_slug}/releases/
Create a new release for the given Organization. Releases are used by Sentry to improve its error reporting abilities by correlating first seen events with the release that might have introduced the problem. Releases are also necessary for sourcemaps and other debug features that require manual upload for functioning well.
Path Parameters: organization_slug (string) – the slug of the organization the release belongs to.
Parameters: - version (string) – a version identifier for this release. Can be a version number, a commit hash etc.
- ref (string) – an optional commit reference. This is useful if a tagged version has been provided.
- url (url) – a URL that points to the release. This can be the path to an online interface to the sourcecode for instance.
- projects (array) – a list of project slugs that are involved in this release
- dateReleased (datetime) – an optional date that indicates when the release went live. If not provided the current time is assumed.
- commits (array) – 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 includerepository
,message
,author_name
,author_email
, andtimestamp
. - refs (array) – an optional way to indicate the start and end commits
for each repository included in a release. Head commits
must include parameters
repository
andcommit
(the HEAD sha). They can optionally includepreviousCommit
(the sha of the HEAD of the previous release), which should be specified if this is the first time you’ve sent commit data.
Authentication: required
Method: POST
Path: /api/0/organizations/{organization_slug}/releases/
Example¶
POST /api/0/organizations/the-interstellar-jurisdiction/releases/ HTTP/1.1
Authorization: Basic ___ENCODED_API_KEY___
Host: app.getsentry.com
Content-Type: application/json
{
"version": "2.0rc2",
"ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
"projects": [
"pump-station"
]
}
HTTP/1.1 201 CREATED
Allow: GET, POST, HEAD, OPTIONS
Content-Language: en
Content-Length: 419
Content-Type: application/json
Vary: Accept-Language, Cookie
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{
"dateReleased": null,
"newGroups": 0,
"url": null,
"ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
"lastDeploy": null,
"deployCount": null,
"dateCreated": "2018-04-23T23:09:57.889Z",
"lastEvent": null,
"version": "2.0rc2",
"firstEvent": null,
"lastCommit": null,
"shortVersion": "2.0rc2",
"authors": [],
"owner": null,
"commitCount": null,
"data": {},
"projects": [
{
"name": "Pump Station",
"slug": "pump-station"
}
]
}