2019-09-06 18:09:57 +02:00
|
|
|
[[role-management-specific-api-get]]
|
|
|
|
=== Get specific role API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get specific role</titleabbrev>
|
|
|
|
++++
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2020-03-20 22:33:20 +01:00
|
|
|
experimental[] Retrieve a specific role.
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
[[role-management-specific-api-get-prereqs]]
|
2020-03-20 22:33:20 +01:00
|
|
|
==== Prerequisite
|
2018-12-05 22:20:58 +01:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
To use the get specific role API, you must have the `manage_security` cluster privilege.
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
[[role-management-specific-api-retrieve-all-request-body]]
|
2018-08-13 18:06:25 +02:00
|
|
|
===== Request
|
|
|
|
|
2020-03-20 22:33:20 +01:00
|
|
|
`GET <kibana host>:<port>/api/security/role/my_restricted_kibana_role`
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
[[role-management-specific-api-retrieve-all-response-codes]]
|
|
|
|
==== Response code
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2020-03-20 22:33:20 +01:00
|
|
|
`200`::
|
2019-09-06 18:09:57 +02:00
|
|
|
Indicates a successful call.
|
2020-03-20 22:33:20 +01:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
[[role-management-specific-api-retrieve-all-example]]
|
|
|
|
===== Example
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2019-09-06 18:09:57 +02:00
|
|
|
The API returns the following:
|
2018-08-13 18:06:25 +02:00
|
|
|
|
2020-03-20 22:33:20 +01:00
|
|
|
[source,sh]
|
2018-08-13 18:06:25 +02:00
|
|
|
--------------------------------------------------
|
|
|
|
{
|
2019-05-22 20:01:15 +02:00
|
|
|
"name": "my_restricted_kibana_role",
|
2018-08-13 18:06:25 +02:00
|
|
|
"metadata" : {
|
|
|
|
"version" : 1
|
|
|
|
},
|
|
|
|
"transient_metadata": {
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"elasticsearch": {
|
|
|
|
"cluster": [ ],
|
|
|
|
"indices": [ ],
|
|
|
|
"run_as": [ ]
|
|
|
|
},
|
2019-05-22 20:01:15 +02:00
|
|
|
"kibana": [
|
|
|
|
{
|
|
|
|
"base": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"feature": {},
|
|
|
|
"spaces": [
|
|
|
|
"marketing"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"base": [],
|
|
|
|
"feature": {
|
|
|
|
"discover": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"visualize": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"dashboard": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"dev_tools": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"advancedSettings": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"indexPatterns": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"timelion": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"graph": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"apm": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"maps": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"canvas": [
|
|
|
|
"read"
|
|
|
|
],
|
|
|
|
"infrastructure": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"logs": [
|
|
|
|
"all"
|
|
|
|
],
|
|
|
|
"uptime": [
|
|
|
|
"all"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"spaces": [
|
|
|
|
"sales",
|
|
|
|
"default"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2018-08-13 18:06:25 +02:00
|
|
|
}
|
|
|
|
--------------------------------------------------
|