Getting tags info using Miro API

  • 2 September 2021
  • 3 replies
  • 286 views

Hi, are there any possibilities to get tags info from board?

I want to get info from tags attached to board objects.

For example, i want to read two tags from tihs sticker using API

 


3 replies

Userlevel 5
Badge +1

Hi @Paul Hopkins,

 

Our new developer platform (v2) in beta has REST API to manage tags, you can find the documentation here.

Using the REST API:

It is not possible today to interact with Tags using REST API. This is something the team is working on.

 

Is there any update on when this will be delivered?

Userlevel 5
Badge +1

Hi @kirillkirillkirill,

 

Using the Web SDK:

Tag is a parameter of the JSON body of the widget, in the case of the sticker if you retrieve the JSON body you will find a tags array, in the example below with 2 tags (tag2 and tag3)

await miro.board.selection.get()
[
{
"id": "3074457363406800008",
"type": "STICKER",
"bounds": {},
"style": {},
"metadata": {},
"capabilities": {},
...
"text": "<p>test</p>",
"plainText": "test",
"tags": [
{
"id": "3074457363234047561",
"title": "tag2",
"color": "#cee741",
"widgetIds": [
"3074457363406800008"
]
},
{
"id": "3074457363234047562",
"title": "tag3",
"color": "#12cdd4",
"widgetIds": [
"3074457363234047495",
"3074457363406800008"
]
}
]
}
]

 

The Web SDK has a method to retrieve tags from the board and know to which widgets they are attached to:

miro.board.tags.get()

You can find an example https://developers.miro.com/docs/web-plugins-features#section-modify-and-read-tags-on-widgets.

 

Using the REST API:

It is not possible today to interact with Tags using REST API. This is something the team is working on.

Reply