Analytics

Analytics data 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

get
Get Hosts

https://app.inspector.dev/api/projects/:id/hosts
The list of hosts (servers) where the application runs on.
Request
Response
Request
Path Parameters
id
required
string
Project's ID
Headers
Authentication
required
string
API key
Response
200: OK
[
{
"hostname": "server-useast-2"
},
{
"hostname": "server-useast-1"
}
]

post
Performance

https://app.inspector.dev/api/projects/:id/performance
Request
Response
Request
Path Parameters
id
required
integer
Project's ID
Headers
Authentication
required
string
API key
Body Parameters
filter
optional
object
This object should contains "start" and "end" dates to define the period you would analyze. You can also attach the "hosts" field as an array of hostnames to filter your performance report by servers. Furthermore you can include also a "query_string" parameter to filter by transactions name.
Response
200: OK
{
"current": [
{
"date": "2020-10-10 12:54",
"count": 4,
"p50": 5.37,
"p95": 6.56,
"memory_average": 4.52
},
{
"date": "2020-10-10 13:54",
"count": 4,
"p50": 5.37,
"p95": 6.56,
"memory_average": 4.52
}
],
"previous": [
{
"date": "2020-10-10 12:54",
"count": 4,
"p50": 5.37,
"p95": 6.56,
"memory_average": 3.77
},
{
"date": "2020-10-10 13:54",
"count": 4,
"p50": 5.37,
"p95": 6.56,
"memory_average": 3.77
}
]
}

post
Performance Distribution

https://app.inspector.dev/api/projects/:id/transactions/time-distribution
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
},
]

get
Errors

https://app.inspector.dev/api/projects/:id/errors
Request
Response
Request
Path Parameters
id
required
integer
Project's ID
Headers
Authentication
required
string
API Key
Response
200: OK
[
{
"id": 24,
"message": "First Exception detected",
"handled": true,
"muted": false,
"class": "Exception",
"file": "C:\\xampp\\htdocs\\crongenius\\vendor\\inspector-apm\\inspector-laravel\\src\\Commands\\TestCommand.php",
"line": 71,
"hash": "287366827414d79f8f4775c5a99e0d05",
"last_seen_at": "2020-10-09 14:05:41",
"created_at": "2020-10-08 14:48:55",
"histogram_day": {
"2020-10-15 07:00": 0,
"2020-10-15 08:00": 1,
"2020-10-15 09:00": 1,
"2020-10-15 10:00": 7,
"2020-10-15 11:00": 0,
"2020-10-15 12:00": 0,
"2020-10-15 13:00": 1,
"2020-10-15 14:00": 1,
"2020-10-15 15:00": 3,
"2020-10-15 16:00": 0,
"2020-10-15 17:00": 0,
"2020-10-15 18:00": 21,
"2020-10-15 19:00": 6,
"2020-10-15 20:00": 0,
"2020-10-15 21:00": 0,
"2020-10-15 22:00": 16,
"2020-10-15 23:00": 0,
"2020-10-16 00:00": 0,
"2020-10-16 01:00": 0,
"2020-10-16 02:00": 0,
"2020-10-16 03:00": 0,
"2020-10-16 04:00": 0,
"2020-10-16 05:00": 0,
"2020-10-16 06:00": 0,
"2020-10-16 07:00": 0
},
"histogram_month": {
"2020-09-16 07:00": 0,
"2020-09-17 07:00": 0,
"2020-09-18 07:00": 0,
"2020-09-19 07:00": 0,
"2020-09-20 07:00": 0,
"2020-09-21 07:00": 0,
"2020-09-22 07:00": 0,
"2020-09-23 07:00": 0,
"2020-09-24 07:00": 5,
"2020-09-25 07:00": 0,
"2020-09-26 07:00": 0,
"2020-09-27 07:00": 0,
"2020-09-28 07:00": 0,
"2020-09-29 07:00": 0,
"2020-09-30 07:00": 0,
"2020-10-01 07:00": 0,
"2020-10-02 07:00": 21,
"2020-10-03 07:00": 8,
"2020-10-04 07:00": 0,
"2020-10-05 07:00": 0,
"2020-10-06 07:00": 0,
"2020-10-07 07:00": 0,
"2020-10-08 07:00": 0,
"2020-10-09 07:00": 4,
"2020-10-10 07:00": 0,
"2020-10-11 07:00": 0,
"2020-10-12 07:00": 4,
"2020-10-13 07:00": 0,
"2020-10-14 07:00": 0,
"2020-10-15 07:00": 2,
"2020-10-16 07:00": 127
},
"histogram_hour": {
"2020-10-16 06:36": 0,
"2020-10-16 06:38": 0,
"2020-10-16 06:40": 0,
"2020-10-16 06:42": 0,
"2020-10-16 06:44": 0,
"2020-10-16 06:46": 0,
"2020-10-16 06:48": 4,
"2020-10-16 06:50": 27,
"2020-10-16 06:52": 25,
"2020-10-16 06:54": 0,
"2020-10-16 06:56": 3,
"2020-10-16 06:58": 0,
"2020-10-16 07:00": 0,
"2020-10-16 07:02": 5,
"2020-10-16 07:04": 6,
"2020-10-16 07:06": 6,
"2020-10-16 07:08": 0,
"2020-10-16 07:10": 0,
"2020-10-16 07:12": 0,
"2020-10-16 07:14": 0,
"2020-10-16 07:16": 0,
"2020-10-16 07:18": 19,
"2020-10-16 07:20": 0,
"2020-10-16 07:22": 0,
"2020-10-16 07:24": 0,
"2020-10-16 07:26": 0,
"2020-10-16 07:28": 0,
"2020-10-16 07:30": 0,
"2020-10-16 07:32": 5,
"2020-10-16 07:34": 30,
"2020-10-16 07:36": 0
},
"total": 4,
"total_for_human": 4
}
]