Skip to main content

I have more than 100 Miro teams in my Enterprise account. The teams api returns the following error if I use a limit greater than 100. Is there any workaround for the limit issue?

https://api.miro.com/v2/orgs/{ORD_ID}/teams?limit=101

{
  "status" : 400,
  "code" : "invalidParameter",
  "message" : "org.springframework.validation.BeanPropertyBindingResult: 1 errors\nField error in object 'teamsCursorQuery' on field 'limit': rejected value u101]; codes eMax.teamsCursorQuery.limit,Max.limit,Max.int,Max]; arguments torg.springframework.context.support.DefaultMessageSourceResolvable: codes eteamsCursorQuery.limit,limit]; arguments t]; default message glimit],100]; default message glimit value should be less than 100]",
  "type" : "error"
}

@Stephen Wingert  I think, looking at this post, that the docs on ‘list teams’ has an error.

I suspect that they have imposed a maximum teams returned to be 100 - but the docs app has an error.  On list team members you can see a max of 100… 

 

So, as they did in that post. Getting the next 100 teams is handled with ‘pagination’ via the query param ‘cursor’.  Each ‘page’ of data is limited to 100. So you have to hit the API endpoint multiple times each time passing in a new ‘cursor’... the cursor each time is the ‘last team id’ received from the previous call’s return.   

@Will Bishop /others... The V2 REST API reference is not very helpful on using cursor at ‘list teams’: (image here below.)


... but is a bit more informative on ‘list team members’ (see image below).

‘The ID of the team member used as the reference for pagination. To retrieve the first portion of the collection don't pass a cursor value. To retrieve the next portion of the collection, set the cursor parameter value to the ID of the last team member you received in the response of the previous request.’


-- 
Also: 
These doc links here are broken.

 


@Stephen Wingert 
👀 The related thread here: https://community.miro.com/developer-platform-and-apis-57/is-there-any-way-to-list-the-teams-a-user-is-a-part-of-using-rest-api-8564


Thank you for replying to Stephen and for reporting the docs bugs @Max Harper🙏

I opened an issue, so we can follow up on your bug report.

Best,

marco 


Thanks Max, that solved my issue. I can get all the boards. Much appreciated.


Reply