How to hit the Heroku API

Heroku's Platform API at https://api.heroku.com needs Accept: application/vnd.heroku+json; version=3 on every request.

Authentication

Create a token at Account settings → API key, or heroku authorizations:create. Send it as Authorization: Bearer <token>. In the examples it's written {{HEROKU_API_KEY}}.

Full reference: https://devcenter.heroku.com/articles/platform-api-reference

List apps

curl https://api.heroku.com/apps \
  -H "Authorization: Bearer {{HEROKU_API_KEY}}" \
  -H "Accept: application/vnd.heroku+json; version=3"
Run in PostTaco

An app's dynos

curl https://api.heroku.com/apps/{{APP_NAME}}/dynos \
  -H "Authorization: Bearer {{HEROKU_API_KEY}}" \
  -H "Accept: application/vnd.heroku+json; version=3"
Run in PostTaco

An app's releases

curl https://api.heroku.com/apps/{{APP_NAME}}/releases \
  -H "Authorization: Bearer {{HEROKU_API_KEY}}" \
  -H "Accept: application/vnd.heroku+json; version=3"
Run in PostTaco