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)REQUIREDThe ID or slug of the organization the resource belongs to.
project_id_or_slug(string)REQUIREDThe ID or slug of the project the resource belongs to. Project slugs are unique within each organization.
Body Parameters
repositoryId(integer)REQUIREDThe ID of the repository to link.
Scopes
You need to authenticate via bearer auth token.
<auth_token> requires one of the following scopes:project:adminproject: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?