curl --request GET \
--url 'https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key=' \
--header 'X-DSID: <x-dsid>'import requests
url = "https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
headers = {"X-DSID": "<x-dsid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-DSID': '<x-dsid>'}};
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",
CURLOPT_HTTPHEADER => [
"X-DSID: <x-dsid>"
],
]);
$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)
req.Header.Add("X-DSID", "<x-dsid>")
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=")
.header("X-DSID", "<x-dsid>")
.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)
request["X-DSID"] = '<x-dsid>'
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."
}
}<string><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=' \
--header 'X-DSID: <x-dsid>'import requests
url = "https://api.flashcat.cloud/monit/prometheus/api/v1/label/{label_name}/values?app_key="
headers = {"X-DSID": "<x-dsid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-DSID': '<x-dsid>'}};
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",
CURLOPT_HTTPHEADER => [
"X-DSID: <x-dsid>"
],
]);
$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)
req.Header.Add("X-DSID", "<x-dsid>")
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=")
.header("X-DSID", "<x-dsid>")
.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)
request["X-DSID"] = '<x-dsid>'
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."
}
}<string><string>Authorizations
App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Headers
Data source ID to query. Must reference a Prometheus-compatible data source owned by the authenticated account.
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?