Create an API Key
Changed onThis creates an API Key, which will return the API Key components in the response. The Key ID will be found at data.id and the Key Secret will be found at data.attributes.secret. For security reasons the Key Secret will only be available during creation so make sure to save it.
To use a newly-created Ingest Key it should be passed in the X-Honeycomb-Team header with the API Key's ID and secret concatenated (and with no separator). For example, X-Honeycomb-Team: hcxik_1234567890123456789012345612345678901234567890123456789012
Check out our best practices for API Keys.
Request
- Base URLhttps://api.honeycomb.io
- URLhttps://api.honeycomb.io/2/teams/{teamSlug}/api-keys
- AuthHTTP bearer
Request body
Example request
{
"data": {
"attributes": {
"key_type": "ingest",
"name": "us-west-2 collectors key",
"description": "Used by the checkout service in prod. Rotate in AWS Secrets Manager.",
"timestamps": {
"created": "2022-09-22T17:32:11Z",
"updated": "2022-10-31T15:08:11Z"
}
},
"relationships": {
"environment": {
"data": {
"id": "hxenv_12345678901234567890123456"
}
}
}
}
}Response
Created
Example response
{
"data": {
"id": "hcxik_12345678901234567890123456",
"attributes": {
"key_type": "ingest",
"name": "us-west-2 collectors key",
"description": "Used by the checkout service in prod. Rotate in AWS Secrets Manager.",
"timestamps": {
"created": "2022-09-22T17:32:11Z",
"updated": "2022-10-31T15:08:11Z"
},
"secret": "12345678901234567890123456789"
},
"relationships": {
"environment": {
"data": {
"id": "hxenv_12345678901234567890123456"
}
},
"creator": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0"
}
},
"editor": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0"
}
}
},
"links": {
"self": "/2/teams/my-team/api-keys/hcxik_12345678901234567890123456"
}
}
}Changes
- info
added the new optional request property
//// - info
added the new optional request property
/// - info
added the new optional request property
//// - info
added
ingestconfigurationdiscriminator mapping keys to the/request property - info
added the optional property
////////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
////////to the response with the status - info
added
ingestconfigurationdiscriminator mapping keys to the/////response property for the response status
- info