API Reference
Get Model Metrics
GET
/v1/models/{model_id}/metrics
X-API-Key*
curl --request GET \
--url https://mango.sievedata.com/v1/models/{model_id}/metrics \
--header 'X-API-Key: <x-api-key>'
This endpoint returns a JSON object that describes the metrics associated with a model given its ID.
Request
model_idrequired
string
Sieve model ID
limit_min
Default: "60"number
The duration (in minutes) of historical metrics to retrieve, ending at the current time
Response
Responses are organized by key as seen below. The value
key provides a list of timestamps and values for each metric.
model_requests
dict
The number of requests sent to a model at any given time.
queue_length
dict
The length of the queue for a model at any given time.
replica_count
dict
The number of replicas of the model that are up at any given time.
{
"model_requests": {
"key": "model_requests",
"name": "Model Requests",
"description": "Number of requests sent to model",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
},
"queue_length": {
"key": "queue_length",
"name": "Queue Length",
"description": "Number of requests in queue",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
},
"replica_count": {
"key": "replica_count",
"name": "Replica Count",
"description": "Number of replicas",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
}
}
curl --request GET \
--url https://mango.sievedata.com/v1/models/{model_id}/metrics \
--header 'X-API-Key: <x-api-key>'
{
"model_requests": {
"key": "model_requests",
"name": "Model Requests",
"description": "Number of requests sent to model",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
},
"queue_length": {
"key": "queue_length",
"name": "Queue Length",
"description": "Number of requests in queue",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
},
"replica_count": {
"key": "replica_count",
"name": "Replica Count",
"description": "Number of replicas",
"type": "matrix",
"value": [[1686336600, 0], [1686336720, 0]]
}
}