Rollbar API

The Rollbar API provides a RESTful interface to much of the data in the system. It is used by our official SDKs to report errors/exceptions, deploys, and other messages. It can be used to create SDKs for additional languages, get data out to integrate with other systems, or whatever else you can imagine. If the API is missing something you'd like to see, please let us know.

Ping

To test whether you're able to reach the API, you can run the following command:

curl 'https://api.rollbar.com/api/1/status/ping'

You will receive pong from the API if your request was successful.

Timestamps

All timestamps (inputs and outputs) are GMT unix timestamps.

Authentication

Authentication is done via access token included as the header X-Rollbar-Access-Token.

curl --header 'X-Rollbar-Access-Token: YOUR_ACCESS_TOKEN' 'https://api.rollbar.com/api/1/item/12345'

Note: Parameter-based authentication (query string or form data) is supported by some API endpoints, but is deprecated.

Project Access Tokens

Most operations are performed at the project level and require a project-specific access token. You can find and administer your project access tokens in Settings -> Project Access Tokens. Project access tokens can have any or all of the following scopes:

ScopeDescription
post_server_itemCan perform all POST requests to /deploy/ and /item/. Can also be used to upload source maps (JS, proguard, dSym, flutter)
post_client_itemCan perform POST requests to /item/, but only if the item has a client-side platform (browser, mobile).
readCan perform all GET requests
writeCan perform PATCH and DELETE requests.

New projects are created with four tokens, one with each scope. As client tokens often need to be embedded in publicly-visible code (i.e the HTML source of a page), we recommend keeping this setup with an isolated post_client_item-only token.

You can have multiple active tokens within a project, and you can delete or disable tokens. Tokens can be managed in the UI or via the API. This can be used to rotate tokens or to use different tokens for different environments, each with their own user-defined rate limit.

Account Access Tokens

Operations performed at the level of the account require an account-specific access token. These can be found and managed at {Account name} Settings -> Account Access Tokens. Account access tokens can have the following scopes:

ScopeDescription
readSupports all GET operations at the account level.
writeSupports all POST, PUT, PATCH, and DELETE operations at the account level.

You can have multiple active tokens within an account, and you can delete or disable tokens. Tokens can be managed in the UI or via the API.

HTTP Responses

The API can return the following HTTP response codes:

CodeTypeDescription
200OKOperation was completed successfully
400Bad requestA 400 error code means the request was malformed and could not be parsed.
403Access deniedA 403 error code means the access token was missing, invalid, or does not have the necessary permissions.
404Not foundA 404 error code means the requested resource was not found. This response will be returned if the URL is entirely invalid (i.e. /asdf), or if it is a URL that could be valid but is referencing something that does not exist (i.e. /item/12345).
413Request entity too largeA 413 error code means the request exceeded the maximum size of 128KB.
422Unprocessable EntityA 422 error code means the request was parseable (i.e. valid JSON), but some parameters were missing or otherwise invalid.
429Too Many RequestsIf rate limiting is enabled for your access token, a 429 error code signifies that the rate limit has been reached and the item was not processed.

Examples

LinkAuthorLanguageDescription
api-examplesRollbarPythonExamples using RQL, deploys, occurrences, and reports
api-people-exampleRollbarPythonShows how to gather the Person data for each occurrence of a list of items
rolltoolsJonathan SlateRubyA few utilities using the Rollbar API

Last updated: August 15, 2024