This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Get all Kibana roles API
editGet all Kibana roles API
edit[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Retrieve all Kibana roles.
Prerequisite
editTo use the get role API, you must have the manage_security
cluster privilege.
Request
editGET <kibana host>:<port>/api/security/role
Response code
edit-
200
- Indicates a successful call.
Example
editThe API returns the following:
[ { "name": "my_kibana_role", "description": "My kibana role description", "metadata" : { "version" : 1 }, "transient_metadata": { "enabled": true }, "elasticsearch": { "indices": [ ], "cluster": [ ], "run_as": [ ] }, "kibana": [{ "base": [ "all" ], "feature": {}, "spaces": [ "*" ] }] }, { "name": "my_admin_role", "description": "My admin role description", "metadata" : { "version" : 1 }, "transient_metadata": { "enabled": true }, "elasticsearch": { "cluster" : [ "all" ], "indices" : [ { "names" : [ "index1", "index2" ], "privileges" : [ "all" ], "field_security" : { "grant" : [ "title", "body" ] }, "query" : "{\"match\": {\"title\": \"foo\"}}" } ], }, "kibana": [ ] } ]