API

The official API documentation for Airbrake.

Authentication

To authorize, use this code:

curl "api_endpoint_here?key=(PROJECT_KEY|USER_KEY)"

Airbrake uses API keys to restrict access to the API. There are several kinds of keys:

  • Project API key (PROJECT_KEY) that is used to submit errors and track deploys. This key is what you configure the notifier agent in your app to use.
  • User API key (USER_KEY) is used to access to the project data through Airbrake APIs. Each Airbrake user has their own key.
  • User token (USER_TOKEN) that is identical to USER_KEY, but is valid for limited time.

Airbrake expects the API key to be included in all API requests to our servers in a query string that looks like the following:

?key=(PROJECT_KEY|USER_KEY|USER_TOKEN)

Create user token v4

curl -d "email=EMAIL&password=PASSWORD" "https://api.airbrake.io/api/v4/sessions"
{
  "token": "B20koMUuNDO0sep9rIzqomiQHkp4z7YpiN0P2Jmo0p9gElQsJ1z3qQYM23hTtVYY="
}

HTTP request

POST https://api.airbrake.io/api/v4/sessions

POST data

The API expects URL-encoded data.

KeyExample
emailUser email, e.g. john@airbrake.com.
PasswordUser password, e.g. qwerty.

Response

The API returns 200 OK status code on success and JSON data.

FieldComment
tokenUser token that can be passed to the API instead of USER_KEY.

Pagination

Almost all list APIs support pagination if you need access to all items. By default only first 20 items are returned.

{
  "collectionName": [item1, item2, ..., item20],
  "count": 12345
}

HTTP request

Get first page:

GET https://api.airbrake.io/api/v4/collectionName

Get second page:

GET https://api.airbrake.io/api/v4/collectionName?page=2

Ask for 100 items per page:

GET https://api.airbrake.io/api/v4/collectionName?limit=100

Query parameters

ParameterDefaultDescription
page1Page number.
limit20Number of items per page.

Response

FieldExampleComment
collectionNameprojectsEach API has different collection name. Some APIs return multiple collections.
count12345Total number of available items.
page2Actual page number that backend used internally.

Cursor pagination

Some list APIs use cursor-based pagination, that only allows to fetch next and previous page.

{
  "collectionName": [item1, item2, ..., item20],
  "start": "START_CURSOR",
  "end": "END_CURSOR"
}

HTTP request

Get next page:

GET https://api.airbrake.io/api/v4/collectionName?start=END_CURSOR

Get previous page:

GET https://api.airbrake.io/api/v4/collectionName?end=START_CURSOR

Query parameters

ParameterDefaultDescription
startStarting position within a result set from which to retrieve results. Used to retrieve next page.
endEnding position within a result set from which to retrieve results. Used to retrieve previous page.
limit20Number of items per page.

Response

FieldExampleComment
collectionNameprojectsEach API has different collection name. Some APIs return multiple collections.
startabcdefgPosition of the first element in the result set.
endabcdefgPosition of the last element in the result set.

Performance Monitoring

Route performance endpoint

With this endpoint you can report performance data for the routes in your application, the data will then become available in your project’s Performance Monitoring dashboard.

PUT data

The API expects JSON data to be sent with this request. Your PROJECT_ID and PROJECT_KEY are required to authenticate and report performance data.

PUT /api/v5/projects/PROJECT_ID/routes-stats

curl -X PUT -H "Content-Type: application/json" \
"https://api.airbrake.io/api/v5/projects/PROJECT_ID/routes-stats?key=PROJECT_KEY" \
-d '{
  "environment": "production",
  "routes": [
    {
      "method": "GET",
      "route": "/drinks/:drink_id",
      "statusCode": 200,
      "time": "2019-09-19T18:00:00+00:00",
      "count": 1,
      "sum": 50.0,
      "sumsq": 2500.0,
      "tdigest": "AAAAAkA0AAAAAAAAAAAAAUdqYAAB"
    }
  ]
}'
FieldRequiredtypeDescription
environmentfalseStringThis is the environment the route stat was reported from
routes[]trueArrayAn array of route objects describing their performance
routes/{i}/routetrueStringThe path describing your route e.g. '/drinks/:drink_id'
routes/{i}/methodtrueStringThe HTTP method as a string: 'GET', 'POST', 'PUT', …
routes/{i}/statusCodetrueIntegerThe response code returned: 201, 301, 404, 500, …
routes/{i}/counttrueIntegerThe number of requests to this route
routes/{i}/timetrueStringThe UTC time of the route activity to the minute, in RFC3339 format '2019-09-19T18:00:00+00:00'
routes/{i}/sumtrueFloatYour route’s response time in milliseconds
routes/{i}/sumsqtrueFloatThe sum above squared
routes/{i}/tdigesttrueStringThis value holds the routes percentile info as a t-digest, More info on t-digests

