Number of pages returned by API?




  • Avatar
    Badri Janakiraman

    Hello rnwolf – we maybe need to be more specific in the help file about what happens when the page number is greater than the last valid page number, but I would like to assure you that what you are seeing is as per design.

    Asking for the contents of a page of data that is past the last valid page, returns the data on the last valid page.

    To figure out the page number of the last page of data, you can calculate it by dividing the total number of cards in a view by the number of cards in a page. As an example,

    a) a view with 25 cards or less will always have only one page
    b) a view with between 25-50 cards will have 2 pages
    c) a view with between 50-75 cards will have 3 pages

    and so on.

    If on a view with only 35 cards, you request the first page of cards, you will get cards from 1-25. Page 2 will contain cards 26-35. Any page number past 2 will behave identically to a request for the last page.

  • Avatar
    Rudiger Wolf

    Thanks for the quick reply.

    Yep, please update the Mingle help file. I thought that pages past the last valid page would return an empty card array.

    Is there a way to determine the number of cards in a view?

    Right now the only way I can think of figuring out if I have all the cards is to check if the results returned by page n = page (n-1). If so then I must have all the cards.


  • Avatar
    Ben M

    Why is this by design? It seems to me that if i’m querying the system, that I should be able to get all of the cards in a single query without having to do the paging. We’re trying to use the cards with Word & Excel, and having this information being paged is pretty annoying… Isnt there any way to have mingle return all the cards for that story?


  • Avatar
    Ben M

    I think i found a work around for the paging. If you have a view that is a grid, then mingle will return ALL of the cards for you, since grid’s dont have paging.

  • Avatar
    Suzie Prince

    Hi all

    We are currently considering updating the API to allow requests for all cards. We will keep you posted on our progress.

    Cheers Suzie

  • Avatar

    This is may be a simple question, how do I get the count of all cards through the REST api
    Only then can I loop and get all the pages. Is there a better way of doing this.

  • Avatar
    Aman King

    Hey all, I just noticed that in Mingle 2.1 (the latest release of Mingle as of 22 Oct 2008), you can fetch all the cards without all this pagination business… it’s as simple as: http://yourname:password@your.mingle.server:8080/projects/test_project/cards.xml?page=all

    Check it out here:

    Thanks, Mingle team! You really listen to your users. :-)

Please sign in to leave a comment.