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:
Scope | Description |
---|---|
post_server_item | Can perform all POST requests to /deploy/ and /item/ |
post_client_item | Can perform POST requests to /deploy/ and /item/ , but only if the item has a client-side (browser, mobile) platform. |
read | Can perform all GET requests |
write | Can 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:
Scope | Description |
---|---|
read | Supports all GET operations at the account level. |
write | Supports all POST , PUT , PATCH , and DELETE operations at the account level. |
HTTP responses
The API can return the following HTTP response codes:
Code | Type | Description |
---|---|---|
200 | OK | Operation was completed successfully |
400 | Bad request | The request was malformed and could not be parsed. |
403 | Access denied | Access token was missing, invalid, or does not have the necessary permissions. |
404 | Not found | 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 ). |
413 | Request entity too large | The request exceeded the maximum size of 128KB. |
422 | Unprocessable Entity | The request was parseable (i.e. valid JSON), but some parameters were missing or otherwise invalid. |
429 | Too Many Requests | If 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
Link | Author | Language | Description |
---|---|---|---|
api-examples | Rollbar | Python | Examples using RQL, deploys, occurrences, and reports |
api-people-example | Rollbar | Python | Shows how to gather the Person data for each occurrence of a list of items |
rolltools | Jonathan Slate | Ruby | A few utilities using the Rollbar API |
Last updated: August 5, 2022