Ingestion keys CLI reference
The ingestion-keys command lets you manage a project’s ingestion keys. An
app uses an ingestion key (hbp_) to send errors and events to Honeybadger.
The web UI calls it the project’s API key.
The commands use the
v3 Data API.
--cli-input-json and --output json use the v3 JSON documented there.
All ingestion-keys commands need a project ID. Pass --project-id, or set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.
List ingestion keys
Section titled “List ingestion keys”hb ingestion-keys list --project-id Xk9mZpRequired flags:
--project-id— Project ID. Required unless you set a default withHONEYBADGER_PROJECT_IDorproject_idin the configuration file.
Optional flags:
-o, --output— Output format:tableorjson(default:table)
Get ingestion key details
Section titled “Get ingestion key details”hb ingestion-keys get --project-id Xk9mZp --id Kp7mZq2xThe output includes the key’s value.
Required flags:
--project-id— Project ID. Required unless you set a default withHONEYBADGER_PROJECT_IDorproject_idin the configuration file.--id— Ingestion key ID
Optional flags:
-o, --output— Output format:textorjson(default:text)
Create an ingestion key
Section titled “Create an ingestion key”hb ingestion-keys create --project-id Xk9mZp --cli-input-json '{"label": "CI"}'
# A key without a labelhb ingestion-keys create --project-id Xk9mZp --cli-input-json '{}'A project can hold a limited number of keys.
Required flags:
--project-id— Project ID. Required unless you set a default withHONEYBADGER_PROJECT_IDorproject_idin the configuration file.--cli-input-json— JSON payload (inline string orfile://path)
JSON fields:
label— Optional name for the key
Optional flags:
-o, --output— Output format:textorjson(default:text)
Update an ingestion key
Section titled “Update an ingestion key”hb ingestion-keys update --project-id Xk9mZp --id Kp7mZq2x --cli-input-json '{"label": "Deploys"}'You can change a key’s label but not its value. A label sent as null is
cleared.
Required flags:
--project-id— Project ID. Required unless you set a default withHONEYBADGER_PROJECT_IDorproject_idin the configuration file.--id— Ingestion key ID--cli-input-json— JSON payload with fields to update
Delete an ingestion key
Section titled “Delete an ingestion key”hb ingestion-keys delete --project-id Xk9mZp --id Kp7mZq2xApps still sending with the key stop reporting. You can’t delete a project’s last key.
Required flags:
--project-id— Project ID. Required unless you set a default withHONEYBADGER_PROJECT_IDorproject_idin the configuration file.--id— Ingestion key ID