Curl command to put value in Kibana 6.3

I need a curl command to put some value in Kibana Advanced Configuration.
Current way of doing is , Kibana Console --> Advanced Settings --> dateFormat:tz --> Put the Value as GMT. I need to do that through curl command, any idea of how to achieve that.

Kibana 6.3
Elasticsearch 6.3

Hi there, I believe is what you're looking for.

Yeah i saw that actually but i was unable to figure out what should the syntax i should use, as i am very new to kibana and if i try to execute that command using XGET i am getting empty reply.
It would be very helpful if you let me know the curl command .

curl -XGET --insecure -u admin:admin "http://localhost:5602/api/kibana/settings"
curl -XGET --insecure -u admin:admin "http://localhost:5602/api/*"

if i am using https, then below error. But i can login to Kibana UI and execute that operation.

curl -XGET --insecure -u admin:Alcatraz2.0 "https://localhost:5602/api/*"
{"statusCode":404,"error":"Not Found","message":"Not Found"}

Here's the syntax you need to use:

curl -X POST -H "Content-Type: application/json" -H "kbn-xsrf: true" -d '{"value":"12"}' http://localhost:5601/api/kibana/settings/visualization:tileMap:maxPrecision -u username:password

If you're running in development mode, there will be a "base path" in the URL when you visit kibana, e.g. http://localhost:5601/BASE_PATH/app/kibana. In this case, you'll need to use the base path as part of the API URL too:

curl -X POST -H "Content-Type: application/json" -H "kbn-xsrf: true" -d '{"value":"12"}' http://localhost:5601/BASE_PATH/api/kibana/settings/visualization:tileMap:maxPrecision -u username:password

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.