Get Metrics Refresh Status
curl --request GET \
--url https://api.example.com/metrics/refresh/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/metrics/refresh/status"
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/metrics/refresh/status', 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/metrics/refresh/status",
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/metrics/refresh/status"
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/metrics/refresh/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/metrics/refresh/status")
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{
"status": "completed",
"started_at": "2025-08-12T08:01:47Z",
"finished_at": "2025-08-12T08:01:49Z"
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"body",
"endpoint"
],
"msg": "Value error, Endpoint must be a path, not a full URL",
"type": "value_error"
}
]
}{
"detail": "Internal server error"
}Metrics
Get Metrics Refresh Status
Get the status of the most recent metrics refresh for the target database. Returns ‘running’ while a refresh is in progress, then ‘completed’ or ‘failed’ with the finish timestamp — the state updates even when a refresh completes without writing new data. Returns ‘idle’ if no refresh has been triggered since this server process started. For remote databases the status is fetched from the remote AgentOS. Intended for polling after starting a background refresh via POST /metrics/refresh?background=true.
GET
/
metrics
/
refresh
/
status
Get Metrics Refresh Status
curl --request GET \
--url https://api.example.com/metrics/refresh/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/metrics/refresh/status"
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/metrics/refresh/status', 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/metrics/refresh/status",
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/metrics/refresh/status"
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/metrics/refresh/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/metrics/refresh/status")
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{
"status": "completed",
"started_at": "2025-08-12T08:01:47Z",
"finished_at": "2025-08-12T08:01:49Z"
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"body",
"endpoint"
],
"msg": "Value error, Endpoint must be a path, not a full URL",
"type": "value_error"
}
]
}{
"detail": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Database ID to get the refresh status for
Table to get the refresh status for
Response
Current refresh status