public.customMetrics.view
const url = 'https://rest.watchtower15.com/v1/custom-metrics/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://rest.watchtower15.com/v1/custom-metrics/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”CustomMetricsViewResource
object
object
The metric’s description; null for none.
The key a publisher sends the metric under.
count sums events per step, level is a gauge.
The aggregations an alarm on this metric may use, from its type.
One of unknown, healthy, warning, critical.
Epoch milliseconds: when a point last arrived; null if none ever did.
Whether the metric is switched on.
Epoch milliseconds: when the organisation accepted it; null while it awaits approval (no points are stored).
Whether it appeared from a push rather than being declared.
Epoch milliseconds: when it was switched off; null while it is on.
Points accepted a day on the live tier, the limit in force.
Points accepted a day on the backfill tier, the limit in force.
How many days old a point must be to count against the backfill allowance.
How many days the samples are kept.
The source the metric belongs to; null for none.
object
object
Epoch milliseconds.
The metric’s page in the console.
Example generated
{ "data": { "uuid": "example", "name": "example", "description": "example", "metric_key": "example", "metric_type": "example", "unit": "example", "supported_aggregations": [ "example" ], "health_status": "example", "last_received_at": 1, "active": true, "approved_at": 1, "auto_created": true, "deactivated_at": 1, "max_points_per_day": 1, "max_backfill_points_per_day": 1, "backfill_tier_days": 1, "retention_days": 1, "metric_source": { "uuid": "example", "name": "example" }, "tags": [ { "uuid": "example", "name": "example" } ], "created_at": 1, "console_url": "example" }}The API key is missing, malformed, expired or revoked.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The key or its owner does not hold what the operation needs.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}No such record in this organisation (an absent id and another organisation’s answer alike).
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The request is invalid; errors names the parameters.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}An unexpected error.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}