Responses

A successful PUT to this endpoint returns a 204 No Content. If any required fields are missing the PUT fails and returns a 400 Bad Request and the message in the response will state which key is missing.

Routes breakdown endpoint

The routes breakdown endpoint accepts the data that details how much time a request spent in each subtask such as DB querying, view rendering, cache writes and reads, and more. The data will then become available in each route’s detail view.

PUT data

The API expects JSON data to be sent with this request. Your PROJECT_ID and PROJECT_KEY are required to authenticate and report breakdown data.

PUT /api/v5/projects/PROJECT_ID/routes-breakdowns

curl -X PUT -H "Content-Type: application/json" \
"https://api.airbrake.io/api/v5/projects/PROJECT_ID/routes-breakdowns?key=PROJECT_KEY" \
-d '{
  "environment": "production",
  "routes": [
    {
      "route": "/drinks/:drink_id",
      "method": "GET",
      "responseType": "json",
      "count": 1,
      "sum": 50.0,
      "sumsq": 2500.0,
      "tdigest": "AAAAAkA0AAAAAAAAAAAAAUdqYAAB",
      "time": "2019-09-19T18:00:00+00:00",
      "groups": {
        "db": {
          "count": 1,
          "sum": 10.0,
          "sumsq": 100.0,
          "tdigest": "AAAAAkA0AAAAAAAAAAAAAUMDAAAB"
        },
        "view": {
          "count": 1,
          "sum": 40.0,
          "sumsq": 160.0,
          "tdigest": "AAAAAkA0AAAAAAAAAAAAAUPSgAAB"
        }
      }
    }
  ]
}'
FieldRequiredtypeDescription
environmentfalseStringThis is the environment the route stat was reported from
routes[]trueArrayAn array of route objects breaking down performance by part
routes/{i}/routetrueStringThe path describing your route e.g. '/drinks/:drink_id'
routes/{i}/methodtrueStringThe HTTP method as a string: 'GET', 'POST', 'PUT', …
routes/{i}/responseTypetrueStringThe type of response e.g. JSON, HTML, XML, …
routes/{i}/counttrueIntegerThe number of requests to this route
routes/{i}/sumtrueFloatThe route response time in milliseconds
routes/{i}/sumsqtrueFloatThe sum above squared
routes/{i}/tdigesttrueStringThe routes percentile info as a t-digest, More info on t-digests
routes/{i}/timetrueStringThe UTC time of the route activity to the minute, in RFC3339 format '2019-09-19T18:00:00+00:00'
routes/{i}/groupstrueObjectAn object describing individual pieces of performance
routes/{i}/groups/labeltrueObjectObject with a label e.g. database, view, cache, http, …
routes/{i}/groups/label/counttrueIntegerThe number of requests for this group
routes/{i}/groups/label/sumtrueFloatThe response time in milliseconds for this group
routes/{i}/groups/label/sumsqtrueFloatThe sum above squared
routes/{i}/groups/label/tdigesttrueStringThe group’s percentile info as a t-digest, More info on t-digests

Responses

A successful PUT to this endpoint returns a 204 No Content. If any required fields are missing the PUT fails and returns a 400 Bad Request and the message in the response will state which key is missing.

Database query stats

The queries stats endpoint accepts data for database query analysis. This is the most granular information detailing the time it took to complete each database query during a request. The data will then be usable in your project’s queries dashboard and in each route’s detail view.

PUT data

The API expects JSON data to be sent with this request. Your PROJECT_ID and PROJECT_KEY are required to authenticate and report breakdown data.

PUT /api/v5/projects/PROJECT_ID/queries-stats

