Get request metrics for a model endpoint version
Get request metrics time series data for a specific model endpoint version from Prometheus. Returns successful requests, failed requests, and total requests.
curl --request GET \
--url https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics \
--header 'X-Domino-Api-Key: <api-key>'import requests
url = "https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics"
headers = {"X-Domino-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Domino-Api-Key': '<api-key>'}};
fetch('https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-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://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-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 => [
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics")
.header("X-Domino-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"failedRequests": {
"observations": [
{
"timestamp": "2024-01-15T10:00:00Z",
"value": 0.123
}
]
},
"successfulRequests": {
"observations": [
{
"timestamp": "2024-01-15T10:00:00Z",
"value": 0.123
}
]
},
"totalErrorCount": 25,
"totalRequests": 1500
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Path Parameters
The ID of the model endpoint to get request metrics for
"62313ce67a0af0281c01a6a5"
The version number of the model endpoint to get request metrics for
1
Query Parameters
Start time for the metrics query in ISO 8601 format. Defaults to 24 hours ago.
"2024-01-15T10:00:00Z"
End time for the metrics query in ISO 8601 format. Defaults to current time.
"2024-01-16T10:00:00Z"
Optional aggregation window for metrics data points. When provided, uses the specified window (5min, hourly, or daily) for step size. When omitted, uses adaptive step sizing based on the time range to optimize data point count.
hourly, daily "hourly"
Maximum number of historical executions to include in metrics aggregation. Defaults to 3 if not specified.
1 <= x <= 103
Response
Success
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Total number of failed requests (non-2xx status codes) across the entire time period
25
Total number of requests across the entire time period
1500
Was this page helpful?
curl --request GET \
--url https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics \
--header 'X-Domino-Api-Key: <api-key>'import requests
url = "https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics"
headers = {"X-Domino-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Domino-Api-Key': '<api-key>'}};
fetch('https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-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://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-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 => [
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics")
.header("X-Domino-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/gen-ai/beta/endpoints/{endpointId}/versions/{versionNumber}/request-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"failedRequests": {
"observations": [
{
"timestamp": "2024-01-15T10:00:00Z",
"value": 0.123
}
]
},
"successfulRequests": {
"observations": [
{
"timestamp": "2024-01-15T10:00:00Z",
"value": 0.123
}
]
},
"totalErrorCount": 25,
"totalRequests": 1500
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}