# ESI - which moon a drilling plattform belongs to

**URL:** <https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370>\
**Category:** Third Party Developers\
**Tags:** esi\
**Created:** [September 25, 2019, 7:08pm UTC](https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370 "2019-09-25T19:08:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rtg\_Quack](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/rtg_quack/32/259589_2.png) [@Rtg\_Quack](https://forums.eveonline.com/u/Rtg_Quack)\
**Post date:** [September 25, 2019, 7:08pm UTC](https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370/1 "2019-09-25T19:08:29Z")

</div>

I’m polling all corporation structures from ESI with `corporations/<corpid>/structures`.

From this query result I take the structure\_id. If it’s a drilling plattform I want to get the moon it belongs to. But I was not able to get a moon name or better his moon id a structure belongs to from ESI.

The best I get are 3D coordinates in the solar system using `universe/structures/<structure_id>/`.

Of course I may fetch all moons of the system and apply a standard 3D distance formula to get the moon with the smallest distances, but that’s overcomplicated.

Any suggestions?

---

<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:** [September 25, 2019, 7:47pm UTC](https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370/2 "2019-09-25T19:47:47Z")

</div>

You could use [https://esi.evetech.net/ui/#/Industry/get\_corporation\_corporation\_id\_mining\_extractions](https://esi.evetech.net/ui/#/Industry/get_corporation_corporation_id_mining_extractions) which includes the `structure_id` and the `moon_id`. Would of course have to have the drilling platform doing an extraction, but that shouldn’t be a problem since thats the point of the structure.

In reality once you do this once you could just create a map of structure =\> moon as they aren’t going to change.

---

<div class="post-metadata">

**Author:** ![Rtg\_Quack](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/rtg_quack/32/259589_2.png) [@Rtg\_Quack](https://forums.eveonline.com/u/Rtg_Quack)\
**Post date:** [September 25, 2019, 7:53pm UTC](https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370/3 "2019-09-25T19:53:29Z")

</div>

Thanks @Blacksmoke16 that route does the job

---

<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:** [December 24, 2019, 7:53pm UTC](https://forums.eveonline.com/t/esi-which-moon-a-drilling-plattform-belongs-to/192370/4 "2019-12-24T19:53:30Z")

</div>

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