Import kibana saved object using API and Powershell (Invoke-WebRequest)

I can easily import sets of Kibana saved objects using API and curl:

curl -X POST "https://mykibana:443/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@file.ndjson -u admin:admin

What is the best approach to do that using Powershell (Invoke-WebRequest)?

Here is a link to a stackoverflow question that may help

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