Create an Organization Code Mapping

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

Create a repository path mapping for a project and installed integration.

Path Parameters

organization_id_or_slug (string)
REQUIRED

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

Body Parameters

repository_id (integer)
REQUIRED

The ID of a repository belonging to the installed integration.

project_id (integer)
REQUIRED

The ID of the project to associate with the code mapping.

stack_root (string)
REQUIRED

The path prefix to replace in stack trace filenames.

source_root (string)
REQUIRED

The repository path prefix to substitute for the stack trace prefix.

integration_id (integer)
REQUIRED

The ID of the installed integration that provides the repository.

default_branch (string)

The default branch to use when resolving source files. May be empty for Perforce.

Scopes

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