Authorizations
Body
application/json
Response
The API key is created and returned in the body of the response.
curl --request POST \
--url https://api.elastic-cloud.com/api/v1/users/auth/keys \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"description": "<string>",
"expiration": "<string>",
"role_assignments": {
"deployment": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
}
],
"organization": [
{
"organization_id": "<string>",
"role_id": "<string>"
},
{
"organization_id": "<string>",
"role_id": "<string>"
}
],
"platform": [
{
"role_id": "<string>"
},
{
"role_id": "<string>"
}
],
"project": {
"elasticsearch": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"observability": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"security": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
]
}
}
}'{
"creation_date": "<dateTime>",
"description": "<string>",
"expiration_date": "<dateTime>",
"id": "<string>",
"key": "<string>",
"organization_id": "<string>",
"role_assignments": {
"deployment": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
}
],
"organization": [
{
"organization_id": "<string>",
"role_id": "<string>"
},
{
"organization_id": "<string>",
"role_id": "<string>"
}
],
"platform": [
{
"role_id": "<string>"
},
{
"role_id": "<string>"
}
],
"project": {
"elasticsearch": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"observability": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"security": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
]
}
},
"user_id": "<string>"
}Creates a new API key.
curl --request POST \
--url https://api.elastic-cloud.com/api/v1/users/auth/keys \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"description": "<string>",
"expiration": "<string>",
"role_assignments": {
"deployment": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
}
],
"organization": [
{
"organization_id": "<string>",
"role_id": "<string>"
},
{
"organization_id": "<string>",
"role_id": "<string>"
}
],
"platform": [
{
"role_id": "<string>"
},
{
"role_id": "<string>"
}
],
"project": {
"elasticsearch": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"observability": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"security": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
]
}
}
}'{
"creation_date": "<dateTime>",
"description": "<string>",
"expiration_date": "<dateTime>",
"id": "<string>",
"key": "<string>",
"organization_id": "<string>",
"role_assignments": {
"deployment": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"deployment_ids": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"role_id": "<string>"
}
],
"organization": [
{
"organization_id": "<string>",
"role_id": "<string>"
},
{
"organization_id": "<string>",
"role_id": "<string>"
}
],
"platform": [
{
"role_id": "<string>"
},
{
"role_id": "<string>"
}
],
"project": {
"elasticsearch": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"observability": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
],
"security": [
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
},
{
"all": "<boolean>",
"application_roles": [
"<string>",
"<string>"
],
"organization_id": "<string>",
"project_ids": [
"<string>",
"<string>"
],
"role_id": "<string>"
}
]
}
},
"user_id": "<string>"
}The API key is created and returned in the body of the response.