A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.gitlab.com/api/error_tracking/ below:

Error Tracking API | GitLab Docs

Use this API to interact with the Error Tracking feature for projects. For more information, see Error Tracking.

Prerequisites:

Get Error Tracking settings

Gets the Error Tracking settings for a specified project.

GET /projects/:id/error_tracking/settings
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/error_tracking/settings"

Example response:

{
  "active": true,
  "project_name": "sample sentry project",
  "sentry_external_url": "https://sentry.io/myawesomeproject/project",
  "api_url": "https://sentry.io/api/0/projects/myawesomeproject/project",
  "integrated": false
}
Create Error Tracking settings

History

Creates Error Tracking settings for a specified project.

This API is only available when used with integrated error tracking.

PUT /projects/:id/error_tracking/settings

Supported attributes:

Attribute Type Required Description id integer yes The ID or URL-encoded path of the project. active boolean yes Pass true to enable the error tracking setting configuration or false to disable it. integrated boolean yes Pass true to enable the integrated error tracking backend.

Example request:

curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/error_tracking/settings?active=true&integrated=true"

Example response:

{
  "active": true,
  "project_name": null,
  "sentry_external_url": null,
  "api_url": null,
  "integrated": true
}
Activate the Error Tracking project settings

Activates or deactivates Error Tracking settings for a specified project.

PATCH /projects/:id/error_tracking/settings
Attribute Type Required Description id integer yes The ID or URL-encoded path of the project. 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.
curl --request PATCH --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/error_tracking/settings?active=true"

Example response:

{
  "active": true,
  "project_name": "sample sentry project",
  "sentry_external_url": "https://sentry.io/myawesomeproject/project",
  "api_url": "https://sentry.io/api/0/projects/myawesomeproject/project",
  "integrated": false
}
List all project client keys

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

GET /projects/:id/error_tracking/client_keys
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/5/error_tracking/client_keys"

Example response:

[
  {
    "id": 1,
    "active": true,
    "public_key": "glet_aa77551d849c083f76d0bc545ed053a3",
    "sentry_dsn": "https://glet_aa77551d849c083f76d0bc545ed053a3@example.com/errortracking/api/v1/projects/5"
  },
  {
    "id": 3,
    "active": true,
    "public_key": "glet_0ff98b1d849c083f76d0bc545ed053a3",
    "sentry_dsn": "https://glet_aa77551d849c083f76d0bc545ed053a3@example.com/errortracking/api/v1/projects/5"
  }
]
Create a client key

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

POST /projects/:id/error_tracking/client_keys
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --url "https://gitlab.example.com/api/v4/projects/5/error_tracking/client_keys"

Example response:

{
  "id": 3,
  "active": true,
  "public_key": "glet_0ff98b1d849c083f76d0bc545ed053a3",
  "sentry_dsn": "https://glet_aa77551d849c083f76d0bc545ed053a3@example.com/errortracking/api/v1/projects/5"
}
Delete a client key

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

DELETE /projects/:id/error_tracking/client_keys/:key_id
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/5/error_tracking/client_keys/13"

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4