Import kibana dashboard using ansible playbook

I have created a kibana dashboard and exported it. This have a .ndjson file with me. Now I want to import this dashboard to kibana (other severs) using ansible playbook using the .ndjson file i already have. How can I do it.

Hallo @Neelam_Zanvar

Does this documentation answer your question?

No it isnt.

I have the ndjson file. can u pls help me with the format of the command. Somehow i am getting syntax errors when i use copy curl command from link u sent

Yes, it looks like there is something wrong with the "Copy as cURL".


curl -X POST http://localhost:5601/api/saved_objects/_import?createNewCopies=true -H "kbn-xsrf: true" --form file=@file.ndjson -u <usename:password>

And ensure you have a file file.ndjson in the directory where you are sending the request from. Also note this request assumes you have Kibana running on localhost.

worked ! Thank you

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