Help us to reduce invalid call by telling us what kind a location is
Feature Request
Since the early start of ESI, all the community is facing various troubles due to location and game design decision. I'll not open another debate on the structure endpoint which will conclude to non response or walls, however, I submit a suggestion which could help us to reduce, at least, a little bit more, invalid calls against ESI.
On the following endpoints, we have a location_type attribute with which we're able to determine the nature of location ID we have :
- /v5/characters/{character_id}/assets/
- /v5/corporations/{corporation_id}/assets/
- /characters/{character_id}/clones/
However, if we're able to distinguish a station from a structure with clones, we're not able to do it from assets - neither from a Customs Office.
So purpose is simple, could you expend location_type attribute from assets endpoints in a way we would be able to know if the call we're doing will result in an invalid call, because of invalid assets navigation - or simply because we're trying to search a structure which is affaict, a Customs Office ?
Current location_type is defined as follow : [ station, solar_system, item, other ]
I suggest updating it, so it looks like [ station, solar_system, item, other, structure, customs_office ]
In last 8 hours, I made 691 invalid calls from my own SeAT instance - half of them could be avoided because it try to resolve a structure using a Customs Office ID. Unfortunately, I'm unable to know it, and according to assets path, it could be a structure - so, my only choice, is to try it, which will result in a HTTP 403 - falling in the second case - does the 403 mean I don't have access to this structure, and it's "okish", or it means I'm doing a mistake - and it need to be fix ?
Use case
Somebody looking for its asset location.
Example return
[
{
"is_blueprint_copy": true,
"is_singleton": true,
"item_id": 1000000016835,
"location_flag": "Hangar",
"location_id": 60002959,
"location_type": "station",
"quantity": 1,
"type_id": 3516
}
],
[
{
"is_blueprint_copy": true,
"is_singleton": true,
"item_id": 1000000016401,
"location_flag": "Hangar",
"location_id": 1027261679596,
"location_type": "structure",
"quantity": 1,
"type_id": 3516
}
],
[
{
"item_id": 1000000016837,
"location_flag": "Hangar",
"location_id": 1034499360372,
"location_type": "customs_office",
"quantity": 3424,
"type_id": 9832
}
],
[
{
"is_singleton": true,
"item_id": 101389427,
"location_flag": "RigSlot0",
"location_id": 482903097,
"location_type": "item",
"quantity": 1,
"type_id": 25896
}
]
Checklist
Check all boxes that apply to this issue:
- [x] Feature request description is provided
- [x] Use case exists
- [ ] Feature requires a new route
- [x] Feature adds data to existing route
- [ ] Feature requires new auth scope
- [x] Feature can reuse existing scope
- [ ] Feature does not require auth
- [ ] Meta feature, applies to all routes
Couldn't you use https://docs.esi.evetech.net/docs/asset_location_id.html#asset-location_id-quick-reference to know what things are based on the ID itself?
EDIT: At least as a semi workaround.
Sadly, to the best of my knowledge, structures and customs offices share the same id space, so it's impossible to know if it's one or the other. It's a good idea, lets hope it gets picked up...
Assets, structures and customs office are all sharing the same ID range => item, which is something in 1 000 000 000 000+
I know this is a bit old of a request, but it is a bit frustrating to read through assets and try to figure out where a PI item might be. Given the purpose of the assets table is to tell us where the assets are, I recommend linking the customs office to the planet in the same way a hangar is linked to a station. In both instances, if i want the system or region, I can link them in relevant tables providing a linkage of an asset item location all the way to region if I so wish.
That said, here is an example of suggestion to change the location_id from the customs office, to a planet:
{
"is_singleton": false,
"item_id": 1040242907442,
"location_flag": "Hangar",
"location_id": 102975146100540315407, -- Planet ID
"location_type": "item""customs_office", -- As suggested above, not required with this change but would be nice.
"quantity": 34460,
"type_id": 2392
},