Cannot retrieve "widgets" via REST API v2?

  • 14 April 2022
  • 7 replies
  • 96 views

Badge +1

Hello,

I am confused with the object naming in API v2. In v1 the items on the board were called “widgets” and there was a corresponding API method to access them. In API v2 their analog seems to be “items”. However when I try to retrieve the list of items for the same board that is accessible via v1 - it just returns an empty list :-(

https://api.miro.com/v2/boards/uXjVOLV4E3E=/items?limit=50

{'cursor': '', 'data': [], 'limit': 0, 'size': 0, 'type': 'cursor-list'}

 

https://api.miro.com/v1/boards/uXjVOLV4E3E=/widgets?limit=50

{'data': [{'createdAt': '2022-02-21T14:57:12Z',
           'createdBy': {'id': '3074457361785543958',
                         'name': 'Andriy Z',
                         'type': 'user'},
           'id': '3458764519418309756',
           'mindmap': {'layout': 'butterfly', 'theme': 'colorBranch'},
           'modifiedAt': '2022-02-21T14:57:12Z',
           'modifiedBy': {'id': '3074457361785543958',
                          'name': 'Andriy Z',
                          'type': 'user'},
           'rotation': 0.0,
           'scale': 1.0,
           'style': {'backgroundColor': '#ffffffff',
                     'backgroundOpacity': 1.0,
                     'borderColor': '#7a28ff',
                     'borderOpacity': 1.0,
                     'borderStyle': 'normal',
                     'borderWidth': 2.0,
                     'fontFamily': 'OpenSans',
                     'fontSize': 14,
                     'shapeType': 'pill',
                     'textAlign': 'center',
                     'textColor': '#1a1a1a'},
           'text': '<p>Problem</p>',
           'type': 'text',
           'width': 98.7,
           'x': 0.0,
           'y': 0.0},

(the rest of items skipped)


7 replies

Hi @Will Bishop , Do you have any idea when Web-SDK v2 might be able to access MindMap nodes?

Since creating an app with SDK v1 is no longer possible, this leaves me in a bit of a pickle for my app.
Also, please let me know if I am incorrect and there is a way to start a SDK v1 app still.

Thanks,
Dale.

Badge +1

I am not sure if I understand the “pre-configured mindmap” part. Are you saying that item retrieval via API does not work at all for MindMaps in v2? Or there are some conditions when it may work?

Userlevel 6
Badge +4

Hey @Andriy Zhylenko good question. To clarify, mindmaps (and items that are part of a mindmap) cannot be retrieved via the V2 API at all—apologies for the confusion.

This is, however, on our team’s radar and we’re exploring how to make this information more accessible in the future. In the immediate term, this information is still accessible via V1, but I understand the gap this creates. I’ve just raised this with our Product team and I’ll be happy to keep you up to date on how this progresses.

Thanks again for raising this, and don’t hesitate to let us know if you come across any additional feedback on this front.

Thanks,
Will

 

 

Userlevel 6
Badge +4

Hey @DaleDeSilva, while you can still leverage V1 apps that you created previously, it’s not possible to create a new V1 app any longer. 

At the moment, retrieving mindmap components via V2 is a known limitation—I’ve raised this with our product team and we’re exploring what support for this might look like. I’m afraid I don’t have a concrete update on this for you right now, but I will keep this thread open as we have updates and hope to have more for you soon.

Thanks,

Will

Userlevel 6
Badge +4

Hey @Andriy Zhylenko , 

Thanks for reaching out about this, and happy to help take a closer look!

 

As a first step, can I kindly ask if the items on your board are grouped together in any way, or if you’re including them inside (or outside) of a frame?

Do you get the same result when you specify the `type` query parameter for a given text item? I should note that you’re correct that items are the equivalent of widgets in V2.

These details will help to debug—thanks!
Will

Badge +1

They are in a MindMap, I did not use any frames. Board ID uXjVO8_yUTU=. I get the list of widgets using API v1, but API v2 returns an empty set - even if I specify the type

 

 

Userlevel 6
Badge +4

Hey @Andriy Zhylenko, thanks for the prompt reply and for sharing these details.

 

After taking a closer look and checking with our REST Engineering team, it turns out this is a known limitation at the moment when items are part of a pre-configured mindmap. That said, I can definitely appreciate that the response could be clearer in showing something besides just an empty object.

We’re working with our team internally to explore how we might be able to support these types of items in the V2 API, and I will be happy to keep this dialogue open in the meantime. I hope to have some updates to share with you soon.

 

Thanks again for raising this, and I’ll be in touch!
Will

Reply