Retrieve an Organization's Previous Release with Commits
GET /api/0/organizations/{organization_id_or_slug}/releases/{version}/previous-with-commits/
Return the most recent release with commits that was released at or before the given
release, in the same projects. The given release is returned when it has commits
itself. Pass project to narrow the search to some of the release's projects.
Returns an empty object when there's no such release, or when none of the requested
projects are accessible. firstEvent and lastEvent are always null.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
version(string)REQUIREDThe version identifier of the release
Query Parameters:
project(array(undefined))The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects.
-1is also accepted to include all accessible projects. For example, the following are valid parameters:/?project=1234&project=56789/?project=android&project=javascript-react/?project=-1
Scopes
You need to authenticate via bearer auth token.
<auth_token> requires one of the following scopes:org:ciproject:adminproject:readproject:releasesproject:write
Copied
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/releases/{version}/previous-with-commits/ \ -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied{ "id": 2, "version": "frontend@0.9.0", "shortVersion": "frontend@0.9.0", "status": "open", "versionInfo": { "package": "frontend", "version": { "raw": "1.0.0", "major": 1, "minor": 0, "patch": 0, "pre": null, "buildCode": null, "components": 3 }, "description": "1.0.0", "buildHash": null }, "ref": null, "url": null, "dateReleased": null, "dateCreated": "2024-01-01T00:00:00Z", "data": {}, "newGroups": 0, "owner": null, "commitCount": 1, "lastCommit": { "id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2", "message": "fix: handle empty release version", "dateCreated": "2024-01-01T00:00:00Z", "pullRequest": null, "suspectCommitType": "" }, "deployCount": 0, "lastDeploy": null, "authors": [], "projects": [ { "id": 1, "slug": "sentry", "name": "sentry", "newGroups": 0, "platform": "javascript", "platforms": [ "javascript" ], "hasHealthData": false } ], "firstEvent": null, "lastEvent": null, "currentProjectMeta": {}, "userAgent": null }
Was this helpful?