ESI Pages

How does one figure out from the ESI calls how many pages to ask for in end points such as /markets/{region_id}/types or other ESI calls which you have to declare what page you are seeking? Any one able to point me in the right direction or let me know it would be appreciated.

We actually published a blog about this recently! https://developers.eveonline.com/blog/article/esi-concurrent-programming-and-pagination

Note that the wallet endpoints, also, does not have x-pages (they use fromID).
You need to continue until you get an empty result. Due to a bug (https://github.com/ccpgames/esi-issues/issues/553) you also have the check that the current page does not match the last or you may end up with a never-ending-loop.

CCP Zoetrope, thank you for the help.

Reading the blog makes more sense now for writing the code to access those end points with pagination.

Just for reference, which might also help other developers in the future, the Try It Out! feature on http://esi.tech.ccp.is does not actually display the header X-Pages even though it displays much of the other header information.

@Minerva_Arbosa I’m not sure what you mean about the Try it Out! feature not displaying the header X-Pages. It is displayed both in the documentation and when you click “Try It Out!”:


But if you do find a case where there’s an endpoint that has X-Pages but it is not displayed in the documentation please let us know here :).

CCP Zoetrope, I was talking about on the http://esi.tech.ccp.is page where you linked your picture from. There is a button at the bottom of each end point where you can try the end point out in your browser which displays all of the header information you should see and the data for the parameters which were put in. It’s really helpful when coding new features into libraries and such.

He is probably using an endpoint that doesn’t that header yet. I.e. one of these:

 https://esi.tech.ccp.is/latest/#!/Contacts/get_characters_character_id_contacts
 https://esi.tech.ccp.is/latest/#!/Corporation/get_corporations_corporation_id_structures
 https://esi.tech.ccp.is/latest/#!/Market/get_markets_structures_structure_id
 https://esi.tech.ccp.is/latest/#!/Universe/get_universe_groups
 https://esi.tech.ccp.is/latest/#!/Universe/get_universe_types
 https://esi.tech.ccp.is/latest/#!/Wars/get_wars_war_id_killmails

I was using the markets/{region_id}/orders end point. Which is supposed to have the X-Pages header, but when getting the header information from X-Pages doesn’t show up. I have already submitted an issue on github about it. It’s not the only header having an issue when you look at the issues section.

Strange, because if i use that in chrome or postman i can see the headers, but in Curl it isn’t there. Have to see what the devs can figure out.

It appears that X-Pages is not included if the result set is < 10k (i.e a single page).

If you do all market orders for say Jita 4-4 with no type ID (i.e every order for every typeID) for sells. The X-Pages header shows.

If you look for a specific type ID for sells for example, there is no header, I suspect due to it being a single page.

The way around this would probably be to check the header is set, and if so, continue pagination, if not just ignore pagination code.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.