Trackets uses a simple RESTful JSON API. Errors can be captured by simply sending a POST request to the right URL with the right data, as we'll see described shortly. The clients for different languages provided by Trackets use the same API as described here. If you're on one of the platforms where we don't yet have an official client, you can build one yourself by using this API.
The main API endpoint is
https://trackets.com. Currently we
only provide an API for creating new errors reports, which is described below.
Every API request must be authorized with a project API key (available on the project settings page.)
Here's a sample request for creating a new error report by sending a HTTP
POST request to the
/reports/:api_key URL. The data is encoded
using JSON and content type set to
application/json. If you
forget to set a proper content type, you'll get back a 400 error response.
"message": "Something went wrong",
Our API uses HTTPS to keep everything secure. The API key should be the public API key of the project. If the API key is missing or invalid, a 401 response is returned.
Here's a list of all of the parameters currently supported by the API.
A short message describing the error.
Stacktrace for the error.
File name where the error occured.
Line number where the error occured.
Column number where the error occured.
URL of the page where the error occured.
User agent of the client's browser.
Environment where the error was captured. The default value for this field is production. Errors can be filtered based on the environment.
Every error can contain arbitrary JSON data to make its diagnosis easier. You can include any data you'd like, be it the user's email, account number, current subscription, or just any other diagnostic data that might be relevant.