Permissions Info API
Introduced 1.0
Retrieves the evaluated REST API permissions for the current user.
Endpoints
GET /_plugins/_security/api/permissionsinfo
Example request
GET _plugins/_security/api/permissionsinfo
Example response
{
"user": "User [name=admin, backend_roles=[admin], requestedTenant=null]",
"user_name": "admin",
"has_api_access": true,
"disabled_endpoints": {}
}
Response body fields
The response body is a JSON object with the following fields.
| Field | Data type | Description |
|---|---|---|
user | String | A string representation of the current user, including the user name, backend roles, and requested tenant. |
user_name | String | The name of the current user. |
has_api_access | Boolean | Whether the current user can call the Security APIs. |
disabled_endpoints | Object | The Security API endpoints that are disabled for the current user. Each key is an endpoint name and each value is the list of HTTP methods disabled for it. The object is empty when no endpoints are disabled. |