Update an API key’s mutable attributes: name, description, and expires_at.
The key’s kind, role_id, on_call_role_id, and token cannot be changed after creation. To issue a new token, use the rotate endpoint. To change the role or kind, revoke the key and create a new one.
The new expires_at must be in the future and within 5 years.
curl --request PUT \
--url https://api.rootly.com/v1/api_keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "api_keys",
"attributes": {
"name": "<string>",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}
'{
"data": {
"id": "<string>",
"type": "api_keys",
"attributes": {
"name": "<string>",
"kind": "personal",
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"role_id": "<string>",
"on_call_role_id": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"grace_period_ends_at": "<string>"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Resource UUID
Show child attributes
API key updated
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://api.rootly.com/v1/api_keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "api_keys",
"attributes": {
"name": "<string>",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}
'{
"data": {
"id": "<string>",
"type": "api_keys",
"attributes": {
"name": "<string>",
"kind": "personal",
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"role_id": "<string>",
"on_call_role_id": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"grace_period_ends_at": "<string>"
}
}
}