Transactions

Access transactions metrics.

Transactions metrics are always related to a project. 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/projects/:id

post
Transactions List

https://app.inspector.dev/api/projects/:id/transactions
Get the list of transactions in the given interval.
Request
Response
Request
Path Parameters
id
required
string
Project's ID
Headers
Authentication
required
string
API key
Body Parameters
filter
optional
This object should contains start and end (ISO 8601) dates to define the period you would analyze. You can also attach the hosts field as an array of hostnames to filter the transactions list by servers. Furthermore you can include the query_string parameter to filter by transaction name.
Response
200: OK
[
{
group_hash: "4fbb4fa36bad346bbe8a26827a244e70"
last_record: {
duration: 42.8,
group_hash: "4fbb4fa36bad346bbe8a26827a244e70",
hash: "37d6f2a1bd370759ff46cc63266603b81b60da4774bfa9a72af7bf26ba3d4fb1",
host: {hostname: "307510.cloudwaysapps.com", ip: "127.0.0.1"},
memory_peak: 16.98,
name: "App\\Jobs\\ExampleJob",
project_id: 389,
result: "success",
timestamp: "2021-02-04 16:52:02",
type: "process"
},
memory: 16.98,
p50: 40.15,
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},
...
],
throughput: 60
},
...
]

post
Performance Distribution

https://app.inspector.dev/api/projects/:id/transactions/time-distribution
Performance distribution of a specific transaction.
Request
Response
Request
Path Parameters
id
required
integer
Project's ID
Headers
Authentication
required
string
API key
Body Parameters
filter
required
object
The "group_hash" field should contains the hash of the transaction you want analyze. Using "start" and "end" fields you can filter by a time range.
Response
200: OK
[
{
"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
},
]