curl -X PUT -H "Content-Type: application/json" \
"https://api.airbrake.io/api/v5/projects/PROJECT_ID/queries-stats?key=PROJECT_KEY" \
-d '{
  "environment":"production",
  "queries": [
    {
      "query":"SELECT * FROM things WHERE id = ?",
      "route":"/foo",
      "method":"GET",
      "function":"foo",
      "file":"foo.rb",
      "line":123,
      "count":1,
      "sum":60000.0,
      "sumsq":3600000000.0,
      "tdigest":"AAAAAkA0AAAAAAAAAAAAAUdqYAAB",
      "time":"2020-01-16T00:00:00+00:00"
    }
  ]
}'
FieldRequiredtypeDescription
environmenttrueStringThe environment the query stat was reported from
queries[]trueArrayAn array of query objects detailing the performance of each
queries/{i}/querytrueStringThe normalized SQL query being executed. e.g.
"SELECT * FROM things WHERE things.id = ?"
queries/{i}/routetrueStringThe route that triggered the query e.g. '/drinks/:drink_id'
queries/{i}/methodtrueStringThe HTTP method as a string: 'GET', 'POST', 'PUT', …
queries/{i}/functiontrueStringThe function or method that executed the query
queries/{i}/filetrueStringThe full path of the file containing the query
queries/{i}/linetrueIntegerThe file’s line number where the query was executed
queries/{i}/counttrueIntegerThe number of requests to this query
queries/{i}/sumtrueFloatThe query response time in milliseconds
queries/{i}/sumsqtrueFloatThe sum above squared
queries/{i}/tdigesttrueStringThe query’s percentile info as a t-digest, More info on t-digests
queries/{i}/timetrueStringThe UTC time of the query to the minute, in RFC3339 format '2019-09-19T18:00:00+00:00'

Responses

A successful PUT to this endpoint returns a 204 No Content. If any required fields are missing the PUT fails and returns a 400 Bad Request and the message in the response will state which key is missing.

Queue stats

The queue stats endpoint accepts data for tracking background job (AKA queues) analysis.

PUT data

The API expects JSON data to be sent with this request. Your PROJECT_ID and PROJECT_KEY are required to authenticate and report queue data.

PUT /api/v5/projects/PROJECT_ID/queues-stats

curl -X PUT -H "Content-Type: application/json" \
"https://api.airbrake.io/api/v5/projects/PROJECT_ID/queues-stats?key=PROJECT_KEY" \
-d '{
  "environment": "production",
  "queues": [
    {
      "queue": "NotificationWorker",
      "errorCount": 1,
      "count": 1,
      "sum": 60000.0,
      "sumsq": 3600000000.0,
      "tdigest": "AAAAAkA0AAAAAAAAAAAAAUdqYAAB",
      "time": "2020-01-16T00:00:00+00:00"
      }
    }
  ]
}'
FieldRequiredTypeDescription
environmenttrueStringThe environment the queue stat was reported from
queues[]trueArrayAn array of queue stat objects detailing the performance of each
queues/{i}/queuetrueStringName of queue
queues/{i}/errorCounttrueIntegerCount of errors related to the queue
queues/{i}/counttrueIntegerThe number of instances the queue stat covers
queues/{i}/sumtrueFloatQueue running duration in milliseconds
queues/{i}/sumsqtrueFloatThe sum above squared
queues/{i}/tdigesttrueStringThe queue’s percentile info as a t-digest, More info on t-digests
queues/{i}/timetrueStringThe UTC time of the queue stat to the minute, in RFC3339 format

Responses

A successful PUT to this endpoint returns a 204 No Content. If any required fields are missing the PUT fails and returns a 400 Bad Request and the message in the response will state which key is missing.

Error notification v3

Create notice v3

Notifies Airbrake that a new error has occurred in your application.

POST data

The API expects JSON data.

See POST Data Fields & POST Data Schema.

HTTP request

POST https://api.airbrake.io/api/v3/projects/PROJECT_ID/notices?key=PROJECT_KEY

curl -X POST -H "Content-Type: application/json" -d JSON "https://api.airbrake.io/api/v3/projects/PROJECT_ID/notices?key=PROJECT_KEY"

Example JSON for the above request:

