Errors By Message
This endpoint returns the count of errors by message, sorted by count descending.
Url
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages
Parameters
The following parameters may be specified on the query string to further filter the results. All parameters shown here are optional.
Date Range
startDate: Default value if not specified is the beginning of time.
endDate: Default value if not specified is the current date.
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages?startDate=2014-08-01&endDate=2014-08-31
Paging
By default the endpoint returns the most recent 20 results. You may adjust the number of results, and also specify a different page, if the number of total results exceed what you’ve requested.
page The page of data you’re requesting. Default value is 1 if not specified.
size The number of results to return per request. The default value is 20. The maximum value is 1000.
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages?page=1&size=100
Applications
If you make use of multiple applications, you specify which application key you’d like to receive data for.
application The application key to request data for. If not specified you will receive all data for all applications.
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages?application=Prod
Sorting
By default the endpoint returns results sorted by error count in descending order. You may adjust the sort field and sort direction.
sort The sort field and sort direction. Supported fields are “count” and “usercount”. Sort directions are specified by appending “|asc” or “|desc”. Default value is “count|desc” if not specified.
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages?sort=userCount|asc
Example
Request
GET https://api.trackjs.com/{CUSTOMER_ID}/v1/errors/messages?startDate=2014-09-01&size=3
Response
{
"data": [
{
"key": "Cannot read property 'on' of undefined",
"count": 54,
"userCount": 12,
"firstSeen": "2016-09-05T05:53:50.885+00:00",
"lastSeen": "2016-09-22T22:42:23.579+00:00",
"trackJsUrl": "https://my.trackjs.com/messages/filtered?message=Cannot+read+property+%27on%27+of+undefined&"
},
{
"key": "Script error.",
"count": 27,
"userCount": 6,
"firstSeen": "2016-09-06T05:03:50.885+00:00",
"lastSeen": "2016-09-15T22:42:23.579+00:00",
"trackJsUrl": "https://my.trackjs.com/messages/filtered?message=Script+error.&"
},
{
"key": "404 Not Found",
"count": 15,
"userCount": 3,
"firstSeen": "2016-09-01T05:53:50.885+00:00",
"lastSeen": "2016-09-21T22:42:23.579+00:00",
"trackJsUrl": "https://my.trackjs.com/messages/filtered?message=404+Not+Found&"
}
],
"metadata": {
"startDate": "2014-09-11T00:00:00Z",
"page": 1,
"size": 3,
"hasMore": true,
"trackJsUrl": "https://my.trackjs.com/messages"
}
}