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:
Sending deployment notifications manually
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:
Parameter | Required | Description |
---|---|---|
api_key | Required | Your project's API key |
deploy[environment] | Optional | The environment name. Example: production
|
deploy[revision] | Optional | The VCS revision being deployed. Could be a git hash, or a tag name. Example: 7cd4bac1bd7e2ddf858d10ee86e362c8d8e2f912
|
deploy[repository] | Optional | The base URL of the VCS repository. It should be HTTPS-style. Example: https://github.com/honeybadger-io/honeybadger-ruby
|
deploy[local_username] | Optional | The name of the user who is deploying. Example: Jane
|
Here's an example curl
command to do a deploy notification:
curl --data "deploy[environment]=production&deploy[local_username]=Mary&deploy[revision]=12345&deploy[repository]=https://github.com/user/repo.git&api_key=Your project API key" "https://api.honeybadger.io/v1/deploys"
You can also send a JSON payload when specifying the content type as application/json
:
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"}