{
  "errors": [
    {
      "type": "error1",
      "message": "message1",
      "backtrace": [
        {
          "file": "backtrace file",
          "line": 10,
          "function": "backtrace function",
          "code": {
            "1": "code",
            "2": "more code"
          }
        }
      ]
    },
    {
      "type": "error2",
      "message": "message2",
      "backtrace": [
        {
          "file": "backtrace file",
          "line": 10,
          "function": "backtrace function"
        }
      ]
    }
  ],
  "context": {
    "notifier": {
      "name": "notifier name",
      "version": "notifier version",
      "url": "notifier url"
    },
    "os": "Linux 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64",
    "hostname": "production-rails-server-1",
    "language": "Ruby 2.1.1",
    "environment": "production",
    "severity": "error",
    "version": "1.1.1",
    "url:": "http://some-site.com/example",
    "rootDirectory": "/home/app-root-directory",
    "user": {
      "id": "12345",
      "name": "root",
      "email": "root@root.com"
    },
    "route": "/pricing",
    "httpMethod": "POST"
  },
  "environment": {
    "PORT": "443",
    "CODE_NAME": "gorilla"
  },
  "session": {
    "basketId": "123",
    "userId": "456"
  },
  "params": {
    "page": "3",
    "sort": "name",
    "direction": "asc"
  }
}

POST data fields v3

FieldRequiredDescription
errorstrueAn array of objects describing the error that occurred.
errors/{i}/typefalseThe class name or type of error that occurred.
errors/{i}/messagefalseA short message describing the error that occurred.
errors/{i}/backtracefalseAn array of objects describing each line of the error’s backtrace.
errors/{i}/backtrace/{i}/filefalseThe full path of the file in this entry of the backtrace.
errors/{i}/backtrace/{i}/linefalseThe file’s line number in this entry of the backtrace.
errors/{i}/backtrace/{i}/columnfalseThe line’s column number in this entry of the backtrace.
errors/{i}/backtrace/{i}/functionfalseWhen available, the function or method name in this entry of the backtrace.
errors/{i}/backtrace/{i}/codefalseCurrent line of code plus a few lines around.
contextfalseAn object describing additional context for this error.
context/notifierfalseAn object describing the notifier client library.
context/notifier/namefalseThe name of the notifier client submitting the request, e.g. “airbrake-js”.
context/notifier/versionfalseThe version number of the notifier client submitting the request, e.g. “1.2.3”.
context/notifier/urlfalseA URL at which more information can be obtained concerning the notifier client.
context/environmentfalseThe name of the server environment in which the error occurred, e.g. “staging”, “production”, etc.
context/severityfalseHow severe the error that occurred. Allowed values: debug, info, notice, warning, error, critical, alert, emergency, invalid.
context/componentfalseThe component or module in which the error occurred. In MVC frameworks like Rails, this should be set to the controller. Otherwise, this can be set to a route or other request category.
context/actionfalseThe action in which the error occurred. If each request is routed to a controller action, this should be set here. Otherwise, this can be set to a method or other request subcategory.
context/osfalseDetails of the operating system on which the error occurred.
context/hostnamefalseThe hostname of the server on which the error occurred.
context/languagefalseDescribe the language on which the error occurred, e.g. “Ruby 2.1.1”.
context/versionfalseDescribe the application version, e.g. “v1.2.3”.
context/urlfalseThe application’s URL.
context/userAgentfalseThe requesting browser’s full user-agent string.
context/userAddrfalseThe IP address of the user that triggered the notice.
context/remoteAddrfalseThe IP address that reported the notice. This value is recorded by our API automatically. If you would like this not to be recorded for a notice, set this value to false.
context/rootDirectoryfalseThe application’s root directory path.
context/user/idfalseIf applicable, the current user’s ID.
context/user/namefalseIf applicable, the current user’s username.
context/user/emailfalseIf applicable, the current user’s email address.
context/routefalseApplication route that triggered this error.
context/httpMethodfalseHTTP method that was used to call “context/route”
environmentfalseAn object containing the current environment variables. Where the key is the variable name, e.g. { "PORT": "443", "CODE_NAME": "gorilla" }.
sessionfalseAn object containing the current session variables. Where the key is the variable name, e.g. { "basket_total": "1234", "user_id": "123" }.
paramsfalseAn object containing the request parameters. Where the key is the parameter name, e.g. { "page": "3", "sort": "desc" }.

