# EVE Structure API is inconsistent and is missing structure type

**URL:** <https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344>\
**Category:** Third Party Developers\
**Tags:** esi, bug-reporting, structure\
**Created:** [July 27, 2019, 6:22am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344 "2019-07-27T06:22:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roxxkatt](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/roxxkatt/32/411282_2.png) [@roxxkatt](https://forums.eveonline.com/u/roxxkatt)\
**Post date:** [July 27, 2019, 6:22am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/1 "2019-07-27T06:22:18Z")

</div>

`/universe/structures/{structure_id}/`  
will return something like:

> ```
> {
> "name": "V-3YG7 VI - The Capital",
> "owner_id": 109299958,
> "solar_system_id": 30000142
> }
> 
> ```

almost all other endpoints will return its ID, like  
`/universe/systems/{system_id}/`  
has system\_id  
and  
`/universe/regions/{region_id}/`  
has region\_id, etc

**1) structure\_id is missing**

Many people making EVE resource websites will want to display a structure icon next to the structure.  
(square for NPC station, square with stick for astrohut, square with 2 sticks for raitaru, etc)  
This is not possible without knowing the structure type.  
This will go very well with the upcoming image server update, which we all have been wanting for quite some time.

**2) structure\_type is missing**

---

<div class="post-metadata">

**Author:** ![roxxkatt](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/roxxkatt/32/411282_2.png) [@roxxkatt](https://forums.eveonline.com/u/roxxkatt)\
**Post date:** [July 27, 2019, 6:28am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/2 "2019-07-27T06:28:27Z")

</div>

would add “feedback” tag if maximum was 5 tags instead of 3.  
would add “inconsistency” tag if it existed and maximum was 5 tags instead of 3.

---

<div class="post-metadata">

**Author:** ![roxxkatt](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/roxxkatt/32/411282_2.png) [@roxxkatt](https://forums.eveonline.com/u/roxxkatt)\
**Post date:** [July 27, 2019, 6:36am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/3 "2019-07-27T06:36:11Z")

</div>

also, it appears  
`/universe/structures/`  
only returns a list of citadels instead of a list of structures including npc stations.

my guess is that people are expected to know about  
`/universe/stations/{station_id}/`  
and have to use that as well, which is quite inconvenient because it appears  
`/universe/stations/`  
does not actually exist.

**3) /universe/stations/ does not exist**

additionally, things like location\_id specified in results from things like  
`/markets/structures/{structure_id}/`  
don’t actually specify if it is a “structure” or “station” and since there is no real ESI documentation there is no way to know which to use.

if this is true, it may make a lot of sense to document that somewhere.  
**4) it may also make a lot of sense to add another field such as “isNPCstation” or similarly named.**

---

<div class="post-metadata">

**Author:** ![roxxkatt](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/roxxkatt/32/411282_2.png) [@roxxkatt](https://forums.eveonline.com/u/roxxkatt)\
**Post date:** [July 27, 2019, 6:57am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/4 "2019-07-27T06:57:44Z")

</div>

the citadel IDs being returned are similar to 1028540268160.  
the swagger API lists most ID inputs as int32, and [https://esi.evetech.net/ui/](https://esi.evetech.net/ui/) will return errors if you attempt to query citadel information in most places:  
“error”: “failed to coerce value ‘1028540268160’ into type integer (format: int32), ‘station\_id’ is required”  
(additional note: personally not a fan of the new /ui/, and now we cant use /latest/ anymore to bypass it)

**5) if your API is going to send int64 results, you should not be using int32 inputs**

---

<div class="post-metadata">

**Author:** ![roxxkatt](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/roxxkatt/32/411282_2.png) [@roxxkatt](https://forums.eveonline.com/u/roxxkatt)\
**Post date:** [July 27, 2019, 9:55am UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/5 "2019-07-27T09:55:27Z")

</div>

the response from  
`/universe/stations/{station_id}/`  
includes services, which is useful.

unfortunately, the response from  
`/universe/structures/{structure_id}/`  
does not.

**6) it sure would be handy to be able to see structure services**

---

<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:** [July 27, 2019, 1:22pm UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/6 "2019-07-27T13:22:53Z")

</div>

I’ll go ahead and address some of your concerns:

> [@roxxkatt](#):
>
> 1. structure\_id is missing

This is expected. The other endpoints you mentioned are actually the ones more likely to change. It’s a design decision to remove unnecessary data, since you already have it from the request url.

See [this](https://github.com/esi/esi-issues/issues/273) and [this](https://github.com/esi/esi-issues/issues/1122).

> [@roxxkatt](#):
>
> 1. structure\_type is missing

That would be `type_id` from `/universe/structures/{structure_id}/`.

> [@roxxkatt](#):
>
> 1. /universe/stations/ does not exist

NPC stations are available in the SDE.

See [this](https://github.com/esi/esi-issues/issues/509) feature request.

> [@roxxkatt](#):
>
> 1. it may also make a lot of sense to add another field such as “isNPCstation” or similarly named.

At this point _ALL_ stations are NPC. All player owned ones are now “structures”.

> [@roxxkatt](#):
>
> **5) if your API is going to send int64 results, you should not be using int32 inputs**

Player structure IDS are Int64, NPC stations are Int32. So of course you can’t lookup a station using a structure ID. You should be using `/universe/structures/{structure_id}/` for structure information not `/universe/stations/{station_id}/`.

> [@roxxkatt](#):
>
> **6) it sure would be handy to be able to see structure services**

This is available in `/corporations/{corporation_id}/structures/`.

See [this](https://github.com/esi/esi-issues/issues/254) feature request.

---

<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:** [October 25, 2019, 1:22pm UTC](https://forums.eveonline.com/t/eve-structure-api-is-inconsistent-and-is-missing-structure-type/178344/7 "2019-10-25T13:22:55Z")

</div>

Closed on October 25, 2019, 1:22pm UTC

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