APIv2 Char AssetList XML

From EVEDev
Jump to: navigation, search
Api.pngAPI Methods - Category Home - API Overview - API Page Index - API Libraries - API Wanted Features




Returns a list of assets owned by a character.

Data Caching

This method is cached according to the Long Cache Style.

Input Arguments

Customizable API Key

Name Type Description
keyID int The ID of the Customizable API Key for authentication, found at: https://support.eveonline.com/api.
vCode char(64) The user defined or CCP generated Verification Code for the Customizable API Key, found at https://support.eveonline.com/api.
characterID bigint The ID of the character for the requested data, from Character List.

Legacy API Key

Name Type Description
userID int userID of account for authentication.
apiKey char(64) Limited or Full access API key of account.
characterID bigint The ID of the character for the requested data, from Character List.

Output XML

<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="1">
  <currentTime>2007-12-01 17:55:07</currentTime>
    <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" />
      <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" />
      <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" />
      <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" />
  <cachedUntil>2007-12-02 16:55:07</cachedUntil>

Output Rowset Columns

Name Type Description
itemID bigint 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. Please note that the type of this value has been changed from int to bigint with Tyrannis 1.2
locationID bigint 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. The type of this value has been changed from int to bigint with Tyrannis 1.2
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.
rawQuantity int Items in the AssetList (and ContractItems) now include a rawQuantity attribute if the quantity in the DB is negative (see below).

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.

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.


New field - rawQuantity

Items in the AssetList (and ContractItems) now include a rawQuantity attribute if the quantity in the DB is negative. Negative quantities are in fact codes, -1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy. For further information about negative quantities see this devblog http://www.eveonline.com/devblog.asp?a=blog&nbid=2324


For an example bit of SQL you'll need to turn the LocationID into a location name see the Corporation AssetList page.

Personal tools