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

post
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
Body Parameters
filter
optional
object
This object should contains "start" and "end" dates (ISO8601) to define the period you would analyze. You can also attach the hosts field as an array of hostnames to filter your data by servers.
Response
200: OK
{
"current": [
{
"hostname": "server-useast-2",
"transactions": 2320,
"memory_peak": 25,
"median": 168.3
},
{
"hostname": "server-useast-1",
"transactions": 2320,
"memory_peak": 25,
"median": 168.3
}
],
"previous": [
{
"hostname": "server-useast-2",
"transactions": 2320,
"memory_peak": 25,
"median": 168.3
},
{
"hostname": "server-useast-1",
"transactions": 2320,
"memory_peak": 25,
"median": 168.3
}
]
}

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 (ISO 8601) 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
[
{
"hostname": "worker01-eu3-west",
"performance": [
{
"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
}
]
},
{
"hostname": "webapp01-eu3-west",
"performance": [
{
"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
Retrieve the list of the error detected in the given application.
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
}
]

get
Errors Trend

https://app.inspector.dev/api/projects/:id/errors/trend
Retrieve the daily errors trend inthe last 30 days.
Request
Response
Request
Path Parameters
id
required
integer
Project's ID
Headers
Authentication
required
string
API key
Response
200: OK
[
{
"date": 1617494400000,
"num": 0
},
{
"date": 1617580800000,
"num": 0
},
{
"date": 1617667200000,
"num": 0
},
{
"date": 1617753600000,
"num": 0
},
{
"date": 1617840000000,
"num": 0
},
{
"date": 1617926400000,
"num": 1
},
{
"date": 1618012800000,
"num": 0
},
{
"date": 1618099200000,
"num": 0
},
{
"date": 1618185600000,
"num": 0
},
{
"date": 1618272000000,
"num": 0
},
{
"date": 1618358400000,
"num": 0
},
{
"date": 1618444800000,
"num": 0
},
{
"date": 1618531200000,
"num": 0
},
{
"date": 1618617600000,
"num": 0
},
{
"date": 1618704000000,
"num": 0
},
{
"date": 1618790400000,
"num": 0
},
{
"date": 1618876800000,
"num": 0
},
{
"date": 1618963200000,
"num": 0
},
{
"date": 1619049600000,
"num": 0
},
{
"date": 1619136000000,
"num": 0
},
{
"date": 1619222400000,
"num": 0
},
{
"date": 1619308800000,
"num": 0
},
{
"date": 1619395200000,
"num": 0
},
{
"date": 1619481600000,
"num": 0
},
{
"date": 1619568000000,
"num": 0
},
{
"date": 1619654400000,
"num": 0
},
{
"date": 1619740800000,
"num": 0
},
{
"date": 1619827200000,
"num": 0
},
{
"date": 1619913600000,
"num": 0
},
{
"date": 1620000000000,
"num": 0
},
{
"date": 1620086400000,
"num": 0
}
]