# Rollbar

> Report errors, messages and deploys to Rollbar, and find, resolve and triage the items in a project.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/rollbar

## Actions

### Find the item for a reported occurrence

Find the item an occurrence was grouped into, by the occurrence's UUID, such as the one 'Report an error or message' returns. Rollbar answers that it can't find it until it has processed the report, usually within a few seconds.

**Inputs**

- Uuid (`uuid`, text, required): The occurrence's UUID.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "assigned_team_id": 1,
    "assigned_user_id": 1,
    "counter": 1,
    "environment": "example",
    "first_occurrence_id": 1,
    "first_occurrence_timestamp": 1,
    "framework": "example",
    "group_item_id": 1,
    "hash": "example",
    "id": 1,
    "last_activated_timestamp": 1,
    "last_occurrence_id": 1,
    "last_occurrence_timestamp": 1,
    "last_resolved_timestamp": 1,
    "level": "example",
    "platform": "example",
    "project_id": 1,
    "resolved_in_version": "example",
    "status": "example",
    "title": "example",
    "total_occurrences": 1
  }
}
```

### Get a deploy

Get a deploy by its ID: its environment, revision, status and times.

**Inputs**

- Deploy (`deploy_id`, number, required): The deploy, or its ID from an earlier step. At least 1.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "comment": "example",
    "environment": "example",
    "finish_time": 1,
    "id": 1,
    "local_username": "example",
    "project_id": 1,
    "revision": "example",
    "start_time": 1,
    "status": "example",
    "user_id": 1
  }
}
```

### Get an item

Get an item by its ID: its title, level, status, environment and when it first and last happened.

**Inputs**

- Item (`item_id`, number, required): The item, or its ID from an earlier step. At least 1.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "assigned_team_id": 1,
    "assigned_user_id": 1,
    "counter": 1,
    "environment": "example",
    "first_occurrence_id": 1,
    "first_occurrence_timestamp": 1,
    "framework": "example",
    "group_item_id": 1,
    "hash": "example",
    "id": 1,
    "last_activated_timestamp": 1,
    "last_occurrence_id": 1,
    "last_occurrence_timestamp": 1,
    "last_resolved_timestamp": 1,
    "level": "example",
    "platform": "example",
    "project_id": 1,
    "resolved_in_version": "example",
    "status": "example",
    "title": "example",
    "total_occurrences": 1
  }
}
```

### Get an item by its number

Get an item by its number in the project, the one in its Rollbar address (456 in rollbar.com/your-account/your-project/items/456).

**Inputs**

- Counter (`counter`, number, required): The item's number in the project. At least 1.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "assigned_team_id": 1,
    "assigned_user_id": 1,
    "counter": 1,
    "environment": "example",
    "first_occurrence_id": 1,
    "first_occurrence_timestamp": 1,
    "framework": "example",
    "group_item_id": 1,
    "hash": "example",
    "id": 1,
    "last_activated_timestamp": 1,
    "last_occurrence_id": 1,
    "last_occurrence_timestamp": 1,
    "last_resolved_timestamp": 1,
    "level": "example",
    "platform": "example",
    "project_id": 1,
    "resolved_in_version": "example",
    "status": "example",
    "title": "example",
    "total_occurrences": 1
  }
}
```

### List an item's occurrences

List each time an item happened, newest first, with everything that was sent with it.

**Inputs**

- Item (`item_id`, number, required): The item, or its ID from an earlier step. At least 1.
- Page (`page`, number): Which page of 20 to read, starting at 1. At least 1.
- Limit (`limit`, number): How many to return per page, up to 5,000. Rollbar returns 20 if left blank. From 1 to 5000.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "instances": [
      {
        "billable": 1,
        "data": {},
        "id": 1,
        "item_id": 1,
        "project_id": 1,
        "timestamp": 1,
        "version": 1
      }
    ],
    "page": 1
  }
}
```

### List deploys

List the project's deploys, most recent first.

**Inputs**

- Page (`page`, number): Which page of 20 to read, starting at 1. At least 1.
- Limit (`limit`, number): How many to return per page, up to 5,000. Rollbar returns 20 if left blank. From 1 to 5000.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "deploys": [
      {
        "comment": "example",
        "environment": "example",
        "finish_time": 1,
        "id": 1,
        "local_username": "example",
        "project_id": 1,
        "revision": "example",
        "start_time": 1,
        "status": "example",
        "user_id": 1
      }
    ],
    "page": 1
  }
}
```

### List environments

List the environments the project has seen, such as production and staging.

**Inputs**

