Assemble a Mobile Build

POST /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/preprodartifacts/assemble/

Assemble previously uploaded chunks into a mobile build, such as an APK, AAB or XCArchive, and queue it for size analysis.

Upload the build file's chunks with the chunk upload endpoint first. If chunks are missing, the response has the state not_found and lists them in missingChunks: upload them and send the request again. Once all chunks are there, the build is created, the response has the state created, and artifactUrl links to the build in Sentry.

Don't resend a request that succeeded: each successful request creates a build. Empty strings in optional fields count as not set. The VCS fields head_sha, head_repo_name and provider must be set together. provider must be one of github, github_enterprise, gitlab, bitbucket or bitbucket_server.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

project_id_or_slug (string)
REQUIRED

The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

Body Parameters

checksum (string)
REQUIRED

SHA-1 checksum of the whole build file.

chunks (array(string))
REQUIRED

SHA-1 checksums of the file's chunks, in order. Upload missing chunks with the chunk upload endpoint first.

build_configuration (string)

Name of the build configuration, such as Release or Debug.

release_notes (string)

Release notes to show with the build.

install_groups (array(string))

Install groups that can install the build.

head_sha (string)

SHA of the commit the build was made from.

base_sha (string)

SHA of the commit to compare against, such as the merge base of a pull request. Requires head_sha.

provider (string)

VCS provider of the repository, such as github.

head_repo_name (string)

Name of the repository the build was made from, such as owner/repo.

base_repo_name (string)

Name of the repository of the base commit, such as owner/repo.

head_ref (string)

Branch or ref the build was made from, such as feature/xyz.

base_ref (string)

Branch or ref of the base commit, such as main.

pr_number (integer)

Number of the pull request the build belongs to.

Scopes

<auth_token> requires one of the following scopes:
  • org:ci
  • project:admin
  • project:releases
  • project:write
Copied
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/preprodartifacts/assemble/ \
 -H 'Authorization: Bearer <auth_token>' \
 -H 'Content-Type: application/json' \
 -d '{}'
RESPONSESCHEMA
Copied
{ "state": "created", "missingChunks": [], "artifactUrl": "https://org-slug.sentry.io/preprod/size/123/" }
Was this helpful?