APIv2 Char AssetList XML
From EVEDev
Contents |
[edit] /char/AssetList.xml.aspx
[edit] Overview
Returns a list of assets owned by a character.
[edit] Data Caching
This method is cached according to the Long Cache Style.
[edit] Input Arguments
| Name | Type | Description |
|---|---|---|
| userID | int | userID of account for authentication. |
| apiKey | char(64) | Full access API key of account. |
| version | int | Version of the API we're calling, needs to be 2. |
| characterID | int | CharacterID of character for authentication. |
[edit] Output XML
<?xml version='1.0' encoding='UTF-8'?> <eveapi version="1"> <currentTime>2007-12-01 17:55:07</currentTime> <result> <rowset name="assets" key="itemID" columns="itemID,locationID,typeID,quantity,flag,singleton"> <row itemID="150354641" locationID="30000380" typeID="11019" quantity="1" flag="0" singleton="1"> <rowset name="contents" key="itemID" columns="itemID,typeID,quantity,flag,singleton"> <row itemID="150354709" typeID="16275" quantity="200000" flag="5" singleton="0" /> <row itemID="150354710" typeID="16272" quantity="150000" flag="5" singleton="0" /> <row itemID="150354711" typeID="16273" quantity="150000" flag="5" singleton="0" /> <row itemID="150354712" typeID="24597" quantity="1000" flag="5" singleton="0" /> <row itemID="150354713" typeID="24596" quantity="1000" flag="5" singleton="0" /> <row itemID="150354714" typeID="24595" quantity="1000" flag="5" singleton="0" /> <row itemID="150354715" typeID="24594" quantity="1000" flag="5" singleton="0" /> <row itemID="150354716" typeID="24593" quantity="1000" flag="5" singleton="0" /> <row itemID="150354717" typeID="24592" quantity="1000" flag="5" singleton="0" /> <row itemID="150354718" typeID="16274" quantity="450000" flag="5" singleton="0" /> <row itemID="150354719" typeID="9848" quantity="1000" flag="5" singleton="0" /> <row itemID="150354720" typeID="9832" quantity="8000" flag="5" singleton="0" /> <row itemID="150354721" typeID="3689" quantity="5000" flag="5" singleton="0" /> <row itemID="150354722" typeID="3683" quantity="25000" flag="5" singleton="0" /> <row itemID="150354723" typeID="44" quantity="4000" flag="5" singleton="0" /> </rowset> </row> <row itemID="150354706" locationID="30001984" typeID="11019" quantity="1" flag="0" singleton="1"> <rowset name="contents" key="itemID" columns="itemID,typeID,quantity,flag,singleton"> <row itemID="150354741" typeID="24593" quantity="400" flag="5" singleton="0" /> <row itemID="150354742" typeID="24592" quantity="400" flag="5" singleton="0" /> <row itemID="150354755" typeID="16275" quantity="199000" flag="5" singleton="0" /> <row itemID="150354837" typeID="24597" quantity="400" flag="5" singleton="0" /> <row itemID="150354838" typeID="24596" quantity="400" flag="5" singleton="0" /> <row itemID="150354839" typeID="24595" quantity="400" flag="5" singleton="0" /> <row itemID="150354840" typeID="24594" quantity="400" flag="5" singleton="0" /> <row itemID="150356329" typeID="14343" quantity="1" flag="5" singleton="0" /> </rowset> </row> <row itemID="150212056" locationID="60001078" typeID="25851" quantity="10" flag="4" singleton="0" /> <row itemID="150212057" locationID="60001078" typeID="20424" quantity="20" flag="4" singleton="0" /> <row itemID="150212058" locationID="60001078" typeID="20421" quantity="20" flag="4" singleton="0" /> <row itemID="150357641" locationID="30001984" typeID="23" quantity="1" flag="0" singleton="1"> <rowset name="contents" key="itemID" columns="itemID,typeID,quantity,flag,singleton"> <row itemID="150357740" typeID="16275" quantity="9166" flag="0" singleton="0" /> </rowset> </row> <row itemID="150212062" locationID="60001078" typeID="944" quantity="1" flag="4" singleton="1" /> <row itemID="150212063" locationID="60001078" typeID="597" quantity="1" flag="4" singleton="0" /> </rowset> </result> <cachedUntil>2007-12-02 16:55:07</cachedUntil> </eveapi>
[edit] Output Rowset Columns
| Name | Type | Description |
|---|---|---|
| itemID | int | Unique ID for this item. This is only guaranteed to be unique within this page load. IDs are recycled over time and it is possible for this to happen. Also, items are not guaranteed to maintain the same itemID over time. When they are repackaged, stacks are split or merged, when they're assembled, and other actions can cause itemIDs to change. |
| locationID | int | References a solar system or station. Note that this column is not present in the sub-asset lists, i.e. for things inside of other things. |
| typeID | int | The type of this item. References the invTypes table. |
| quantity | int | How many items are in this stack. |
| flag | int | Indicates something about this item's storage location. The flag is used to differentiate between hangar divisions, drone bay, fitting location, and similar. Please see the Inventory Flags documentation. |
| singleton | bool | If true, indicates that this item is a singleton. This means that the item is not packaged. |
[edit] Additional Information
The asset methods require a little explaining. They are definitely on the advanced side: you are going to want to store the data locally, and you will need to combine the information with the static data export we provide in order to figure out what is what.
The URLs are /corp/AssetList.xml.aspx and /char/AssetList.xml.aspx. They have a twenty-three (23) hour cache time, but are similar to the journal/market pages: once you've loaded them, you can't load them again for a day! I really, really suggest that you work out any bugs in your local cache in your application before you say how hard it is to debug your application.
Both pages require the full access API key. The corporate view requires you to be a Director or CEO - sorry, there's no way to do individual access to see what hangars you're allowed to see, etc etc.
The asset view finds everything you own and everything inside everything else. This means you can see your ships and what is fitted to them. You can see inside of your containers. You can see into your POSs too, and the corporate hangar arrays located way out there.
It does not give you the name of the container or ship, though. I tried, but it doesn't seem to be doable within the constraints I have for the particular database call this is using. That's okay, I think we'll live without that for now.
Pay particular attention to how the nesting works. The top level rowset is named "assets", but then each item in there can have "contents." Each item in that can also have a "contents" list. There's a limit to how far it can go in terms of EVE, but your code should assume there's no real limit.
itemID is unique for the dump, but is not really guaranteed to remain the same, especially if there is repackaging going on. If you build a ship, it will have itemID X, repackage, it gets Y, build it again, it's now Z, even though it's the "same" ship. We don't know that, you don't know that.
I've taken the liberty of only outputting columns if they are non-default. The defaults are: singleton = 0, flag = 0, quantity = 1.
--Garthagk

