Get application privileges Generally available; Added in 6.4.0

GET /_security/privilege

To use this API, you must have one of the following privileges:

  • The read_security cluster privilege (or a greater privilege such as manage_security or all).
  • The "Manage Application Privileges" global privilege for the application being referenced in the request.

Required authorization

  • Cluster privileges: read_security
External documentation

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • * object Additional properties
      Hide * attribute Show * attribute object
      • * object Additional properties
        Hide * attributes Show * attributes object
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"
      }
    }
  }
}