ESI Assets Question

I’m probably asking a really dumb question but, is there a way to have the assets endpoint return ONLY the assets from a specific location, the docs seem to indicate that i have to put literally every asset page by page which is really overkill for what i want to do, i mean surely CCP would rather i performed a single request instead of dozens of requests to pull the entire asset list for a 14 year old character :stuck_out_tongue:

As a novice with the ESI, I can say YES!!! but I don’t know how. :frowning:

What is that based on, the documentation doesn’t seem to mention being able to parse any specific data to the server so that it only responds with the required data

Has something to do with knowing the assets location ID, be it a station, hanger or can. Its been a while since I’ve looked into this, but it can be done.

No it can’t. You have to pull all the pages and filter out what you want.

Sadly this is what i figured, seems like a fairly large oversight, it means collecting loads of data i don’t need, hell, i have a single can in jita with enough corpses in it to fill a single page alone :confused:

It’s by design. Filtering is left on the client side to reduce the load on the server side. Proper cacheing and use of ETags/X-Pages headers makes it not super hard to deal with.

See the problem is, its actually going to cause more load on the server to have to return thousands of thousands of items in dozens of locations over multiple requests than it is for it to just send me 1 page of items from a single location

I mean the DB query to return the data is literally going to be a select * from items where location = x, this is going to take barely any time compared to having to return data 1000 rows at a time a dozen times

For a tool with literally 1 singular purpose thats a bit of a pain in the ass to deal with and i may aswell just make a terrible excel spreadsheet to track what i need instead of automating it via the API :confused:

The main point is to reduce load on the database. If you have the ability to filter for assets at a given location, caching becomes much much harder than just returning a JSON payload that was queried once from the database once per hour. Since everyone would be using a different id, the effectiveness of the cache on ESI’s side of things is greatly reduced. It is much less resource intensive to return a set of data from ESI’s cache, than it is to query the database.

It’s not really a big deal. You just check the X-Pages header, and loop n times, concatenating results to an array so you end up with one singular array of all the data.

Right, but the data isn’t cached until its requested in the first place, meaning it still has to generate the cache of the multiple queries i need except for a single query instead which is still then cached, in the end its still faster to just let people query specific stuff if they only want that one piece of data instead of wasting the resources on multiple queries, i mean if people want assets in multiple locations they can just grab it all, and i am aware of how to parse the data its just more of a headache than i wanted to deal with


Could always just get GESI and just just do =characters_character_assets("Blacksmoke16",-1) in a cell and done.

Sure but like i said, 99% of my assets is worthless data to me, i’m literally only after being able to monitor 1 specific set of items, but being wasteful is the name of the game it seems :confused:

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