- Page (`page`, number): Which page of 20 to read, starting at 1. At least 1.
- Limit (`limit`, number): How many to return per page, up to 5,000. Rollbar returns 20 if left blank. From 1 to 5000.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "environments": [
      {
        "environment": "example",
        "id": 1,
        "project_id": 1,
        "visible": 1
      }
    ],
    "page": 1
  }
}
```

### List items

List the project's items (the errors and messages Rollbar has grouped), 100 to a page, optionally only those with a status, level or environment, or matching a search.

**Inputs**

- Status (`status`, text): Only items with this status. One of: `active`, `resolved`, `muted`.
- Level (`level`, text): Only items with this level. One of: `critical`, `error`, `warning`, `info`, `debug`.
- Environment (`environment`, text): Only items in this environment.
- Query (`query`, text): A search, written as in the search box on Rollbar's Items page.
- Assigned user (`assigned_user`, text): Only items assigned to this Rollbar username. Use assigned or unassigned for any or no assignee.
- Page (`page`, number): Which page of 100 to read, starting at 1. At least 1.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "assigned_team_id": 1,
        "assigned_user_id": 1,
        "counter": 1,
        "environment": "example",
        "first_occurrence_id": 1,
        "first_occurrence_timestamp": 1,
        "framework": "example",
        "group_item_id": 1,
        "hash": "example",
        "id": 1,
        "last_activated_timestamp": 1,
        "last_occurrence_id": 1,
        "last_occurrence_timestamp": 1,
        "last_resolved_timestamp": 1,
        "level": "example",
        "platform": "example",
        "project_id": 1,
        "resolved_in_version": "example",
        "status": "example",
        "title": "example",
        "total_occurrences": 1
      }
    ],
    "page": 1,
    "total_count": 1
  }
}
```

### Report a deploy

Tell Rollbar a revision was deployed to an environment, so its items can be traced to the deploy that brought them. Report it as started and update it when it finishes, or report it once it has.

**Inputs**

- Environment (`environment`, text, required): The environment deployed to, such as production.
- Revision (`revision`, text, required): The revision deployed, usually a Git SHA.
- Status (`status`, text): How the deploy went. Rollbar uses succeeded if left blank. One of: `started`, `succeeded`, `failed`, `timed_out` (Timed out).
- Comment (`comment`, text): A note to show with the deploy.
- Rollbar username (`rollbar_username`, text): The Rollbar username of whoever deployed.
- Local username (`local_username`, text): The name of whoever deployed, shown when there's no Rollbar username.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "deploy_id": 1
  }
}
```

### Report an error or message

Send an error or message to Rollbar from a workflow. Rollbar groups it into an item, as it does what your code reports, and alerts your team as the project's notifications say. Returns the occurrence's UUID; 'Find the item for a reported occurrence' looks up the item once Rollbar has processed it, usually within a few seconds.

**Inputs**

- Environment (`environment`, text, required): Where it happened, such as production or staging. Rollbar adds a new environment the first time it sees its name.
- Message (`message`, text, required): The text to report.
- Level (`level`, text): How severe it is. Rollbar uses info if left blank. One of: `critical`, `error`, `warning`, `info`, `debug`.
- Title (`title`, text): The item's title, up to 255 characters. Rollbar makes one from the message if left blank.
- Custom (`custom`, object): Extra details to keep with it, such as an order number or a customer ID.
- Code version (`code_version`, text): The version of your code, up to 40 characters: a Git SHA, a semantic version or a build number.
- Context (`context`, text): Which part of your app it came from, such as checkout#submit.
- Fingerprint (`fingerprint`, text): Reports with the same fingerprint are grouped into one item. Rollbar decides the grouping if left blank.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "uuid": "example"
  }
}
```

### Update a deploy

Change the status of a deploy reported as started, when it succeeds, fails or times out, and optionally its comment.

**Inputs**

- Deploy (`deploy_id`, number, required): The deploy, or its ID from an earlier step. At least 1.
- Status (`status`, text, required): The deploy's new status. One of: `started`, `succeeded`, `failed`, `timed_out` (Timed out).
- Comment (`comment`, text): A new note to show with the deploy.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "comment": "example",
    "environment": "example",
    "finish_time": 1,
    "id": 1,
    "local_username": "example",
    "project_id": 1,
    "revision": "example",
    "start_time": 1,
    "status": "example",
    "user_id": 1
  }
}
```

### Update an item

Resolve, mute or reactivate an item, or change its level or title. Returns the fields that were changed.

**Inputs**

- Item (`item_id`, number, required): The item, or its ID from an earlier step. At least 1.
- Status (`status`, text): The item's new status. One of: `active`, `resolved`, `muted`.
- Resolved in version (`resolved_in_version`, text): When resolving, the version it was fixed in, up to 40 characters.
- Level (`level`, text): The item's new level. One of: `critical`, `error`, `warning`, `info`, `debug`.
- Title (`title`, text): The item's new title, up to 255 characters.

**Outputs**

- `data` (object): The response from Rollbar.

**Example output**

```json
{
  "data": {
    "level": "example",
    "resolved_in_version": "example",
    "status": "example",
    "title": "example"
  }
}
```
