Use this API to manage error tracking settings and client keys for a project.

These endpoints require the Maintainer or Owner role.

List all project client keys

GET /api/v4/projects/{id}/error_tracking/client_keys

Lists all integrated error tracking client keys for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Responses

CodeDescriptionSchema
200OKAPIEntitiesErrorTrackingClientKey
400Bad Request—
404Not Found—

Create a client key

POST /api/v4/projects/{id}/error_tracking/client_keys

Creates a client key for integrated error tracking in a specified project. The public key attribute is generated automatically.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesErrorTrackingClientKey
400Bad Request—
404Not Found—

Delete a client key

DELETE /api/v4/projects/{id}/error_tracking/client_keys/{key_id}

Deletes an integrated error tracking client key from a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user
key_id
Path, required
IntegerThe ID of the client key

Responses

CodeDescriptionSchema
200OKAPIEntitiesErrorTrackingClientKey
400Bad request—
401Unauthorized—
404Not found—

Retrieve Error Tracking settings for a project

GET /api/v4/projects/{id}/error_tracking/settings

Retrieves the Error Tracking settings for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Responses

CodeDescriptionSchema
200OKAPIEntitiesErrorTrackingProjectSetting
400Bad Request—
404Not Found—

Create Error Tracking settings for a project

PUT /api/v4/projects/{id}/error_tracking/settings

Creates Error Tracking settings for a specified project. You must have the Maintainer or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Request body (application/json)

PropertyTypeDescription
active
Required
BooleanPass true to enable the configured Error Tracking settings or false to disable it
integrated
Required
BooleanPass true to enable the integrated Error Tracking backend

Responses

CodeDescriptionSchema
200OKAPIEntitiesErrorTrackingProjectSetting
400Bad request—
401Unauthorized—
404Not found—

Update Error Tracking settings for a project

PATCH /api/v4/projects/{id}/error_tracking/settings

Updates Error Tracking settings for a specified project. You must have the Maintainer or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Request body (application/json)

PropertyTypeDescription
active
Required
BooleanPass true to enable the already configured Error Tracking settings or false to disable it
integratedBooleanPass true to enable the integrated Error Tracking backend. Available in GitLab 14.2 and later

Responses

CodeDescriptionSchema
200OKAPIEntitiesErrorTrackingProjectSetting
400Bad request—
401Unauthorized—
404Not found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesErrorTrackingClientKey

PropertyTypeDescription
activeBoolean—
idInteger (int64)Example: 1
public_keyStringExample: glet_aa77551d849c083f76d0bc545ed053a3
sentry_dsnStringExample: https://glet_aa77551d849c083f76d0bc545ed053a3@example.com/errortracking/api/v1/projects/5

APIEntitiesErrorTrackingProjectSetting

PropertyTypeDescription
activeBoolean—
api_urlStringExample: https://sentry.io/api/0/projects/myawesomeproject/project
integratedBoolean—
project_nameStringExample: sample sentry project
sentry_external_urlStringExample: https://sentry.io/myawesomeproject/project