# Heroku

> Manage Heroku apps: restart and scale dynos, set config vars, roll back releases, and watch for new releases.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/heroku

## Actions

### Create an app

Create an app. It runs nothing, and costs nothing, until you deploy and scale it.

**Inputs**

- Name (`name`, text): The app's name, 3 to 30 lowercase letters, digits or dashes. Heroku makes one up when this is blank.
- Region (`region`, text): Where the app runs. Default is United States. One of: `us` (United States), `eu` (Europe).
- Stack (`stack`, text): The base image the app runs on. Default is Heroku's current default, heroku-24. One of: `heroku-24` (heroku-24 (default)), `heroku-26`, `heroku-22` (heroku-22 (deprecated)), `cnb` (Cloud Native Buildpacks (cnb)), `container` (Docker image (container)).

**Outputs**

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

**Example output**

```json
{
  "data": {
    "acm": true,
    "archived_at": "example",
    "build_stack": {
      "id": "example",
      "name": "example"
    },
    "buildpack_provided_description": "example",
    "created_at": "example",
    "generation": {
      "id": "example",
      "name": "example"
    },
    "git_url": "example",
    "id": "example",
    "internal_routing": true,
    "maintenance": true,
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "region": {
      "id": "example",
      "name": "example"
    },
    "released_at": "example",
    "repo_size": 1,
    "slug_size": 1,
    "space": {
      "id": "example",
      "name": "example",
      "shield": true
    },
    "stack": {
      "id": "example",
      "name": "example"
    },
    "team": {
      "id": "example",
      "name": "example"
    },
    "updated_at": "example",
    "web_url": "example"
  }
}
```

### Delete an app

Delete an app, with its dynos, config vars and add-ons. This can't be undone.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "acm": true,
    "archived_at": "example",
    "build_stack": {
      "id": "example",
      "name": "example"
    },
    "buildpack_provided_description": "example",
    "created_at": "example",
    "generation": {
      "id": "example",
      "name": "example"
    },
    "git_url": "example",
    "id": "example",
    "internal_routing": true,
    "maintenance": true,
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "region": {
      "id": "example",
      "name": "example"
    },
    "released_at": "example",
    "repo_size": 1,
    "slug_size": 1,
    "space": {
      "id": "example",
      "name": "example",
      "shield": true
    },
    "stack": {
      "id": "example",
      "name": "example"
    },
    "team": {
      "id": "example",
      "name": "example"
    },
    "updated_at": "example",
    "web_url": "example"
  }
}
```

### Get account

Get the connected Heroku account: its email, name and default team.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "allow_tracking": true,
    "beta": true,
    "country_of_residence": "example",
    "created_at": "example",
    "default_team": {
      "id": "example",
      "name": "example"
    },
    "delinquent_at": "example",
    "email": "example",
    "federated": true,
    "id": "example",
    "last_login": "example",
    "name": "example",
    "sms_number": "example",
    "suspended_at": "example",
    "two_factor_authentication": true,
    "updated_at": "example",
    "verified": true
  }
}
```

### Get an app

Get an app's details: its web address, region, stack and maintenance mode.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "acm": true,
    "archived_at": "example",
    "build_stack": {
      "id": "example",
      "name": "example"
    },
    "buildpack_provided_description": "example",
    "created_at": "example",
    "generation": {
      "id": "example",
      "name": "example"
    },
    "git_url": "example",
    "id": "example",
    "internal_routing": true,
    "maintenance": true,
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "region": {
      "id": "example",
      "name": "example"
    },
    "released_at": "example",
    "repo_size": 1,
    "slug_size": 1,
    "space": {
      "id": "example",
      "name": "example",
      "shield": true
    },
    "stack": {
      "id": "example",
      "name": "example"
    },
    "team": {
      "id": "example",
      "name": "example"
    },
    "updated_at": "example",
    "web_url": "example"
  }
}
```

### Get config vars

Get an app's config vars, each name with its value. Values are often secrets, and show in the run's history.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

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

**Example output**

```json
{
  "data": {}
}
```

### List apps

List every app the account can reach, its own and its teams', by name.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Heroku.

**Example output**

```json
{
  "data": [
    {
      "acm": true,
      "archived_at": "example",
      "build_stack": {
        "id": "example",
        "name": "example"
      },
      "buildpack_provided_description": "example",
      "created_at": "example",
      "generation": {
        "id": "example",
        "name": "example"
      },
      "git_url": "example",
      "id": "example",
      "internal_routing": true,
      "maintenance": true,
      "name": "example",
      "owner": {
        "email": "example",
        "id": "example"
      },
      "region": {
        "id": "example",
        "name": "example"
      },
      "released_at": "example",
      "repo_size": 1,
      "slug_size": 1,
      "space": {
        "id": "example",
        "name": "example",
        "shield": true
      },
      "stack": {
        "id": "example",
        "name": "example"
      },
      "team": {
        "id": "example",
        "name": "example"
      },
      "updated_at": "example",
      "web_url": "example"
    }
  ]
}
```

### List builds

List an app's builds, newest first, with each one's status.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Limit (`limit`, number): How many of the newest builds to return, from 1 to 1,000. Default is 200. From 1 to 1000.

**Outputs**

- `data` (list): The response from Heroku.

**Example output**

```json
{
  "data": [
    {
      "app": {
        "id": "example"
      },
      "buildpacks": [
        {
          "name": "example",
          "url": "example"
        }
      ],
      "created_at": "example",
      "id": "example",
      "output_stream_url": "example",
      "release": {
        "id": "example"
      },
      "slug": {
        "id": "example"
      },
      "source_blob": {
        "checksum": "example",
        "version": "example",
        "version_description": "example"
      },
      "stack": "example",
      "status": "example",
      "updated_at": "example",
      "user": {
        "email": "example",
        "id": "example"
      }
    }
  ]
}
```

### List dynos

List an app's running dynos, with each one's type, size and state.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

- `data` (list): The response from Heroku.

**Example output**

```json
{
  "data": [
    {
      "app": {
        "id": "example",
        "name": "example"
      },
      "attach_url": "example",
      "command": "example",
      "created_at": "example",
      "id": "example",
      "name": "example",
      "release": {
        "id": "example",
        "version": 1
      },
      "size": "example",
      "state": "example",
      "type": "example",
      "updated_at": "example"
    }
  ]
}
```

### List process types

List an app's process types (web, worker) with how many dynos of what size each runs.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

- `data` (list): The response from Heroku.

**Example output**

```json
{
  "data": [
    {
      "app": {
        "id": "example",
        "name": "example"
      },
      "command": "example",
      "created_at": "example",
      "dyno_size": {
        "id": "example",
        "name": "example"
      },
      "id": "example",
      "quantity": 1,
      "size": "example",
      "type": "example",
      "updated_at": "example"
    }
  ]
}
```

### List releases

List an app's releases, newest first: deploys, config changes and rollbacks.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Limit (`limit`, number): How many of the newest releases to return, from 1 to 1,000. Default is 200. From 1 to 1000.

**Outputs**

- `data` (list): The response from Heroku.

**Example output**

```json
{
  "data": [
    {
      "addon_plan_names": [
        "example"
      ],
      "app": {
        "id": "example",
        "name": "example"
      },
      "artifacts": [
        {
          "id": "example",
          "type": "example"
        }
      ],
      "created_at": "example",
      "current": true,
      "description": "example",
      "eligible_for_rollback": true,
      "id": "example",
      "output_stream_url": "example",
      "slug": {
        "id": "example"
      },
      "status": "example",
      "updated_at": "example",
      "user": {
        "email": "example",
        "id": "example"
      },
      "version": 1
    }
  ]
}
```

### Restart a dyno

Restart one dyno of an app, such as web.1.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Dyno (`dyno`, text, required): The dyno to restart, by name (web.1) or ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "accepted": true,
    "app": "example",
    "dyno": "example"
  }
}
```