POST data schema v3

The JSON POST data schema for the v3 notifier API.

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "errors": {
      "type": "array",
      "required": true,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {"type": "string", "required": false},
          "message": {"type": "string", "required": false},
          "backtrace": {
            "type": "array",
            "required": false,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "file": {"type": "string", "required": false},
                "function": {"type": "string", "required": false},
                "line": {"type": "number", "required": false},
                "column": {"type": "number", "required": false},
                "code": {"type": "object", "required": false}
              }
            }
          }
        }
      }
    },
    "context": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "environment": {"type": "string"},
        "component": {"type": "string"},
        "action": {"type": "string"},
        "os": {"type": "string"},
        "language": {"type": "string"},
        "environment": {"type": "string"},
        "severity": {"type": "string"},
        "version": {"type": "string"},
        "url": {"type": "string"},
        "userAgent": {"type": "string"},
        "userAddr": {"type": "string"},
        "remoteAddr": {"type": "string"},
        "rootDirectory": {"type": "string"},
        "hostname": {"type": "string"},
        "notifier": {
          "type": "object",
          "required": false,
          "additionalProperties": false,
          "properties": {
            "name": {"type": "string", "required": false},
            "version": {"type": "string", "required": false},
            "url": {"type": "string", "required": false}
          }
        },
        "user": {
          "type": "object",
          "required": false,
          "additionalProperties": false,
          "properties": {
            "id": {"type": "string"},
            "username": {"type": "string"},
            "name": {"type": "string"},
            "email": {"type": "string"}
          }
        }
      }
    },
    "environment": {"type": "object"},
    "session": {"type": "object"},
    "params": {"type": "object"}
  }
}

Response

On success, the API returns a 201 Created status with the following JSON data.

FieldComment
idThe UUID of the newly created error notice. This can be used to query the status of this error notice.
urlA URL that will take you to the error on the Airbrake dashboard.

Note: a success response means that the data has been received and accepted for processing. Use the url or id in the response to query the status of an error. This will tell you if the error has been processed, or if it has been rejected for reasons including invalid JSON or exceeded monthly quota.

If errors are sent in excess of the account’s monthly quota, the API will return a 429 Too many requests in last month - account has exceeded its monthly error quota status.

If the request body size exceeds 64KB, the API will reject the notice and return a 413 Request Entity Too Large status.

Projects v4

List projects v4

curl "https://api.airbrake.io/api/v4/projects?key=USER_KEY"
{
  "projects": [
    {
      "id": 1,
      "name": "Airbrake project name",
      "deployId": "1",
      "deployAt": "2014-09-26T17:37:33.638348Z",
      "noticeTotalCount": 1,
      "rejectionCount": 1,
      "fileCount": 1,
      "deployCount": 1,
      "groupResolvedCount": 1,
      "groupUnresolvedCount": 1
    }
  ]
}

HTTP request

GET https://api.airbrake.io/api/v4/projects?key=USER_KEY

Response

The API returns 200 OK status code on success.

