Skip to content

Reporting deployments

Reporting deployments to our API allows you to see a history of deployments on each project’s Deployments page. This can be useful for tracking when changes were made to your application, and for correlating changes with errors.

Honeybadger has specific features for tracking deployments for some of our supported languages:

We also support reporting deployments via the following methods:

If you need to manually notify Honeybadger of a deploy, you can use our API directly.

To do this, make a POST request to https://api.honeybadger.io/v1/deploys with the following parameters:

ParameterRequiredDescription
api_keyRequiredYour project’s API key
deploy[environment]OptionalThe environment name.
Example: production
deploy[revision]OptionalThe VCS revision being deployed. Could be a git hash, or a tag name.
Example: 7cd4bac1bd7e2ddf858d10ee86e362c8d8e2f912
deploy[repository]OptionalThe base URL of the VCS repository. It should be HTTPS-style.
Example: https://github.com/honeybadger-io/honeybadger-ruby
deploy[local_username]OptionalThe name of the user who is deploying.
Example: Jane

Here’s an example curl command to do a deploy notification:

Terminal window
HONEYBADGER_ENV="production" \
HONEYBADGER_REVISION="$(git rev-parse HEAD)" \
HONEYBADGER_REPOSITORY="$(git config --get remote.origin.url)" \
HONEYBADGER_API_KEY="Your project API key" \
&& curl -g "https://api.honeybadger.io/v1/deploys?deploy[environment]=$HONEYBADGER_ENV&deploy[local_username]=$USER&deploy[revision]=$HONEYBADGER_REVISION&deploy[repository]=$HONEYBADGER_REPOSITORY&api_key=$HONEYBADGER_API_KEY"

You can also send a JSON payload when specifying the content type as application/json:

Terminal window
curl https://api.honeybadger.io/v1/deploys \
-H 'X-API-Key: Your project API key' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"deploy": {
"environment": "production",
"local_username": "sam",
"revision": "7cd4bac1bd7e2ddf858d10ee86e362c8d8e2f912",
"repository": "https://github.com/someuser/somerepo"
}
}'

If everything goes well, you’ll get a response saying {"status":"OK"}