curl --request POST \
--url https://{region}.api.plerion.com/v1/tenant/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metric": {
"namespace": "finding",
"metricNames": [
"failed_count"
]
},
"period": {
"interval": 86400,
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"stat": "latest"
},
"integrationIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"integrationGroupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"assetGroupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"environmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/metrics"
payload = {
"metric": {
"namespace": "finding",
"metricNames": ["failed_count"]
},
"period": {
"interval": 86400,
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"stat": "latest"
},
"integrationIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"integrationGroupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"assetGroupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"environmentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: {namespace: 'finding', metricNames: ['failed_count']},
period: {
interval: 86400,
start: '2026-08-01T00:00:00Z',
end: '2026-09-01T00:00:00Z',
stat: 'latest'
},
integrationIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
integrationGroupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
assetGroupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
environmentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{region}.api.plerion.com/v1/tenant/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://{region}.api.plerion.com/v1/tenant/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => [
'namespace' => 'finding',
'metricNames' => [
'failed_count'
]
],
'period' => [
'interval' => 86400,
'start' => '2026-08-01T00:00:00Z',
'end' => '2026-09-01T00:00:00Z',
'stat' => 'latest'
],
'integrationIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'integrationGroupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'assetGroupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'environmentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/metrics"
payload := strings.NewReader("{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{region}.api.plerion.com/v1/tenant/metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "2026-08-01T00:00:00.000Z",
"metrics": {
"failed_count": 128
}
}
],
"meta": {
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"interval": 123,
"stat": "<string>"
},
"namespace": "finding",
"metricNames": [
"<string>"
]
}
}{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "IntegrationAccessDenied",
"message": "integration access denied"
}
]
}{
"message": "Internal server error"
}Query metrics
Use the query metrics API to read the time series behind the Plerion dashboards. Name a namespace and one or more of its metric names, a period with an interval and an aggregation, and optionally the integrations, integration groups, asset groups, or environments to restrict the query to. The response is one entry per interval, carrying the value of every requested metric at that timestamp; a metric with no data point in an interval is reported as 0.
A key whose role covers specific integrations can query only those integrations; naming another integration is refused with 403.
The namespaces and the metric names the Plerion dashboards read from them:
| Namespace | Metric names |
|---|---|
finding | failed_count, failed_count_by_asset_group |
asset | total_count, number_of_scanned_workloads, assets_with_critical_vulnerability_count, assets_with_kev_count, public_assets_count, overly_permissive_assets_count, admin_privileged_assets_count, privilege_escalation_assets_count, and the same names with the _by_asset_group suffix |
vulnerabilities | open_critical_vulnerabilities, open_high_vulnerabilities, open_medium_vulnerabilities, open_low_vulnerabilities, open_unknown_vulnerabilities, and the same names with the _by_asset_group suffix |
risk | open_count, open_count_by_asset_group |
alert | total_open_count, open_count_by_asset_group |
attack_path | total_count, total_count_by_asset_group |
compliance | compliance_posture_score, well_architected_score, or a compliance framework ID as returned by the list compliance frameworks API, for that framework’s score |
risk_score | tenant_risk_score, integration_risk_score, asset_group_risk_score |
tenant_unit_consumption | tenant_unit_consumption |
Names with the _by_asset_group suffix are the same measure recorded per asset group. vulnerability is accepted as an alias of vulnerabilities.
The request body accepts only the fields listed below; an unknown field is rejected with 400.
curl --request POST \
--url https://{region}.api.plerion.com/v1/tenant/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metric": {
"namespace": "finding",
"metricNames": [
"failed_count"
]
},
"period": {
"interval": 86400,
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"stat": "latest"
},
"integrationIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"integrationGroupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"assetGroupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"environmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/metrics"
payload = {
"metric": {
"namespace": "finding",
"metricNames": ["failed_count"]
},
"period": {
"interval": 86400,
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"stat": "latest"
},
"integrationIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"integrationGroupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"assetGroupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"environmentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: {namespace: 'finding', metricNames: ['failed_count']},
period: {
interval: 86400,
start: '2026-08-01T00:00:00Z',
end: '2026-09-01T00:00:00Z',
stat: 'latest'
},
integrationIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
integrationGroupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
assetGroupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
environmentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{region}.api.plerion.com/v1/tenant/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://{region}.api.plerion.com/v1/tenant/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => [
'namespace' => 'finding',
'metricNames' => [
'failed_count'
]
],
'period' => [
'interval' => 86400,
'start' => '2026-08-01T00:00:00Z',
'end' => '2026-09-01T00:00:00Z',
'stat' => 'latest'
],
'integrationIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'integrationGroupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'assetGroupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'environmentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/metrics"
payload := strings.NewReader("{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{region}.api.plerion.com/v1/tenant/metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": {\n \"namespace\": \"finding\",\n \"metricNames\": [\n \"failed_count\"\n ]\n },\n \"period\": {\n \"interval\": 86400,\n \"start\": \"2026-08-01T00:00:00Z\",\n \"end\": \"2026-09-01T00:00:00Z\",\n \"stat\": \"latest\"\n },\n \"integrationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"integrationGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"assetGroupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "2026-08-01T00:00:00.000Z",
"metrics": {
"failed_count": 128
}
}
],
"meta": {
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"interval": 123,
"stat": "<string>"
},
"namespace": "finding",
"metricNames": [
"<string>"
]
}
}{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "IntegrationAccessDenied",
"message": "integration access denied"
}
]
}{
"message": "Internal server error"
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
application/json
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Restrict the query to these integrations.
Restrict the query to the integrations in these integration groups.
100Restrict the query to these asset groups.
Restrict the query to the integrations in these environments.
Was this page helpful?