Get roles
- GET /_security/role/{name}
- GET /_security/role
Get roles in the native realm. The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The get roles API cannot retrieve roles that are defined in roles files.
- Cluster privileges:
read_security
Path Parameters
-
nameName | Nameoptional -
The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.
Leave it out to use
/_security/role.
Query Parameters
-
include_implicitboolean · default: false If
true, include privileges that are implicitly granted by registeredImplicitPrivilegesProvidersalongside the explicitly configured privileges. Each implicit entry in the response is annotated withimplicitly_granted: true.
Response
application/json
Response Type: map string to Role