The Performance Metrics API
The Performance Metrics API allows you to access current response times and error rates for applications, services, and individual transactions.
Fetching Project Performance Metrics
Requirements: You need an API access token with the metrics
scope for this endpoint.
You can access data for your project through the URL scheme.
https://app.tideways.io/apps/api/{organization}/{app}/performance
Example:
curl -H 'Authorization: Bearer <token>' \
-X GET \
https://app.tideways.io/apps/api/foo/bar/performance
Response:
{
"application": {
"by_time": [
"2017-07-31 12:41": {
"errors": 0,
"percentile_95p": 211,
"requests": 144
},
"2017-07-31 12:42": {
"errors": 0,
"percentile_95p": 235,
"requests": 46
}
],
"by_transactions": [
{
"memory": 11238,
"name": "bar",
"requests": 2676,
"response_time": 210.34977578475
},
{
"memory": 4602,
"name": "foo",
"requests": 343,
"response_time": 152.1778425656
}
],
"criteria": {
"end": "2017-07-31 13:41",
"service": "web",
"start": "2017-07-31 12:41"
},
"total": {
"error_rate": 0.10565240359218,
"requests": 3786,
"response_time": 285
}
}
}
Parameters
You can pass a number of query parameters to this API endpoint:
-
ts
the end time of the last minute to include in the query as formatY-m-d H:i
-
env
represents the name of an environment, for example the defaultproduction
-
m
is the number of minutes to access performance data for backwards from thets
-
s
represents the name of a service, for example the defaultweb
.
Fetching Project Summary/Overview Metrics
Requirements: You need an API access token with the metrics
scope for this endpoint.
The source for the summary/overview and time-selector chart can be accessed through this summary API:
https://app.tideways.io/apps/api/{organization}/{app}/summary
Example Response
{
"summary": {
"by_time": [
"2017-07-31 12:00": {
"errors": 0,
"percentile_95p": 245,
"requests": 997
},
"2017-07-31 12:15": {
"errors": 0,
"percentile_95p": 233,
"requests": 986
},
"2017-07-31 12:30": {
"errors": 0,
"percentile_95p": 230,
"requests": 983
},
"2017-07-31 12:45": {
"errors": 0,
"percentile_95p": 233,
"requests": 992
},
"2017-07-31 13:00": {
"errors": 0,
"percentile_95p": 335,
"requests": 864
},
"2017-07-31 13:15": {
"errors": 0,
"percentile_95p": 325,
"requests": 987
}
]
"criteria": {
"service": "web"
}
}
}
The summary data is returned in 15 minute steps, where a key of `2017-07-31 12:00 ` means the performance in the time from 12:00:00 until 12:14:59. At the moment we don’t give a guarantee on how long it takes between the interval being over and the calculated value being available, it might take several minutes.
Parameters:
You can pass a number of query parameters to this API endpoint:
-
s
represents the name of a service, for example the defaultweb
.