curl --request GET \
--url 'https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key='import requests
url = "https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=', 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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
req, _ := http.NewRequest("GET", url, nil)
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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
"api",
"db",
"worker"
]
}<string>{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}<string>List Prometheus label values
Read label values from a Prometheus-compatible data source through the Monitors proxy.
curl --request GET \
--url 'https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key='import requests
url = "https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=', 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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
req, _ := http.NewRequest("GET", url, nil)
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.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
"api",
"db",
"worker"
]
}<string>{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}<string>Restrictions
| Aspect | Value |
|---|---|
| Rate limits | 1,000 requests/minute; 50 requests/second per account |
| Permissions | Any valid app_key (read-only; not gated by a specific permission class) |
| Edge requirement | Querying a specific data source requires monit-edge v0.35.0 or later |
Usage
- Pass the target data source ID in the
X-DSIDheader. It must belong to the authenticated account and be a Prometheus data source; use/monit/datasource/listto obtain its ID. - When the data source restricts querying to certain teams, only members of those teams, its managing team, and account owners or admins can query it; others get 403. An unknown data source ID returns 400.
- The 200 body is the data source’s native Prometheus HTTP API payload, not the standard
{ request_id, data }envelope. Query-string parameters are forwarded unchanged, so Prometheus’s own parameters such asmatch[],start, andendwork. - When
X-DSIDis omitted, or any monit-edge of the data source’s cluster is older than v0.35.0, the request is answered by the platform’s own Prometheus instead of your data source. Send the header and keep monit-edge up to date to get your data source’s values. - Failures raised before the data source is reached are returned as
text/plainwith the matching 4xx or 5xx status. A status of 400 or above returned by the data source itself is passed through with its own body.
Authorizations
APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.
Headers
Data source ID to query, as a decimal string. Must reference a Prometheus data source owned by the authenticated account. When omitted, the request is served by the platform's own Prometheus instead of one of your data sources.
Path Parameters
Label name to enumerate values for, for example job.
Response
Native Prometheus label-values response returned by the data source.
Native Prometheus HTTP API response returned by the queried data source. This endpoint does not wrap the payload in the Flashduty response envelope.
Prometheus result status. success carries data; error carries errorType and error.
success, error Label values, present when status is success.
One label value.
Prometheus error class, present when status is error.
Human-readable Prometheus error message, present when status is error.
Was this page helpful?