Hi eveyrone,
we have 78 spaces and we need to assign a tunned role to the " Dashboards only roles" on kibana "advanced" config on each space.
Could it be done through the config file or API ? I'm seeing nothing on doc.
Thanks
Update:
For who whant to manage Space's "Advanced settings" :
Get the "config" object with the ID of your KIBANA version :
GET http://KIBANA_URL/s/MY_SPACE/api/saved_objects/_find?type=config
{
"page": 1,
"per_page": 20,
"total": 5,
"saved_objects": [
{
"type": "config",
"id": "6.8.2",
"attributes": {
"buildNum": 20415,
"defaultIndex": "7f91a8c0-df79-11e9-9d78-9fd1480e4f36"
},
"updated_at": "2019-09-25T09:47:34.593Z",
"version": "WzQ0LDFd"
}
}
Perform a UPDATE (PUT) with the modified attribute :
PUT http://KIBANA_URL/s/MY_SPACE/api/saved_objects/config/6.8.2
{
"attributes": {
"xpackDashboardMode:roles": [
"YOUR_ROLE"
]
}
}
flash1293
(Joe Reuter)
September 25, 2019, 12:16pm
2
Hi @piellick ,
the advanced settings are also a saved object and be manipulated using the saved objects API . The "type" of this saved object is config
.
To retrieve objects from different spaces the space name has to be prepended to the path, e.g. GET /s/demo/api/saved_objects/_find
1 Like
Hi @flash1293 thanks for your Help.
i tried with this one :
/api/saved_objects/_find?type=config
but i could retrive the config from "default" space, no select space ?
{"page":1,"per_page":20,"total":1,"saved_objects":[{"type":"config","id":"6.8.2","attributes":{"buildNum":20415,"xpackDashboardMode:roles":["pouet"],"defaultIndex":"414dd440-df78-11e9-9d78-9fd1480e4f36"},"updated_at":"2019-09-25T09:46:54.337Z","version":"WzQyLDFd"}]}
I'm on Elastic 6.8
flash1293
(Joe Reuter)
September 25, 2019, 12:31pm
4
To get the config from another space, prepend the name of the space to the api call:
/s/<NAME OF THE SPACE>/api/saved_objects/_find?type=config
1 Like
It look better ! Thanks @flash1293 . Just few question i'm blocked with the create object.
I did some test :
GET http://KIBANA_URL/s/MY_SPACE/api/saved_objects/_find?type=config
{
"page": 1,
"per_page": 20,
"total": 5,
"saved_objects": [
{
"type": "config",
"id": "6.8.2",
"attributes": {
"buildNum": 20415,
"defaultIndex": "7f91a8c0-df79-11e9-9d78-9fd1480e4f36"
},
"updated_at": "2019-09-25T09:47:34.593Z",
"version": "WzQ0LDFd"
},
{
"type": "config",
"id": "a205e540-df94-11e9-9d78-9fd1480e4f36",
"attributes": {
"xpackDashboardMode:roles": [
"MYROLE_03"
]
},
"updated_at": "2019-09-25T13:01:47.796Z",
"version": "WzUwLDFd"
},
{
"type": "config",
"id": "f53e5e90-df94-11e9-9d78-9fd1480e4f36",
"attributes": {
"xpackDashboardMode:roles": [
"MYROLE_03"
]
},
"updated_at": "2019-09-25T13:04:07.417Z",
"version": "WzUxLDFd"
},
{
"type": "config",
"id": "4246d410-df95-11e9-9d78-9fd1480e4f36",
"attributes": {
"xpackDashboardMode:roles": [
"MYROLE_03"
]
},
"updated_at": "2019-09-25T13:06:16.657Z",
"version": "WzU0LDFd"
},
{
"type": "config",
"id": "fep03",
"attributes": {
"xpackDashboardMode:roles": [
"MYROLE_03"
]
},
"updated_at": "2019-09-25T13:24:03.399Z",
"version": "WzU4LDFd"
}
]
}
But on my KIBANA dashboard i still have the "kibana_dashboard_only_user" role. How we link the config object to be used ?
Thanks a lot
You right !
I just had to do an update on the existing object, referer with the version of kibana (id: 6.8.2)
Thanis a lot @flash1293
system
(system)
Closed
October 23, 2019, 1:42pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.