Can you PUT/POST to Kibana API

  • Search Guard and Elasticsearch version: 6.2.4

Hi,

I am trying to update and add to my kibana saved objects for a specific tenant. I know that an index is created in elasticsearch for each tenant, so I could PUT/POST to that, but I’m wondering if I can also PUT/POST to the kibana API for adding/updating kibana saved objects.

Let me know if you need more info

Thanks!

Robert Stewart

Hi,

you should not modify the kibana or tenant indices directly, but always use the saved_objects API (which, BTW, is finally public with 6.3). So yes, it is possible to use the saved_objects API with multi tenancy. Just add the tenand name manually in your curl call like:

curl -Ss -u user:pass -H ‘Content-Type: application/json’ -H “kbn-xsrf: true” -H “sg_tenant: management” -XPOST “http://kibana.example.com:5601/api/saved_objects/index-pattern/” -d “@…/resources/kibana/index-pattern.json”

``

Two things to keep in mind: If you want to access the Global tenant, just remove the header completely. If you want to access the private tenant, the name is “user”.

···

On Monday, June 25, 2018 at 9:28:31 PM UTC+2, robert@elementdata.com wrote:

  • Search Guard and Elasticsearch version: 6.2.4

Hi,

I am trying to update and add to my kibana saved objects for a specific tenant. I know that an index is created in elasticsearch for each tenant, so I could PUT/POST to that, but I’m wondering if I can also PUT/POST to the kibana API for adding/updating kibana saved objects.

Let me know if you need more info

Thanks!

Robert Stewart