Kibana canvas create using api error

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]"}

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?

Hey there! I think instead of using canvas as your saved object type, you'll want to use canvas-workpad so try posting to localhost:5601/api/saved_objects/canvas-workpad instead and see if that works for ya

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