# \[Beginner\] Is it possible to pull the contents of a specific corp hangar in a specific citadel via ESI?

**URL:** <https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206>\
**Category:** Third Party Developers\
**Tags:** esi\
**Created:** [April 26, 2018, 8:26am UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206 "2018-04-26T08:26:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omeega](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/omeega/32/59292_2.png) [@Omeega](https://forums.eveonline.com/u/Omeega)\
**Post date:** [April 26, 2018, 8:26am UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206/1 "2018-04-26T08:26:48Z")

</div>

Hello,

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?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [April 26, 2018, 12:10pm UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206/2 "2018-04-26T12:10:42Z")

</div>

Yes, the `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.

---

<div class="post-metadata">

**Author:** ![Omeega](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/omeega/32/59292_2.png) [@Omeega](https://forums.eveonline.com/u/Omeega)\
**Post date:** [April 26, 2018, 11:32pm UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206/3 "2018-04-26T23:32:42Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [April 27, 2018, 12:55am UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206/4 "2018-04-27T00:55:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [July 26, 2018, 12:55am UTC](https://forums.eveonline.com/t/beginner-is-it-possible-to-pull-the-contents-of-a-specific-corp-hangar-in-a-specific-citadel-via-esi/72206/5 "2018-07-26T00:55:18Z")

</div>

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