### Restart all dynos

Restart every dyno of an app.

**Inputs**

- App (`app`, text, required): The app, by name or ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "accepted": true,
    "app": "example"
  }
}
```

### Roll back to a release

Roll an app back to an earlier release's code and config vars, as a new release.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Release (`release`, text, required): The release to roll back to: its ID, or its version such as v12.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "addon_plan_names": [
      "example"
    ],
    "app": {
      "id": "example",
      "name": "example"
    },
    "artifacts": [
      {
        "id": "example",
        "type": "example"
      }
    ],
    "created_at": "example",
    "current": true,
    "description": "example",
    "eligible_for_rollback": true,
    "id": "example",
    "output_stream_url": "example",
    "slug": {
      "id": "example"
    },
    "status": "example",
    "updated_at": "example",
    "user": {
      "email": "example",
      "id": "example"
    },
    "version": 1
  }
}
```

### Scale a process type

Change how many dynos a process type runs, or their size. More or larger dynos cost more.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Process type (`process_type`, text, required): The process type to scale, such as web or worker.
- Quantity (`quantity`, number): How many dynos to run. 0 stops the process type. At least 0.
- Size (`size`, text): The dyno size, such as Eco, Basic, Standard-1X, Standard-2X, Performance-M or Performance-L. Leave blank to keep the current size.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "app": {
      "id": "example",
      "name": "example"
    },
    "command": "example",
    "created_at": "example",
    "dyno_size": {
      "id": "example",
      "name": "example"
    },
    "id": "example",
    "quantity": 1,
    "size": "example",
    "type": "example",
    "updated_at": "example"
  }
}
```

### Set config vars

Add, change or remove an app's config vars. Heroku restarts the app's dynos to apply them. Answers with names only, never values.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Config vars to set (`set`, object): Config vars to add or change: each name with its new value.
- Config vars to remove (`remove`, list): Names of config vars to remove.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "config_var_names": [
      "example"
    ],
    "removed": [
      "example"
    ],
    "set": [
      "example"
    ]
  }
}
```

### Turn maintenance mode on or off

Turn an app's maintenance mode on, so visitors see a maintenance page, or off again.

**Inputs**

- App (`app`, text, required): The app, by name or ID.
- Maintenance (`maintenance`, true/false, required): On to show the maintenance page, off to serve the app again.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "acm": true,
    "archived_at": "example",
    "build_stack": {
      "id": "example",
      "name": "example"
    },
    "buildpack_provided_description": "example",
    "created_at": "example",
    "generation": {
      "id": "example",
      "name": "example"
    },
    "git_url": "example",
    "id": "example",
    "internal_routing": true,
    "maintenance": true,
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "region": {
      "id": "example",
      "name": "example"
    },
    "released_at": "example",
    "repo_size": 1,
    "slug_size": 1,
    "space": {
      "id": "example",
      "name": "example",
      "shield": true
    },
    "stack": {
      "id": "example",
      "name": "example"
    },
    "team": {
      "id": "example",
      "name": "example"
    },
    "updated_at": "example",
    "web_url": "example"
  }
}
```
