Read resource metrics history
curl --request GET \
--url https://api.example.com/v1/api/resources/{resourceId}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/api/resources/{resourceId}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/api/resources/{resourceId}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/api/resources/{resourceId}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/api/resources/{resourceId}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/api/resources/{resourceId}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/api/resources/{resourceId}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"status": "<string>",
"desiredState": "<string>",
"retentionDays": 123,
"version": "<string>",
"lastReportAt": "<string>",
"lastCollectedAt": "<string>",
"diagnostics": {
"collectionDurationMs": 123,
"collectionErrors": 123,
"droppedSamples": 123
},
"errorMessage": "<string>",
"sampleIntervalSeconds": 123,
"removingServer": true
},
"serverId": "<string>",
"range": "custom",
"startAt": "<string>",
"endAt": "<string>",
"stepSeconds": 123,
"series": [
{
"id": "<string>",
"deploymentId": "<string>",
"previewId": "<string>",
"points": [
{
"at": "<string>",
"metrics": {}
}
]
}
],
"seriesLimited": true,
"events": [
{
"at": "<string>",
"type": "deployment",
"id": "<string>",
"state": "<string>"
}
],
"eventsLimited": true,
"localization": {
"dateFormat": "day-short-month-year",
"timeFormat": "24-hour",
"timeZone": "<string>",
"timestamps": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Read resource metrics history
Read resource metrics history through the Towbar REST API.
GET
/
resources
/
{resourceId}
/
metrics
Read resource metrics history
curl --request GET \
--url https://api.example.com/v1/api/resources/{resourceId}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/api/resources/{resourceId}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/api/resources/{resourceId}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/api/resources/{resourceId}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/api/resources/{resourceId}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/api/resources/{resourceId}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/api/resources/{resourceId}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"status": "<string>",
"desiredState": "<string>",
"retentionDays": 123,
"version": "<string>",
"lastReportAt": "<string>",
"lastCollectedAt": "<string>",
"diagnostics": {
"collectionDurationMs": 123,
"collectionErrors": 123,
"droppedSamples": 123
},
"errorMessage": "<string>",
"sampleIntervalSeconds": 123,
"removingServer": true
},
"serverId": "<string>",
"range": "custom",
"startAt": "<string>",
"endAt": "<string>",
"stepSeconds": 123,
"series": [
{
"id": "<string>",
"deploymentId": "<string>",
"previewId": "<string>",
"points": [
{
"at": "<string>",
"metrics": {}
}
]
}
],
"seriesLimited": true,
"events": [
{
"at": "<string>",
"type": "deployment",
"id": "<string>",
"state": "<string>"
}
],
"eventsLimited": true,
"localization": {
"dateFormat": "day-short-month-year",
"timeFormat": "24-hour",
"timeZone": "<string>",
"timestamps": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Required permissions: scout.read. Personal keys are capped by their owner’s current team role.
See request conventions and automation workflows. MCP clients use the task-oriented tool catalogue.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Query Parameters
Available options:
15m, 30m, 1h, 6h, 24h, 7d, 15d, 30d, 60d, custom Inclusive ISO 8601 start with time-zone offset; required for range=custom and within server retention.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Exclusive ISO 8601 end with time-zone offset; required for range=custom, at least 30 seconds after start and not in the future.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Response
Resource metrics across container replacements, preserving gaps and per-instance peaks.
Show child attributes
Show child attributes
range
Option 1 · stringOption 2 · stringOption 3 · stringOption 4 · stringOption 5 · stringOption 6 · stringOption 7 · stringOption 8 · stringOption 9 · stringOption 10 · string
required
Allowed value:
"custom"Show child attributes
Show child attributes
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Last modified on September 5, 2026
