Kibana API - Version 6.8

Hello Everyone,

I would like to create an index-pattern automatically. Unfortunatly I cannot find the right API-Endpoint in Opendistro. For “Offical” Kibana it should be:

curl -X POST "localhost:5601/api/saved_objects/index-pattern/my-pattern"

My guess would be that the right endpoint in Opendistro is:

curl -X POST "localhost/_plugin/kibana/api/saved_objects/index-pattern/my-pattern"

Unfortunatly I’m getting an 404. Maybe someone already used the saved_objects API in Opendistro and can give me an hint in the right direction.

I am also looking to access the odfe kibana api but not sure how to go about the authentication

I used syntax like this (to load the contents stored in /tmp/someContent.ndjson into Kibana):

curl -XPOST "http://localhost:443/api/saved_objects/_import?overwrite=true" -H "kbn-xsrf: true" --form file=@/tmp/someContent.ndjson --user $ADMIN_USER:$ADMIN_PASSWD --insecure

Your host and port might be different.

If you don’t want to use username/password and want to use the admin TLS certs, you may also be able to replace the last part ( starting with --user) with this instead:
--cert /tmp/admin_tls.crt --key /tmp/admin_tls.key --insecure
I’ve done that when using the Elasticsearch API and assume it would work with the Kibana API but I have not tried it.