Create or Update Organization Code Mappings in Bulk

POST /api/0/organizations/{organization_id_or_slug}/code-mappings/bulk/

Create or update multiple repository path mappings for a project. Mappings with matching project, stack root, and source root are updated.

Path Parameters

organization_id_or_slug (string)
REQUIRED

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

Body Parameters

project
REQUIRED

The ID or slug of the project to configure.

repository (string)
REQUIRED

The repository name as it appears in Sentry.

mappings (array(object))
REQUIRED

One or more stack-root and source-root mappings (maximum 300).

provider (string)

Optional repository provider used to disambiguate or find the repository. If no matching Sentry repository exists, the repository is created after the provider confirms it exists.

default_branch (string)

The repository branch to use; inferred from the integration when omitted.

Scopes

<auth_token> requires one of the following scopes:
  • org:admin
  • org:ci
  • org:integrations
  • org:read
  • org:write
Copied
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/code-mappings/bulk/ \
 -H 'Authorization: Bearer <auth_token>' \
 -H 'Content-Type: application/json' \
 -d '{}'
RESPONSESCHEMA
Copied
.
Was this helpful?