Hello. I am trying to create a canvas using this API endpoint:
For this I am using the following curl:
curl -X POST curl -X POST localhost:5601/api/saved_objects/canvas -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "@canvas.json"
Now the canvas.json file is the file I get when exporting from kibana:
I am always getting the following error:
{"statusCode":400,"error":"Bad Request","message":"[request body.attributes]: expected value of type [object] but got [undefined]"}
e"}
Even after creating the attributes tag I still get
{"statusCode":400,"error":"Bad Request","message":"Unsupported saved object type: 'canvas': Bad Request"}
Is there a way to use curl to use the API to create a canvas from an endpoint?