Heroku

App · 16 actions

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

Actions

ActionWhat it does
Create an appCreate an app.
Delete an appDelete an app, with its dynos, config vars and add-ons.
Get accountGet the connected Heroku account: its email, name and default team.
Get an appGet an app's details: its web address, region, stack and maintenance mode.
Get config varsGet an app's config vars, each name with its value.
List appsList every app the account can reach, its own and its teams', by name.
List buildsList an app's builds, newest first, with each one's status.
List dynosList an app's running dynos, with each one's type, size and state.
List process typesList an app's process types (web, worker) with how many dynos of what size each runs.
List releasesList an app's releases, newest first: deploys, config changes and rollbacks.
Restart a dynoRestart one dyno of an app, such as web.1.
Restart all dynosRestart every dyno of an app.
Roll back to a releaseRoll an app back to an earlier release's code and config vars, as a new release.
Scale a process typeChange how many dynos a process type runs, or their size.
Set config varsAdd, change or remove an app's config vars.
Turn maintenance mode on or offTurn an app's maintenance mode on, so visitors see a maintenance page, or off again.

Create an app

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

Inputs

Namenametext
The app's name, 3 to 30 lowercase letters, digits or dashes. Heroku makes one up when this is blank.
Regionregiontext
Where the app runs. Default is United States.One of: us (United States), eu (Europe).
Stackstacktext
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

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.

Outputs

dataobject
The response from Heroku.
Example output
{
  "data": {}
}

List apps

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

Inputs

None.

Outputs

datalist
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
Limitlimitnumber
How many of the newest builds to return, from 1 to 1,000. Default is 200.From 1 to 1000.

Outputs

datalist
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.

Outputs

datalist
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.

Outputs

datalist
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
Limitlimitnumber
How many of the newest releases to return, from 1 to 1,000. Default is 200.From 1 to 1000.

Outputs

datalist
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
DynodynotextRequired
The dyno to restart, by name (web.1) or ID.

Outputs

dataobject
The response from Heroku.
Example output
{
  "data": {
    "accepted": true,
    "app": "example",
    "dyno": "example"
  }
}

Restart all dynos

Restart every dyno of an app.

Inputs

AppapptextRequired
The app, by name or ID.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
ReleasereleasetextRequired
The release to roll back to: its ID, or its version such as v12.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
Process typeprocess_typetextRequired
The process type to scale, such as web or worker.
Quantityquantitynumber
How many dynos to run. 0 stops the process type.At least 0.
Sizesizetext
The dyno size, such as Eco, Basic, Standard-1X, Standard-2X, Performance-M or Performance-L. Leave blank to keep the current size.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
Config vars to setsetobject
Config vars to add or change: each name with its new value.
Config vars to removeremovelist
Names of config vars to remove.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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

AppapptextRequired
The app, by name or ID.
Maintenancemaintenancetrue/falseRequired
On to show the maintenance page, off to serve the app again.

Outputs

dataobject
The response from Heroku.
Example output
{
  "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"
  }
}

On this page