Observability
Update observability settings
Change how long a project's telemetry is kept (retention_days: 1, 3, 7, 14 or 30) and whether its apps on g1t.page send it (deployments; off keeps the tokens and history).
PATCH
/workspaces/{workspace}/projects/{project}/observability/settingsOnly what you give changes. Needs the Admin role.
retention_days is 1, 3, 7, 14 or 30. Turning deployments off stops the project’s apps on g1t.page from sending and keeps its tokens and history. Needs the Admin role.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool: None. Signing in is on the REST API only.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
project |
string | Yes | The project’s slug, as in g1t.sh/{workspace}/{project}. |
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
retention_days |
integer | No | Days requests, logs and spans are kept. One of 1, 3, 7, 14, 30. |
deployments |
boolean | No | Whether the project’s apps on g1t.page send telemetry. |
Example request
Section titled “Example request”curl -X PATCH https://api.g1t.sh/workspaces/flagon-io/projects/g1t/observability/settings \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "retention_days": 14 }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "retention_days": 14, "deployments": true}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 409 | conflict |
The request conflicts with the current state. |
| 422 | invalid |
The input is not valid. message says which field and why. |