Skip to main content
POST
Report a deployment
Preview
This endpoint is part of Post-Deploy Verifications, in preview for select pilot organizations. Other organizations receive 403.
Report each successful deployment from the pipeline. Gitar identifies the PRs it shipped and checks their production logs on the check schedule.

Prerequisites

Example

Repository owner and name

Set repo_owner and repo_name using the code host’s identifiers: For example, the GitLab project gitlab.com/acme/platform/worker has repo_owner acme/platform and repo_name worker. See the setup guide for GitHub Actions and GitLab CI examples.

Errors

Retrying with the same sha as the latest deployment in the stream returns that deployment rather than recording a new one, so a pipeline can retry safely.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

One deployment of one repository to one environment.

environment
string
required

Environment the deployment went to. Each environment keeps its own history.

Example:

"production"

repo_name
string
required

Repository name on the code host. On GitLab this is the project path, and on Bitbucket the repository slug.

Example:

"worker"

repo_owner
string
required

Repository owner on the code host: the GitHub organization or user, the full GitLab namespace path including subgroups, the Bitbucket Cloud workspace slug, the Bitbucket Data Center project key, the Azure DevOps organization, or the CodeCommit AWS account ID.

Example:

"acme"

service
string
required

Service that was deployed, one of those configured in the repository's post-deploy settings. Each service keeps its own history, and only pull requests Gitar tagged with it are verified.

Example:

"worker"

sha
string
required

Commit that was deployed.

Example:

"4d81e07"

base_sha
string | null

Measure from this commit rather than the previous deployment Gitar recorded.

Example:

"9f2c1ab"

deployed_at
string<date-time> | null

When the deployment went out, RFC 3339 with an offset. Defaults to the time of this call.

Example:

"2026-01-01T12:00:00Z"

Response

Deployment recorded and its pull requests queued for verification

A recorded deployment and the pull requests it will verify.

deployment_id
string
required
queued
object[]
required
range_source
enum<string>
required

How a deploy's pull requests were worked out.

Available options:
baseline,
compare,
merged_at_window,
override,
explicit