Saved metrics — named, org-scoped analytics pins (source + dimensions + config).
Every path is on https://app.concord.app.
- GET
/api/v1/saved-metricsList saved metrics - POST
/api/v1/saved-metricsCreate a saved metric - PATCH
/api/v1/saved-metrics/{id}Update a saved metric - DELETE
/api/v1/saved-metrics/{id}Delete a saved metric
GET/api/v1/saved-metrics
List saved metrics
Returns every saved metric in the caller's organization, newest first. Org-scoped: rows of other organizations are unreachable by RLS and by the explicit organization filter. A filter value the caller cannot open is returned as a token (@unopenable:…), never the value.
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource or operation |
404 | 404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable |
429 | 429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
POST/api/v1/saved-metrics
Create a saved metric
Creates a saved metric in the caller's organization. FAILS CLOSED on an unregistered analytics source, a dimension outside the source's whitelist, or a config whose dataSource and dimensions do not match the declared pin (L7-W6-b). A filter value the caller cannot open is returned as a token (@unopenable:…), never the value.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Request body
| Name | Type | Description |
|---|---|---|
namerequired | string | |
description | string, or null | |
sourcerequired | string | |
dimensionSetrequired | array of string | |
configrequired | object |
Responses
| Status | Description |
|---|---|
201 | OK |
400 | Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource or operation |
404 | 404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable |
429 | 429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
PATCH/api/v1/saved-metrics/{id}
Update a saved metric
Updates a saved metric in the caller's organization. When the patch touches the pin (source/dimensionSet/config), the MERGED candidate is re-pinned against the registration estate, so a patch that would leave the metric pointing at an unregistered source fails closed too (L7-W6-b). A filter value the caller cannot open is returned as a token (@unopenable:…), never the value.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | |
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Request body
| Name | Type | Description |
|---|---|---|
name | string | |
description | string, or null | |
source | string | |
dimensionSet | array of string | |
config | object |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource or operation |
404 | 404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable |
429 | 429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
DELETE/api/v1/saved-metrics/{id}
Delete a saved metric
Permanently deletes a saved metric in the caller's organization. Report widgets that were cut from it keep their copied config — the metric is a template, not a live link.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | |
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource or operation |
404 | 404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable |
429 | 429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |