Analytics

Analytics 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" (ISO 8601) 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 the "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
}
]
}

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
}
]