Get ApiMetrics
1 min
GET
//v1/api-metrics/metrics/counts
Query Parameters
- fromstring<date-time>requiredFormatdate-time
- tostring<date-time>requiredFormatdate-time
- domainstring[]
- groupAggregationGroup[]
Header Parameters
- x-upstart-tenantstringrequiredDescription
Responses
200
- Aggregation[]
- groupsmap<string, string>required
- valuenumber<double>requiredFormatdouble
400
- ValidationErrorResponse
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
401
- ErrorResponse
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
500
- ErrorResponse
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
curl
curl --request GET \
--url '//v1/api-metrics/metrics/counts?from=string%3Cdate-time%3E&to=string%3Cdate-time%3E' \
--header 'accept: application/json' \
--header 'x-upstart-tenant: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-upstart-tenant", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("//v1/api-metrics/metrics/counts?from=string<date-time>&to=string<date-time>", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "//v1/api-metrics/metrics/counts?from=string<date-time>&to=string<date-time>"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-upstart-tenant': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Success–api-metric details returned.
[
{
"groups": "",
"value": ""
}
]400
// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}401
// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}500
// Internal server error.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}