Getting Started

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 ping the API, you can simply run the following command:

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

You will get back 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

Many operations 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/
post_client_itemCan perform POST requests to /deploy/ and /item/, but only if the item has a client-side (browser, mobile) platform.
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.

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.

HTTP responses

The API can return the following HTTP response codes:

CodeTypeDescription
200OKOperation was completed successfully
400Bad requestThe request was malformed and could not be parsed.
403Access deniedAccess token was missing, invalid, or does not have the necessary permissions.
404Not foundThe 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 largeThe request exceeded the maximum size of 128KB.
422Unprocessable EntityThe 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, this return 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 5, 2022