List a Project's CODEOWNERS Configurations
GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/codeowners/
Return the CODEOWNERS configurations for a project.
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.
Query Parameters:
expand(array(string))- choices:
- codeMapping
- ownershipSyntax
Optional fields to expand.
Scopes
You need to authenticate via bearer auth token.
<auth_token> requires one of the following scopes:project:adminproject:readproject:write
Copied
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/codeowners/ \ -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied[ { "id": "42", "raw": "src/* user@example.com", "dateCreated": "2024-01-15T10:30:00Z", "dateUpdated": "2024-01-15T10:30:00Z", "dateSynced": "2024-01-15T10:30:00Z", "codeMappingId": "7", "provider": "github", "errors": { "missing_external_teams": [], "missing_external_users": [], "missing_user_emails": [], "teams_without_access": [], "users_without_access": [] }, "schema": { "$version": 1, "rules": [ { "matcher": { "type": "codeowners", "pattern": "src/*" }, "owners": [ { "type": "user", "id": "1", "name": "user@example.com" } ] } ] }, "codeOwnersUrl": "https://github.com/example/repository/blob/main/CODEOWNERS" } ]
Was this helpful?