Returns the metric metadata of a metrics account by ID
GET/v1/metrics/prometheus/:accountId/api/v1/metadata
Runs against the metrics account given by accountId instead of the API token's own account, so it can be called with the API token of a logs account. The token's account must be one of the metrics account's authorized accounts, otherwise the request returns 401. To list the metrics accounts and their authorizedAccountsIds, use Get a list of all metrics accounts.
Returns the type, help text and unit of the metrics, keyed by metric name. Please ensure to change the region in the URL to match your account's region.
Request
Path Parameters
ID of the metrics account to query.
Query Parameters
Metric name to retrieve metadata for. Optional; metadata of all metrics is returned when omitted.
Maximum number of metrics to return. Optional.
Responses
- 200
- 400
- 401
- 500
Metadata of the metrics.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
Status of the request (e.g., success, fail).
data object
Metadata entries keyed by metric name.
property name* object[]
Metric type, such as counter, gauge, histogram or summary.
Help text of the metric.
Unit of the metric.
{
"status": "string",
"data": {}
}
Invalid request parameters.
The API token's account is not an authorized account of the metrics account accountId.
Internal server error.