Move an object up or down in layers - API

  • 27 November 2020
  • 1 reply

Forgive me if something is not entirely clear, I am a Russian-speaking user.

I want to know how can I implement a method to move an object up or down in layers?
It's quite easy to do it on the board - just select an object, press the ellipsis - brintg to front or Sent to back.
How can this be done through the API?
Unfortunately I am not at all familiar with API Miro, but I have experience in this area, so I think I can get an authentication token and connect to my board. What's next?
Can you provide links to the required documentation? (I work in Python)



Best answer by Daniela Gavidia 1 December 2020, 10:45

View original

1 reply

Userlevel 4



The Miro SDK includes methods to move a widget forward and send it backwards, just like you do it on the board. From our SDK documentation:


You can try it on the Javascript browser console. First, obtain the id of the widget you want to move. Then call:
await miro.board.widgets.bringForward(<WIDGET_ID_HERE>)


await miro.board.widgets.sendBackward(<WIDGET_ID_HERE>)


I hope this helps.


Kind regards.