See Heroku Platform API for details.
- Config Vars
- Get
curl -n -X GET https://api.heroku.com/apps/${APP_NAME}/config-vars \
-H "Accept: application/vnd.heroku+json; version=3"
- Update
curl -n -X PATCH https://api.heroku.com/apps/${APP_NAME}/config-vars \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Content-Type: application/json" \
-d '{ \
"ERROR_PAGE_URL ": "//s3.amazonaws.com/heroku_pages/error.html", \
"OTHER_CONFIG ": "abcd", \
}'
- Maintenance Mode
curl -n -X PATCH https://api.heroku.com/apps/${APP_NAME} \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Content-Type: application/json" \
-d '{ \
"maintenance": true \
}'
curl -n
: Must read .netrc for user name and password
# .netrc example
machine api.heroku.com
login [email protected]
password 12345678-abcd-1234-efgh-ijkl5678mnop
or explicitly specify Authorization:
header
-H "Authorization: Bearer 12345678-abcd-1234-efgh-ijkl5678mnop" \