Link a Repository to a Project

POST /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/repo/

Link a repository to a project. The repository must already exist in the organization (connected via a VCS integration). Idempotent: returns 200 if the link already exists, 201 if created.

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.

Body Parameters

repositoryId (integer)
REQUIRED

The ID of the repository to link.

Scopes

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