Apologies in advance - although I am currently learning the field, I am a beginner when it comes to API and technical knowledge in general. Please keep that in mind
Within the context of a design project, I would like to pull a list of all the contents of a specific corp hangar (e.g. “Corp ships”) in a specific citadel anchored with W-Space. (I would then connect each item with their market value and that would give me the current value of said corp hangar.)
Does the ESI allow this level of granularity?
location_flag property tells you where a given item is, for example
CorpSAG1 would be corp hanger 1 (the one at the top of the list in game).
location_id is a unique id for a specific hanger.
So you could get a list of items using the assets endpoint, find a unique ship you have (for example of your
Corp Ships hanger is the only corp hanger with a legion in it), you could lookup the legion’s type_id in the assets list. Once you find that one ship you can save/copy the location_id of that legion hull and use that in future lookups to get the specific hanger you want.
EDIT: To clarify you would have to do the filtering of the whole asset list in your own code. ESI does not offer a method to say, just give it an ID and only return items with that
location_id. Be sure to get all the pages as well.
Brilliant answer - thank you so much for taking the time to write it up. Could you also confirm this works for citadels (in wormholes - if that’s even a parameter)?
I do not have any citadels in a WH to test specifically, but there is no reason it shouldn’t work. A structure is a structure.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.