Transactions
Access transactions metrics.
Last updated
Access transactions metrics.
Last updated
Transactions metrics are always related to an App. This means that all endpoints have the same root so it could be helpful to wrap your api call under the same base URI:
https://app.inspector.dev
/api/apps/:id
POST
/api/apps/:id/transactions
Get the list of transactions in the given interval.
id*
Integer
App's identifier
Content-Type
application/json
Authorization
Bearer <token>
filter.start*
String
ISO-8601 date format
filter.end
String
ISO-8601 date format
filter.hosts
Array
Filter the transactions list by servers
filter.query_string
String
Filter by transaction's name
[
{
name: "request",
transactions: [
{
type: "request",
duration: 42.8,
group_hash: "4fbb4fa36bad346bbe8a26827a244e70",
hash: "37d6f2a1bd370759ff46cc63266603b81b60da4774bfa9a72af7bf26ba3d4fb1",
host: {hostname: "307510.cloudwaysapps.com", ip: "127.0.0.1"},
memory_peak: 16.98,
name: "GET /api",
project_id: 389,
result: "success",
timestamp: "2024-10-04 16:52:02",
doc_count: 60,
performance: [
{label: "2021-02-03 16:00", value: 38, doc_count: 61},
{label: "2021-02-03 17:00", value: 5, doc_count: 63},
{label: "2021-02-03 18:00", value: 65, doc_count: 123},
{label: "2021-02-03 19:00", value: 34, doc_count: 11},
{label: "2021-02-03 20:00", value: 43, doc_count: 110},
{label: "2021-02-03 21:00", value: 2, doc_count: 123},
...
]
},
{...},
],
},
{
name: "command",
transactions: [...],
},
{...}
]
POST
/api/apps/:id/transactions/:group_hash/occurrences
Get the last occurrences of a specific transaction.
id*
Integer
Project's Identifier
group_hash*
String
The transaction group's identifier
filter.start*
Date
ISO-8601 date format
filter.end
Date
ISO-8601 date format
filter.from
Integer
The results are paginated 25 elements at a time. Use from to advance the starting point of the list.
Authentication*
String
API key
[
{
duration: 164.22,
group_hash: "7d8647ff14a84a458b0f6xxxxxxxxxxxx",
memory_peak: 19.09,
name: "GET /api/users",
result: "success",
timestamp: "2022-04-19 14:10:04",
type: "process"
},
{
...
},
]
POST
/api/apps/:id/transactions/:group_hash/time-distribution
Performance distribution of a specific transaction.
id*
integer
Project's identifier
group_hash*
String
Transaction group's identifier
Authentication*
string
API key
filter.start*
Date
ISO-8601 date format
filter.end
Date
ISO-8601 date format
[
{
"ms": 0,
"occurrences": 29
},
{
"ms": 152,
"occurrences": 30
},
{
"ms": 304,
"occurrences": 1
},
{
"ms": 456,
"occurrences": 0
},
{
"ms": 608,
"occurrences": 0
},
{
"ms": 760,
"occurrences": 0
},
{
"ms": 912,
"occurrences": 0
},
{
"ms": 1064,
"occurrences": 0
},
{
"ms": 1216,
"occurrences": 0
},
{
"ms": 1368,
"occurrences": 0
},
{
"ms": 1520,
"occurrences": 0
},
{
"ms": 1672,
"occurrences": 0
},
{
"ms": 1824,
"occurrences": 0
},
{
"ms": 1976,
"occurrences": 0
},
{
"ms: 2128,
"occurrences": 0
},
{
"ms": 2280,
"occurrences": 0
},
{
"ms": 2432,
"occurrences": 0
},
{
"ms": 2584,
"occurrences": 0
},
{
"ms": 2736,
"occurrences": 0
},
{
"ms": 2888,
"occurrences": 0
},
{
"ms": 3040,
"occurrences": 0
},
{
"ms": 3192,
"occurrences": 0
},
{
"ms": 5776,
"occurrences": 1
},
{
"ms": 5928,
"occurrences": 5
},
{
"ms": 6080,
"occurrences": 9
},
]