Get application privileges
Generally available; Added in 6.4.0
To use this API, you must have one of the following privileges:
- The
read_security
cluster privilege (or a greater privilege such asmanage_security
orall
). - The "Manage Application Privileges" global privilege for the application being referenced in the request.
Required authorization
- Cluster privileges:
read_security
GET
/_security/privilege
Console
GET /_security/privilege/myapp/read
resp = client.security.get_privileges(
application="myapp",
name="read",
)
const response = await client.security.getPrivileges({
application: "myapp",
name: "read",
});
response = client.security.get_privileges(
application: "myapp",
name: "read"
)
$resp = $client->security()->getPrivileges([
"application" => "myapp",
"name" => "read",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/read"
Response examples (200)
A successful response from `GET /_security/privilege/myapp/read`. The response contains information about the `read` privilege for the `app01` application.
{
"myapp": {
"read": {
"application": "myapp",
"name": "read",
"actions": [
"data:read/*",
"action:login"
],
"metadata": {
"description": "Read access to myapp"
}
}
}
}