As the title states, how can I duplicate an existing board programmatically using the REST api?
I couldn’t find anything in the documentation, and get all the widgets and then creating them in a new board are not practical as this method doesn’t support frames.
Best answer by Daniela Gavidia
Hi,
We currently have an undocumented API endpoint for cloning boards:
POST https://api.miro.com/v1/boards/{id}/copy
This will create a copy of the board with the id you passed in the url and return the copy. You could give it a try, but be aware that this endpoint will probably change in the next API version release.
We currently have an undocumented API endpoint for cloning boards:
POST https://api.miro.com/v1/boards/{id}/copy
This will create a copy of the board with the id you passed in the url and return the copy. You could give it a try, but be aware that this endpoint will probably change in the next API version release.
Yes, you would need an access token for an app that is installed in a team. Calling the “copy” endpoint would let you duplicate a board in a team where the app is installed.
{ "status" : 401, "code" : "tokenNotProvided", "message" : "No authorization data was found on the request", "context" : null, "type" : "error"}
Question 1/
In your latest comment to Daniel you say: “you would need an access token for an app that is installed in a team”. Could you please tell us how to create such an access token?/ Share a resource/
Question 2/
If I want to duplicate a board 20 times, do I need to run the API URL 20 times or is there a more convenient way?
You get the tokenNotProvided error when you don't pass the access_token into the header of your request (you can find more information here). Adding in the header of your request:
Authorization: Bearer {access_token} will solve this issue.
This is a cURL example showing how to do this. You only need to replace {access_token} by your access token:
curl --request POST 'https://api.miro.com/v1/boards/o9J_lGY8JuA=/copy' -H 'Authorization: Bearer {access_token}'
Question 1: The complete Authorization flow is described here. Not that you can use the access_token you get when Installing an application using "Your apps" setting as explained here.
Question 2: Yes, if you want to create 20 copies of the board you will need to call the API 20 times.
Hi @Ronrick Jet, this API was an experimental API and is not available anymore. The team is working on a new version based on the feedback collected. I will let you know when it is available.
Hi @Ronrick Jet, this API was an experimental API and is not available anymore. The team is working on a new version based on the feedback collected. I will let you know when it is available.
Hey @Anthony Roux, seems like the POST endpoint “/copy” is still reachable and seems to work (tested 2 min ago). What do you mean exactly with “is not available anymore”? Will you shut down the endpoint method til the new version is available?
Hi @Ronrick Jet, this API was an experimental API and is not available anymore. The team is working on a new version based on the feedback collected. I will let you know when it is available.
Hey @Anthony Roux, seems like the POST endpoint “/copy” is still reachable and seems to work (tested 2 min ago). What do you mean exactly with “is not available anymore”? Will you shut down the endpoint method til the new version is available?
I would like to hear about this as well. I hope they retain the test version while waiting for the official release so the dev can utilize this function for the meantime.
Hi @Ronrick Jet, this API was an experimental API and is not available anymore. The team is working on a new version based on the feedback collected. I will let you know when it is available.
Hey @Anthony Roux, seems like the POST endpoint “/copy” is still reachable and seems to work (tested 2 min ago). What do you mean exactly with “is not available anymore”? Will you shut down the endpoint method til the new version is available?
I would like to hear about this as well. I hope they retain the test version while waiting for the official release so the dev can utilize this function for the meantime.
@Anthony Roux Thanks for your quick answer. Any chance we could find out if they will retain the “test version” til the new one is ready? We currently rely on this endpoint.
If you were using the /vNext/ endpoint this one should not work anymore.
Based on the feedback we have collected we are working on a new version of this API that will be the stable version. We will let you know when it is ready and you will have plenty of time to migrate after it is published (no ETA for the moment).