REST API Can´t retrieve tags properly

  • 26 April 2023
  • 8 replies
  • 113 views

Badge +1

I am using the REST API to retrieve all app cards with a certain tag. I first retrieve the tags using the method Get tags from board which retrieves my tags with their IDs. I get all the tags properly. Now when using the endpoint Get items by tag I enter the board id and the tag id. For certain tags I created I get all the items. But for some tags I just get the following response:

{
"type": "error",
"code": "3.0201",
"context": {
"boardId": {
"value": "MY BOARD ID" //Of course this is not an actual board id
}
},
"message": "Item not found",
"status": 404
}

Has someone experienced similar issues? Yesterday the request worked for some tags it doesn´t work for today. How on earth does it work on some tags on that exact same board and on some it doesn´t?


8 replies

Userlevel 3
Badge +1

No worries, we’re here to help @Tammo Dirksen 😃

I’ve let the team know there’s an urgency and asked about the cursor. Ill get back soon.

Cheers,

Mettin

Badge +1

Hello Mettin,

late reply but thank you for the update. There is another issue with the tags endpoint I am having. Not sure if it has something to do with any privacy settings or whatsoever. But using

the “Get tags from board” endpoint works in most cases. I have like 50 boards and on most of them it works fine. Now there is a board that was shared with me on which I can edit and everything. I can also use the tags. It has like 40 tags but making the api request
https://api.miro.com/v2/boards/board_id/tags

for that specific board it doesn´t retrieve any tags. I get an empty array. Now there are clearly tags available. And on other boards everything worked fine. Are there maybe any other constraints like security rights that limit my ability to use the endpoint on that board? I mean I am not getting a 401 or whatever. It is a 200, but empty:

 

{
"size": 0,
"offset": 0,
"limit": 20,
"total": 0,
"data": [],
"links": {
"self": "https://api.miro.com/v2/boards/<MY PROBLEMATIC BOARD>/tags?limit=20&offset=0"
},
"type": "list"
}

Don´t get why it doesn´t work. I can retrieve other items like cards from that board.

Best regards,

Tammo

Userlevel 3
Badge +1

Hey @Tammo Dirksen,

Great find, we are able to reproduce this behaviour so it’s a bug on our side. It seems to fail on default tags. We have created a ticket to fix this and will send an update here. For now you should be fine with just ignoring these errors.

Cheers,

Mettin

Badge +1

Hi @Mettin,

wow, thank you for your quick response. Ok, but then I need to wait for your solution because I need the results for the specific tag. On further notice: Is it on purpose that there are no cursors for Get items by tag? Because if I have more than 50 tagged items I can´t retrieve all of them since the limit is at 50. On other endpoints we can use cursors. :)

Cheers,

Tammo

Userlevel 6
Badge +4

Hi @Tammo Dirksen,

Thanks for sharing this! I just sent you a DM to get some more details when you have a chance. Will be happy to investigate it further for you.

Best,
​​​​​​​Will

Badge

There is another issue with the tags endpoint I am having. Not sure if it has something to do with any privacy settings or whatsoever. But using

the “Get tags from board” endpoint works in most cases. I have like 50 boards and on most of them it works fine. Now there is a board that was shared with me on which I can edit and everything. I can also use the tags. It has like 40 tags but making the api request
https://api.miro.com/v2/boards/board_id/tags

for that specific board it doesn´t retrieve any tags. I get an empty array. Now there are clearly tags available. And on other boards everything worked fine. Are there maybe any other constraints like security rights that limit my ability to use the endpoint on that board? I mean I am not getting a 401 or whatever. It is a 200, but empty:

 

{
"size": 0,
"offset": 0,
"limit": 20,
"total": 0,
"data": [],
"links": {
"self": "https://api.miro.com/v2/boards/<MY PROBLEMATIC BOARD>/tags?limit=20&offset=0"
},
"type": "list"
}

Don´t get why it doesn´t work. I can retrieve other items like cards from that board.

Best regards,

Userlevel 2
Badge +1

Hi @fdemir , is this board part of the team where your app is installed or is it a different team?

Userlevel 3
Badge +1

Hey @Tammo Dirksen

I talked to the team regarding the cursor issue. They told me you can use the link in the response (links.next and links.prev) for fetching the next set.

The issue about getting the items per tag is placed on their backlog and will be put into one of their upcoming sprints. They will place an update in this thread when it is done. 

Cheers,
Mettin

Reply