Raygun API
Raygun's API allows you to access your Raygun data so that you can display, manipulate and process it in other tools, scripts and applications.
Following the OpenAPI standard, you can see the full specification here and a list of endpoints below.
Access to the API is managed via Personal Access Tokens.
note: Every user on your plan can create personal access tokens for the applications they have access to.
Authentication
Raygun's API is secured using Bearer Authentication using Personal Access Tokens.
Each request must include a Personal Access Token as the Bearer token in the Authorization
request header.
Authorization: Bearer <Raygun PAT>
Unauthenticated requests will result in an HTTP 401 status code.
If you see an HTTP 401 response, you should check:
- Your request includes a Personal Access Token in the
Authorization
header. - The Personal Access Token is not expired.
Unauthorized requests will result in an HTTP 403 status code.
If you see an HTTP 403 response, you should check:
- The Personal Access Token has the required scope(s) assigned for the endpoint.
API rate limits
There are limits to the number of API calls your application can make.
- Second Limit: 10 calls per second.
- Minute Limit: 600 calls per minute.
- Daily Limit: 10,000 calls per day.
Each API Response will include three response headers:
X-Rate-Limit-Limit
- indicates what rate limit period is active, either 1m or 1d.X-Rate-Limit-Remaining
- will indicate how many requests remain in the period.X-Rate-Limit-Reset
- indicates when the rate limit period will be reset.
Exceeding a rate limit will result in an HTTP 429 status code in the response. You can use the response headers above to determine when the next successful call can be made.
Pagination
Pagination is supported on all list endpoints. This feature allows you to manage the data you retrieve by breaking it into smaller, manageable parts called pages
.
Pagination is handled using two query string parameters: offset
and count
.
- offset: Defines the number of items to skip before starting to return entries. For instance, an offset of 10 skips the first 10 items.
- count: Specifies the maximum number of items to return in the response.
Here is a sample request using both parameters: GET /v3/applications?offset=10&count=20
The server's response to a paginated request includes three headers that carry metadata:
X-Raygun-Total-Count
: Represents the total number of available items.X-Raygun-Count
: Indicates the number of items returned in the current response.Link
: Provides a comma-separated list of URLs for navigation.
The Link
header delivers URLs corresponding to different pages of data:
self
: The URL for the current page of results.first
: The URL for the first page of results.prev
: The URL for the previous page of results.next
: The URL for the next page of results.last
: The URL for the last page of results.
Below is a sample Link
header, which showcases how these URLs are provided:
Link: <https://api.raygun.com/v3/applications?offset=40&count=20>; rel="self",
<https://api.raygun.com/v3/applications?offset=0&count=20>; rel="first",
<https://api.raygun.com/v3/applications?offset=20&count=20>; rel="prev",
<https://api.raygun.com/v3/applications?offset=60&count=20>; rel="next",
<https://api.raygun.com/v3/applications?offset=80&count=20>; rel="last"
This example assumes that there are 100 items, and the user is requesting pages of 20 items each. Notice that the offset value changes with each relation (first, prev, next, last), pointing to different pages
of data.
Ordering
Ordering provides a way to determine the sequence in which items are presented in the response. This feature is available on all list endpoints.
The orderBy
query string parameter is used to support ordering.
The orderBy
parameter is a comma-separated list of properties associated with the resource you're requesting. Each property can optionally be followed by either asc
(for ascending order) or desc
(for descending order). If no order is specified, the default is ascending order.
Here's an example of how you can use the orderBy
parameter to sort results. In this case, results are sorted first by the version in descending order, followed by the ownerName in ascending order:
GET /v3/applications/{app-id}/deployments?orderBy=version desc, ownerName
Please note that not all properties of a resource can be used for ordering. Refer to the API specification for a detailed list of properties that support the orderBy
operation for each endpoint.
Endpoints
Currently, the following endpoints and scopes are available:
Name | Description | Scope required |
---|---|---|
List applications | List applications for the plan(s) and the user which the token has access to | applications:read |
Get application by ID | Get an application by its identifier | applications:read |
Get application by API key | Get an application by its api key | applications:read |
Regenerate API key | Regenerates the API key for the given application | applications:write |
Get plans | List the plan(s) which the token belongs to | <Not Applicable> |
List teams | List teams for the plan(s) and the user which the token has access to | teams:read |
Get team by ID | Get a team by its identifier | teams:read |
List invitations | List invitations for the plan(s) and the user which the token has access to | invitations:read |
Get invitation by ID | Get an invitation by its identifier | invitations:read |
Send invitation | Send an invitation to a user | invitations:write |
Revoke invitation | Revoke a sent invitation | invitations:write |
List deployments | List deployments for an application | deployments:read |
Get deployment by ID | Get a deployment by its identifier | deployments:read |
Create deployment | Create a deployment for an application | deployments:write |
Create deployment with api key | Create a deployment for an application with the specified api key | deployments:write |
Update deployment | Update the details of a deployment | deployments:write |
Delete deployment | Delete a deployment | deployments:write |
List error groups | List error groups for an application | cr.errors:read |
Get error group by ID | Get an error group by its identifier | cr.errors:read |
Resolve error group | Set an error group to resolved, optionally with a version, and to discard from previous versions | cr.errors:write |
Activate error group | Re-activate an error group | cr.errors:write |
Ignore error group | Ignore an error group. If it occurs again it will become 'active' | cr.errors:write |
Permanently ignore error group | Permanently ignore an error group. Optionally specify to discard future occurrences | cr.errors:write |
List source maps | List source maps for an application | cr.source-maps:read |
Get source map by ID | Get the metadata of a source map by its identifier | cr.source-maps:read |
Upload source map | Upload a source map | cr.source-maps:write |
Delete source map | Delete a source map | cr.source-maps:write |
Delete all source maps | Deletes all source maps for an application | cr.source-maps:write |
Update source map | Updates the metadata of a source map | cr.source-maps:write |
List sessions | List sessions for an application | rum.sessions:read |
Get session by ID | Get a session by its identifier | rum.sessions:read |
List pages | List pages for an application | rum.pages:read |
Get page by ID | Get a page by its identifier | rum.pages:read |
Time-series page metrics | Aggregated time-series metrics data for pages | metrics:pages |
Histogram page metrics | Pre-bucketed histogram metrics data for pages | metrics:pages |
Time-series error metrics | Aggregated time-series metrics data for errors | metrics:errors |
List customers | List customers for an application | customers:read |
Get customer by ID | Get a customer by its identifier | customers:read |
We are always extending our offering of endpoints and scopes. You can make a request for your most needed API endpoints here.
This is version 3 of Raygun's API. While we transition, the RUM API will remain available.