Show project v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID?key=USER_KEY"
{
  "project": {
    "id": 1,
    "name": "Airbrake project name",
    "deployId": "1",
    "deployAt": "2014-09-26T17:37:33.638348Z",
    "noticeTotalCount": 1,
    "rejectionCount": 1,
    "fileCount": 1,
    "deployCount": 1,
    "groupResolvedCount": 1,
    "groupUnresolvedCount": 1
  }
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID?key=USER_KEY

Response

The API returns 200 OK status code on success.

Deploys v4

Create deploy v4

curl -X POST -H "Content-Type: application/json" -d '{"environment":"production","username":"john","email":"john@smith.com","repository":"https://github.com/airbrake/airbrake","revision":"38748467ea579e7ae64f7815452307c9d05e05c5","version":"v2.0"}' "https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys?key=PROJECT_KEY"

HTTP request

POST https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys?key=PROJECT_KEY

POST data

The API expects JSON data.

KeyExample
environmentproduction
usernamejohn
emailjohn@smith.com
repositoryhttps://github.com/airbrake/airbrake
revision38748467ea579e7ae64f7815452307c9d05e05c5
versionv2.0

Response

The API returns 201 Created status code on success.

List deploys v4

The API returns list of project deploys. See Pagination section for supported query parameters and response fields.

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys?key=USER_KEY"
{
  "deploys": [
    {
      "environment": "production",
      "username": "john",
      "email": "john@smith.com",
      "gravatarId": "767fc9c115a1b989744c755db47feb60",
      "repository": "https://github.com/airbrake/airbrake",
      "revision": "38748467ea579e7ae64f7815452307c9d05e05c5",
      "version": "v2.0"
    }
  ],
  "count": 1
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys?key=USER_KEY

Response

The API returns 200 OK status code on success.

Show deploy v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys/DEPLOY_ID?key=USER_KEY"
{
  "deploy": {
    "environment": "production",
    "username": "john",
    "email": "john@smith.com",
    "repository": "https://github.com/airbrake/airbrake",
    "revision": "38748467ea579e7ae64f7815452307c9d05e05c5",
    "version": "v2.0"
  }
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/deploys/DEPLOY_ID?key=USER_KEY

Response

The API returns 200 OK status code.

Groups v4

List groups v4

The API returns list of groups. See Pagination section for supported query parameters and response fields.

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups?key=USER_KEY"
{
  "groups": [
    {
      "id": 1,
      "projectId": 1,
      "resolved": false,
      "errors": [
        {
          "type": "error type",
          "message": "error message",
          "backtrace": [
            {
              "file": "/path/to/file",
              "function": "func_name",
              "line": 1,
              "column": 0
            }
          ]
        }
      ],
      "context": {
        "environment": "production"
      },
      "lastDeployId": "1",
      "lastDeployAt": "2014-09-26T17:37:33.638348Z",
      "lastNoticeId": "1",
      "lastNoticeAt": "2014-09-26T17:37:33.638348Z",
      "noticeCount": 1,
      "noticeTotalCount": 1,
      "createdAt": "2014-09-26T17:37:33.638348Z"
    }
  ],
  "count": 1
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups?key=USER_KEY

Query parameters

ParameterDefaultDescription
deploy_idFilters groups by deploy id.
archivedWhen set to true returns archived groups.
mutedWhen set to true returns muted groups.
start_timeReturns groups created after start_time.
end_timeReturns groups created before end_time.
orderlast_noticeSorts groups by last_notice, notice_count, weight and created fields.

Response

The API returns 200 OK status code on success.

Show group v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID?key=USER_KEY"
{
  "group": {
    "id": 1,
    "projectId": 1,
    "resolved": false,
    "errors": [
      {
        "type": "error type",
        "message": "error message",
        "backtrace": [
          {
            "file": "/path/to/file",
            "function": "func_name",
            "line": 1,
            "column": 0
          }
        ]
      }
    ],
    "context": {
      "environment": "production"
    },
    "lastDeployId": "1",
    "lastDeployAt": "2014-09-26T17:37:33.638348Z",
    "lastNoticeId": "1",
    "lastNoticeAt": "2014-09-26T17:37:33.638348Z",
    "noticeCount": 1,
    "noticeTotalCount": 1,
    "createdAt": "2014-09-26T17:37:33.638348Z"
  }
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID?key=USER_KEY

Response

The API returns 200 OK status code on success.

Mute group v4

This API removes group from the default list and disables all notifications.

curl -X PUT "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/muted?key=USER_KEY"

HTTP request

PUT https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/muted?key=USER_KEY

Response

The API returns 204 No Content status code on success.

Unmute group v4

Opposite of the mute group.

curl -X PUT "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/unmuted?key=USER_KEY"

HTTP request

PUT https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/unmuted?key=USER_KEY

Response

The API returns 204 No Content status code on success.

Delete group v4

The API permanently deletes group.

curl -X DELETE "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID?key=USER_KEY"

HTTP request

DELETE https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID?key=USER_KEY

List groups across all projects v4

The API returns list of groups across all projects. See Cursor pagination section for supported query parameters and response fields.

curl "https://api.airbrake.io/api/v4/groups?key=USER_KEY"
{
  "groups": [
    {
      "id": 1,
      "projectId": 1,
      "resolved": false,
      "errors": [
        {
          "type": "error type",
          "message": "error message",
          "backtrace": [
            {
              "file": "/path/to/file",
              "function": "func_name",
              "line": 1,
              "column": 0
            }
          ]
        }
      ],
      "context": {
        "environment": "production"
      },
      "lastDeployId": "1",
      "lastDeployAt": "2014-09-26T17:37:33.638348Z",
      "lastNoticeId": "1",
      "lastNoticeAt": "2014-09-26T17:37:33.638348Z",
      "noticeCount": 1,
      "noticeTotalCount": 1,
      "createdAt": "2014-09-26T17:37:33.638348Z"
    }
  ],
  "end": "d312cff95ca275d7d4"
}

HTTP request

GET https://api.airbrake.io/api/v4/groups?key=USER_KEY

Response

The API returns 200 OK status code on success.

Show group statistics

The API returns statistics for the group.

curl "https://api.airbrake.io/api/v5/projects/PROJECT_ID/groups/GROUP_ID/stats?key=USER_KEY"
{
  "projectId": PROJECT_ID,
  "groupId": GROUP_ID,
  "accepted": [904, 2013],
  "limited": [6784, 4245],
  "time": ["2018-06-12T09:00:00Z", "2018-06-12T10:00:00Z"]
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/stats?key=USER_KEY

Query parameters

ParameterRequiredDefaultDescription
periodTRUEAggregates results for the period. eg: minute, hour
time__gteTRUEFilters results by time >= VALUE. eg: 1699485224
time__ltFALSEcurrent timeFilters results by time < VALUE. eg: 1699485224
limitFALSE100Limits number of results.

Response

The API returns 200 OK status code on success.

Notices v4

List notices v4

The API returns list of group notices. See Pagination section for supported query parameters and response fields.

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/notices?key=USER_KEY"
{
  "count": 12345,
  "notices": [
    {
      "id": "1234560000000",
      "projectId": 100,
      "groupId": "2340000",
      "deployId": "34560000",
      "deployAt": "2020-09-21T21:44:30.72Z",
      "errors": [
        {
          "type": "RestClient::NotFound",
          "message": "404 Not Found",
          "backtrace": [
            {
              "file": "/restclient/abstract_response.rb",
              "function": "exception_with_response",
              "line": 223,
              "column": 0,
              "code": null
            },
            {
              "file": "/restclient/abstract_response.rb",
              "function": "return!",
              "line": 103,
              "column": 0,
              "code": null
            }
          ]
        }
      ],
      "context": {
        "environment": "staging",
        "hostname": "staging-host-2",
        "language": "ruby/2.7.0",
        "messageParams": {
          "0": 404
        },
        "messagePattern": "{} Not Found",
        "notifier": {
          "name": "airbrake-ruby",
          "url": "https://github.com/airbrake/airbrake-ruby",
          "version": "5.0.2"
        },
        "os": "x86_64-linux",
        "remoteAddr": "12.12.12.12",
        "remoteCountry": "United States",
        "remoteCountryCode": "US",
        "repository": "git@github.com:example/example-app.git",
        "revision": "abcdef12345",
        "rootDirectory": "/root/123",
        "severity": "error"
      },
      "environment": {
        "program_name": "JobWorker"
      },
      "session": null,
      "params": {
        "http_body": null,
        "http_code": null
      },
      "createdAt": "2020-09-21T22:48:00.385Z"
    }
  ],
  "page": 1
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/groups/GROUP_ID/notices?key=USER_KEY

Query parameters

ParameterDefaultDescription
versionFilters notices by version, e.g. version=1.0.

Response

The API returns 200 OK status code on success.

Response

The API returns 204 NO CONTENT status code on success.

Show notice status v4

The API returns notice status:

  • processed - notice is processed. groupId contains notice group id.
  • rejected - notice is rejected. message contains the reason, e.g. “app version is 1.2.1, wanted >= 1.3”.
  • archived - notice is archived according to the project retention limit.
  • not_found - notice does not exist or is being processed by Airbrake.

HTTP request

Note that NOTICE_UUID is returned by error notification API v3.

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/notice-status/NOTICE_UUID?key=USER_KEY"

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/notice-status/NOTICE_UUID?key=USER_KEY"
{
  "code": "processed",
  "groupId": "1"
}

Response

The API returns 200 OK status code on success and JSON data.

FieldComment
codeprocessed, rejected, archived or not_found.
groupIdgroupId contains notice group id if notice is processed.

Project activities v4

The API returns list of project activities. See Pagination section for supported query parameters and response fields.

List project activities v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/activities?key=USER_KEY"
{
  "activities": [
    {
      "projectId": 1,
      "userId": 1,
      "userName": "Mr. Smith",
      "userGravatarId": "8b7d4e7f9fddecc8d93d73b2c01c0549",
      "activity": "group.resolved",
      "trackableId": 1,
      "trackableType": "Group",
      "createdAt": "2014-07-22T11:59:01.791773+03:00",
      "updatedAt": "2014-07-22T11:59:01.791773+03:00"
    },
    {
      "projectId": 1,
      "userId": 1,
      "userName": "Mr. Smith",
      "userGravatarId": "8b7d4e7f9fddecc8d93d73b2c01c0549",
      "activity": "group.resolved",
      "trackableId": 2,
      "trackableType": "Group",
      "createdAt": "2014-07-22T12:59:01.791773+03:00",
      "updatedAt": "2014-07-22T12:59:01.791773+03:00"
    }
  ],
  "count": 42
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/activities?key=USER_KEY

Response

The API returns 200 OK status code on success.

Show project statistics

The API returns statistics for the project.

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/stats?key=USER_KEY"
{
  "projectId": PROJECT_ID,
  "accepted": [904, 2013],
  "limited": [0, 0],
  "overQuota": [0, 0],
  "time": ["2018-06-12T09:00:00Z", "2018-06-12T10:00:00Z"]
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/stats?key=USER_KEY

Query parameters

ParameterDefaultDescription
periodAggregates results for the period. Common periods are: 1m, 5m, 15m, 30m, 2h, 3h, 6h, 12h, and 24h.p
time__gteFilters results by time >= VALUE.
limit100Limits number of results.

Response

The API returns 200 OK status code on success.

Source maps v4

Create source map v4

curl -X POST -F file=@app.min.js.map -F name="https://example.com/app.min.js.map" -F pattern="%/app.min.js" "https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps?key=(PROJECT_KEY/USER_KEY)"
{
  "id": "100"
}

HTTP request

POST https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps?key=(PROJECT_KEY/USER_KEY)

POST data

KeyDescription
fileYour source map file
nameThe location of your minified version of app.js that should be publicly available
patternThe optional pattern="%/app.min.js" is a SQL LIKE pattern and it tells Airbrake to apply the uploaded source map to all files that match the pattern. An underscore (_) in pattern stands for (matches) any single character; a percent sign (%) matches any sequence of zero or more characters

Response

The API returns 200 OK status code on success.

List source maps v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps?key=USER_KEY"
{
  "count": 1,
  "sourcemaps": [
    {
      "id": "100",
      "projectId": 1,
      "name": "https://example.com/app.min.js.map",
      "pattern": "%/app.min.js",
      "usedAt": "2021-05-28T08:20:48.57109Z"
    }
  ]
}

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps?key=USER_KEY

Response

The API returns 200 OK status code on success.

Show source map v4

curl "https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps/SOURCE_MAP_ID?key=USER_KEY"

HTTP request

GET https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps/SOURCE_MAP_ID?key=USER_KEY

Response

The API returns 200 OK status code on success.

Delete source map v4

The API permanently deletes source map.

curl -X DELETE "https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps/SOURCE_MAP_ID?key=USER_KEY"

HTTP request

DELETE https://api.airbrake.io/api/v4/projects/PROJECT_ID/sourcemaps/SOURCE_MAP_ID?key=USER_KEY

iOS crash reports v3

Create iOS crash report v3

curl -X POST -H "Content-Type: application/json" -d '{"report":"REPORT_TEXT"}' "https://api.airbrake.io/api/v3/projects/PROJECT_ID/ios-reports?key=PROJECT_KEY"

HTTP request

POST https://api.airbrake.io/api/v3/projects/PROJECT_ID/ios-reports?key=PROJECT_KEY

POST data

The API expects JSON data.

KeyExample
report
contextSame as in create notice API.

Response

The API returns 201 Created status code on success.