2020-07-13 21:09:24 +00:00
---
stage: Monitor
2021-03-18 15:09:04 +00:00
group: Monitor
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-07-13 21:09:24 +00:00
---
2021-01-28 06:08:59 +00:00
# Error Tracking settings API **(FREE)**
2020-01-13 21:07:39 +00:00
2020-05-21 06:08:25 +00:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/34940) in GitLab 12.7.
2020-01-13 21:07:39 +00:00
## Error Tracking project settings
2020-07-24 21:09:16 +00:00
The project settings API allows you to retrieve the [Error Tracking ](../operations/error_tracking.md )
settings for a project. Only for project maintainers.
2020-01-13 21:07:39 +00:00
### Get Error Tracking settings
2020-02-27 09:09:01 +00:00
```plaintext
2020-01-13 21:07:39 +00:00
GET /projects/:id/error_tracking/settings
```
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
2021-06-28 15:08:03 +00:00
| `id` | integer | yes | The ID or [URL-encoded path of the project ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2020-01-13 21:07:39 +00:00
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/projects/1/error_tracking/settings"
2020-01-13 21:07:39 +00:00
```
Example response:
```json
{
2020-01-17 00:09:00 +00:00
"active": true,
2020-01-13 21:07:39 +00:00
"project_name": "sample sentry project",
"sentry_external_url": "https://sentry.io/myawesomeproject/project",
2021-08-17 06:08:59 +00:00
"api_url": "https://sentry.io/api/0/projects/myawesomeproject/project",
"integrated": false
2020-01-13 21:07:39 +00:00
}
```
2020-02-05 18:09:06 +00:00
### Enable or disable the Error Tracking project settings
The API allows you to enable or disable the Error Tracking settings for a project. Only for project maintainers.
2020-02-27 09:09:01 +00:00
```plaintext
2020-02-05 18:09:06 +00:00
PATCH /projects/:id/error_tracking/settings
```
2021-08-17 06:08:59 +00:00
| Attribute | Type | Required | Description |
| ------------ | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID or [URL-encoded path of the project ](index.md#namespaced-path-encoding ) owned by the authenticated user. |
| `active` | boolean | yes | Pass `true` to enable the already configured error tracking settings or `false` to disable it. |
| `integrated` | boolean | no | Pass `true` to enable the integrated error tracking backend. Available in [GitLab 14.2 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68260 ) and later. |
2020-02-05 18:09:06 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/projects/1/error_tracking/settings?active=true"
2020-02-05 18:09:06 +00:00
```
Example response:
```json
{
"active": true,
"project_name": "sample sentry project",
"sentry_external_url": "https://sentry.io/myawesomeproject/project",
2021-08-17 06:08:59 +00:00
"api_url": "https://sentry.io/api/0/projects/myawesomeproject/project",
"integrated": false
2020-02-05 18:09:06 +00:00
}
```