API Reference
The Raygun API is REST-oriented and uses JSON for all operations. You can manually publish errors to Raygun using this interface, or use it to create your own provider. All calls are made over HTTPS.
API Endpoint
https://api.raygun.com
Headers
The header must contain "X-ApiKey" with a value that is a valid Raygun Crash Reporting API key (available under Crash Reporting - Application Settings).
URI Summary
Crash Reporting error payloads
POST https://api.raygun.com/entries
The body of the message should be JSON with the following structure:
|
|
HTTP Status Codes
202 OK - Message accepted.
400 Bad message - could not parse the provided JSON. Check all fields are present, especially both occurredOn (ISO 8601 DateTime) and details { } at the top level.
403 Invalid API Key - The value specified in the header X-ApiKey did not match with a user.
413 Request entity too large - The maximum size of a JSON payload is 128KB.
429 Too Many Requests - Plan limit exceeded for month or plan expired
Notes
-
OccurredOn must be present, and is a DateTime string in the ISO 8601 format, in the UTC timezone. This is of the format:
YYYY-MM-DDTHH:MM:SSZ
-
The maximum size of the body is 128KB. Payloads larger than this will be discarded.
-
For the field details.request.form, we request that you truncate the names and values to 256 characters each. For rawData, this should be truncated to 4096 bytes.
-
rawData is to be set in the case where the method is non-GET, and the Content-Type is not text/html and not application/x-www-form-urlencoded.
-
There must be at least one details.error, and its stacktrace must have its linenumber set. The other fields can be empty.
-
details.request.form should be the raw form data available from a request-type object when the HTTP method is 'POST' and the Content-Type is 'application/x-www-form-urlencoded'.
-
For the details.environment fields where that data is unavailable from your language, framework or environment, these can safely be absent from the payload (or set to null).
-
User: identifier should be a string representation of the currently logged in user - something that uniquely identifies them in your app. If you set any user properties, you should at least set this one.
-
User: isAnonymous should be set to true if the user is not actually logged in to your app. This is to separate them from the "user info not provided" case.
-
User: uuid should be a device dependent identifier - most mobile device frameworks will give you an identifier of some sort to use here.
Change log
- 7th Sep 2017 - Added breadcrumb section to documentation
- 20th Feb 2016 - Updated API endpoint to api.raygun.com from api.raygun.io
- 28th May 2015 - Add more information about
user
object. Remove oldcontext
object ascontext.identifier
has been rolled intouser.uuid
. - 6th November 2013 - Removed request.httpStatusCode and added response.statusCode.