Launching inventory endpoints

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Lawton Campbell

Web Programmer

Next

Activated a handful of new endpoints — mostly authenticated and require the “inventories” permission — that provide access to an account’s various inventories:

Note that, as with all authenticated endpoints you can pass the API key either via an “Authorization: Bearer $key” header, or with the access_token parameter. Details about each of the endpoints can be found in the CDI pull requests on Github (linked for each one).

Finally, there’s a bug in the API enumeration that incorrectly and unconditionally lists the characters inventory/equipment endpoints as disabled. We’ll look to fix that at some point in the future so it shows the status of those endpoints properly.

Questions/comments? Happy developing

Launching inventory endpoints

in API Development

Posted by: Gilj.6304

Gilj.6304

Wow, it’s finally here \o/!
tyvm for the hard work!
<3 <3 <3, Gilj.

Launching inventory endpoints

in API Development

Posted by: Ludovicus.7980

Ludovicus.7980

GW2 armory, here we go!

The glory of my ancestors shall be restored.

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

GW2 armory, here we go!

I think the last bit we’re missing for the MVP is traits/skills

Launching inventory endpoints

in API Development

Posted by: darthmaim.6017

darthmaim.6017

This is awesome, thanks!

Edit: What is up with all those (mostly non existing) items in characters “equipment” without a “slot” (IDs 62,63,64,…)? Some of them seem to be old town clothing (ID 36370) and some old PvP weapons (have PvP Sigils as upgrade, (ID 5365 with upgrade 21207)).

(edited by darthmaim.6017)

Launching inventory endpoints

in API Development

Posted by: AllIsVain.6409

AllIsVain.6409

If I have a stat selected item, does the inventory API let me see what the selected stat is?

Lootballs – Elementalist

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

If I have a stat selected item, does the inventory API let me see what the selected stat is?

Uhh, I completely forgot about that. For the 1-time stat selections it does — those are actually containers that just create the selected item. For legendary weapons which let you switch at-will, it won’t currently display which stats are selected. I’ll have that fixed at some point.

Completely forgot that was a thing.

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Edit: What is up with all those (mostly non existing) items in characters “equipment” without a “slot” (IDs 62,63,64,…)? Some of them seem to be old town clothing (ID 36370) and some old PvP weapons (have PvP Sigils as upgrade, (ID 5365 with upgrade 21207)).

O_o.

That’s a super weird bug, not sure how that slipped through the unit tests. Looking into it now.

Launching inventory endpoints

in API Development

Posted by: rodadams.5963

rodadams.5963

Much coolness.
I think we’ve just hit critical mass on data to make some truly cool tools.

I could see getting the wallet info out to complete some projects, such as checking Spirit Shard and gold count for questions like “Can I finish my Legendary with what I have right now?”

Launching inventory endpoints

in API Development

Posted by: darthmaim.6017

darthmaim.6017

I admit, haven’t logged in with those characters for ages.

Launching inventory endpoints

in API Development

Posted by: Faedrivin.5382

Faedrivin.5382

I especially like the equipped stuff etc – now I can easily see all my characters’ stuff without having to rotate through them… I hope I find the time soon to code a little bit with it!
It’s great that this API is possible!

Septimum Confoederatio Draconis [Sept]
Seafarer’s Rest (SFR)
Human Mesmer

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I admit, haven’t logged in with those characters for ages.

Those broken equipment slots are on my linked examples (which are from my account) — after digging around in the code a bit, older characters still apparently have things equipped in clothing slots (whereas newer ones don’t). Super weird, but easy enough to fix.

Launching inventory endpoints

in API Development

Posted by: Rashy.4165

Rashy.4165

GW2 armory, here we go!

I think the last bit we’re missing for the MVP is traits/skills

Yes, please! Would be awesome to have easy access to skills/traits for build calculators.

Launching inventory endpoints

in API Development

Posted by: Leg.7632

Leg.7632

It looks like the backpack and aquatic helm are missing the ‘skin’ field under character

{"equipment":
[{"id":64050,“slot”:“HelmAquatic”,upgrades,
{"id":62921,“slot”:"Backpack"},
{"id":6913,“slot”:“Coat”,skin,

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

It looks like the backpack and aquatic helm are missing the ‘skin’ field under character

{"equipment":
[{"id":64050,“slot”:“HelmAquatic”,upgrades,
{"id":62921,“slot”:"Backpack"},
{"id":6913,“slot”:“Coat”,skin,

They’re not transmuted — they’re using the default skin of the item.

Launching inventory endpoints

in API Development

Posted by: Vegeta.2563

Vegeta.2563

Is sharing API Keys with other players ok to do, or should I keep this information to myself? I wasn’t sure if say giving someone an API Key would put me at risk for account compromisation, or something related to that.

This Guild Is Fire [PRUF]

Launching inventory endpoints

in API Development

Posted by: derzwo.3672

derzwo.3672

woooooooow! just want coding – but first… get some sleep^^
(1:20 am in germany)

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Is sharing API Keys with other players ok to do, or should I keep this information to myself? I wasn’t sure if say giving someone an API Key would put me at risk for account compromisation, or something related to that.

API keys are meant to be shared — but try to make a different key for each application so that if you later change your mind you can revoke only the application you don’t want to use anymore. When you delete the key, you’re effectively retracting any access you granted by sharing them.

All of the links in the original post use an API key from my personal account, for example.

Using API keys does not increase your risk for account compromise.

Launching inventory endpoints

in API Development

Posted by: Tamasan.6457

Tamasan.6457

Is sharing API Keys with other players ok to do, or should I keep this information to myself? I wasn’t sure if say giving someone an API Key would put me at risk for account compromisation, or something related to that.

Yes, it’s fine to share an API key with other people/websites. That’s actually the entire point of the API, to enable cool tools and such without risking account compromise. Data from the API is only read-only.

(In and of itself, sharing your API key does not increase your risk of account compromise. However, if for example you were to create an account at some website that lets you store your API key with them, do not under any circumstance reuse your game or email password.)

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I admit, haven’t logged in with those characters for ages.

Those broken equipment slots are on my linked examples (which are from my account) — after digging around in the code a bit, older characters still apparently have things equipped in clothing slots (whereas newer ones don’t). Super weird, but easy enough to fix.

Just deployed the fix for this.

Launching inventory endpoints

in API Development

Posted by: Eight Samurai.6840

Eight Samurai.6840

Activated a handful of new endpoints — mostly authenticated and require the “inventories” permission — that provide access to an account’s various inventories:

Note that, as with all authenticated endpoints you can pass the API key either via an “Authorization: Bearer $key” header, or with the access_token parameter. Details about each of the endpoints can be found in the CDI pull requests on Github (linked for each one).

Finally, there’s a bug in the API enumeration that incorrectly and unconditionally lists the characters inventory/equipment endpoints as disabled. We’ll look to fix that at some point in the future so it shows the status of those endpoints properly.

Questions/comments? Happy developing

This stuff sounds really important…. but I don’t get it? What does all of this stuff mean?

Launching inventory endpoints

in API Development

Posted by: Fatali.4819

Fatali.4819

Activated a handful of new endpoints — mostly authenticated and require the “inventories” permission — that provide access to an account’s various inventories:

Note that, as with all authenticated endpoints you can pass the API key either via an “Authorization: Bearer $key” header, or with the access_token parameter. Details about each of the endpoints can be found in the CDI pull requests on Github (linked for each one).

Finally, there’s a bug in the API enumeration that incorrectly and unconditionally lists the characters inventory/equipment endpoints as disabled. We’ll look to fix that at some point in the future so it shows the status of those endpoints properly.

Questions/comments? Happy developing

This stuff sounds really important…. but I don’t get it? What does all of this stuff mean?

These API endpoints will allow a user to generate an API key which will give an application access to various pieces of information about an account.

Some new possibilities for websites/apps include:

- View inventory away from home.
- Cross-list bank contents against one of the various market trackers to see current wealth, as well as find stuff like price spikes in some old dusty skin on your storage ranger.
- Get currently equipped gear/traits(eventually) loaded directly into a build calculator.

Launching inventory endpoints

in API Development

Posted by: MithranArkanere.8957

MithranArkanere.8957

This is one of the greatest steps towards having sites that can show account profiles.

SUGGEST-A-TRON says:
PAY—ONCE—UNLOCKS—ARE—ALWAYS—BETTER.
No exceptions!

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

So, I just made a simple page that fetches all the items in my bank and displays them on the page for me. It works fine, except for one problem.

For whatever reason, the last 14 bank slots are returned as null. They’re not empty, they’re full of Bloodstone Dust, Empyreal Fragments, and Dragonite Ore. I have 9 bank tabs, and they all work fine except for the last tab in those final 14 slots.

EDIT: After a little more thought, I realize that 270 (9*30) minus 14 is 256. So apparently anything over 256 slots isn’t shown?

Blackgate
Harbinger Tryssa – Revenant

(edited by Eearslya.6309)

Launching inventory endpoints

in API Development

Posted by: Vavume.8065

Vavume.8065

I find this all so ghetto, just make an official arenanet armory like wow has…

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

For whatever reason, the last 14 bank slots are returned as null. They’re not empty, they’re full of Bloodstone Dust, Empyreal Fragments, and Dragonite Ore.

That’s super weird. Can you PM the API key you’re using? I can take at it tomorrow.

Launching inventory endpoints

in API Development

Posted by: fishball.7204

fishball.7204

Can confirm that this does not currently allow more than 256 slots in the bank, at least for me.

https://api.guildwars2.com/v2/account/bank?access_token=B3779B48-829C-6544-AEC3-13FF13C40542D36D225F-961E-4EBD-9F04-642C61962615

The last part of the thingy returns


 {"id":46733,"count":250},{"id":46752,"count":2},{"id":46733,"count":250},null,null,null,null,null,null,null,null,null,
null,null,null,null,null] 

which is the Augur Stone (2) + Dragonite Ore (250).

I would also like the add that for example, my Mini Queen Jennahs of which I have multiple, the API returns that I only have 1.

Attachments:

FOR THE GREEEEEEEEEEEEN

(edited by fishball.7204)

Launching inventory endpoints

in API Development

Posted by: Grax.9204

Grax.9204

Thanks for those amazing APIs!

I am currently having issues with invalid(?) inventory item IDs.
As an example, from the character API I get the ID 8702 for what are supposed to be my harpy feathers. The item API then tells me that there is no such ID.

I’ve uploaded a page to http://gw2maps.ch/char/. All the broken image icons show items with invalid IDs (the ID is visible in the html elements title). For me that’s quite a bunch. I can pass on my access token if that helps.

Here’s a list of IDs I get which seem to be invalid:
8702, 8764, 8680, 8678, 8714, 8464, 8677, 8729, 8733, 8696, 6467, 8704, 4646, 4579, 37274, 8781, 8792, 8698, 4651, 42041, 8789, 39141, 39151, 4652, 4582, 4585, 4653, 4655

Asura Mesmer – Gragx – Kodash
Virtus – [VRTS]
http://virtus-gilde.de/gw2map

(edited by Grax.9204)

Launching inventory endpoints

in API Development

Posted by: Dawntree.7246

Dawntree.7246

Awesome, I can instacheck my progression to legendaries! Thank you.

Just 1 question, is wallet data included? I can’t find it…

If that’s not the case, any chance to have those as well soon?

Emanuel Dawntree – Nord Guardian of [TasH] – 9×80
Whiteside Ridge

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Thanks for those amazing APIs!

I am currently having issues with invalid(?) inventory item IDs.
As an example, from the character API I get the ID 8702 for what are supposed to be my harpy feathers. The item API then tells me that there is no such ID.

I’ve uploaded a page to http://gw2maps.ch/char/. All the broken image icons show items with invalid IDs (the ID is visible in the html elements title). For me that’s quite a bunch. I can pass on my access token if that helps.

Here’s a list of IDs I get which seem to be invalid:
8702, 8764, 8680, 8678, 8714, 8464, 8677, 8729, 8733, 8696, 6467, 8704, 4646, 4579, 37274, 8781, 8792, 8698, 4651, 42041, 8789, 39141, 39151, 4652, 4582, 4585, 4653, 4655

This has been a long-standing issue. (See: https://forum-en.gw2archive.eu/forum/community/api/Item-IDs-Omitted-from-API/first )
The problem with the items endpoint is every item currently has to be manually whitelisted in order to show up in the API. (So they don’t accidentally release some in-progress HoT item or such.)

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: Tacco Raw.3168

Tacco Raw.3168

What does {"text":"ErrUnknown"} mean? Keep seeing this for /v2/materials and /v2/account/materials but not /v2/account/bank.

Launching inventory endpoints

in API Development

Posted by: Chiuna.2538

Chiuna.2538

Is it possible to see how equipped items are dyed from the /eqiupment API? If not, can that be added?

Launching inventory endpoints

in API Development

Posted by: Aralicia.6157

Aralicia.6157

Is it possible to see how equipped items are dyed from the /eqiupment API? If not, can that be added?

Not possible for now. But I personally like the idea, especially since dye/color data is already present thanks to the /colors endpoint.

That said, seems there’s a WIP about extending guild infos. Dyes may or may not appear afterward.

Launching inventory endpoints

in API Development

Posted by: quenoz.3859

quenoz.3859

this is super useful!

GW2 armory, here we go!

I think the last bit we’re missing for the MVP is traits/skills

does that mean that these will be added soon…? : >

The Unlikely Plan [TUP] Raid Leader

Launching inventory endpoints

in API Development

Posted by: Natir.7364

Natir.7364

I have a question with these changes. Would it allow someone to make an armory similar to World of Warcraft with being able to see what equipment they have on and maybe what abilities/traits they picked?

Obviously I didn’t see abilities/traits but I think that would be an amazing feature to see who is running what build and what equipment and runes/sigils they are using. Outside of what our entire outfit wants (because we want this with a passion), I think it would be nice to see what top players in each area are using. Like WvW, SPvP, PvE, et.

(edited by Natir.7364)

Launching inventory endpoints

in API Development

Posted by: Ayusaki.6739

Ayusaki.6739

this is super useful!

GW2 armory, here we go!

I think the last bit we’re missing for the MVP is traits/skills

does that mean that these will be added soon…? : >

https://github.com/arenanet/api-cdi/pull/42
https://github.com/arenanet/api-cdi/pull/5

Its on the todo list

[KnT] Kuliya/Kessumi/Kiyuu/Hit My Zerg Not Me

Launching inventory endpoints

in API Development

Posted by: quenoz.3859

quenoz.3859

The Unlikely Plan [TUP] Raid Leader

Launching inventory endpoints

in API Development

Posted by: Natir.7364

Natir.7364

Are there any plans to have these things be automated where its just mined from the player’s data automatically and they don’t have to get an API key?

Kind of further explanation from my post above but one of the things we do for our WvW is we run the same builds and gear setup for each class to make sure we maximize what we are doing. Sometimes when people keep dying, we figure out they are not running the same gear/build setup but we don’t know and thus cannot help them and show them what they may be doing wrong. It would be so much easier to just look at who is in our guild or just look up their info via their ID and check out their info to see what they are running.

Launching inventory endpoints

in API Development

Posted by: Nabrok.9023

Nabrok.9023

Are there any plans to have these things be automated where its just mined from the player’s data automatically and they don’t have to get an API key?

Kind of further explanation from my post above but one of the things we do for our WvW is we run the same builds and gear setup for each class to make sure we maximize what we are doing. Sometimes when people keep dying, we figure out they are not running the same gear/build setup but we don’t know and thus cannot help them and show them what they may be doing wrong. It would be so much easier to just look at who is in our guild or just look up their info via their ID and check out their info to see what they are running.

You can do this as of yesterday, but each of your guild members needs to “opt-in” by providing an API key.

“I’m not a PvE, WvW, or PvP player – I am a Guild Wars 2 player”
Tarnished Coast – Dissentient [DIS]
All classes

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Can confirm that this does not currently allow more than 256 slots in the bank, at least for me.

The bug that caused this is annoyingly in a fairly low-level component, so deploying the proper fix is going to take awhile. I’ve got a potential bandaid fix that I could conceivably deploy today, but it’s got some edge-cases (where the player’s bank is mostly empty) that still return broken data.

I’ll probably push it out, because I doubt that the edge cases are that common.

I am currently having issues with invalid(?) inventory item IDs.

There’s a bunch of ways to acquire items that don’t cause them to be whitelisted properly (e.g., buying them from a vendor). I’m working on fixing these bits up now, but I don’t have an ETA for when they go live

Just 1 question, is wallet data included? I can’t find it…

If that’s not the case, any chance to have those as well soon?

Wallet data is not yet included.

Is it possible to see how equipped items are dyed from the /eqiupment API? If not, can that be added?

It’s not currently possible, but a good idea for an improvement.

Are there any plans to have these things be automated where its just mined from the player’s data automatically and they don’t have to get an API key?

Nope. If you want their data, you’re going to need their permission (in the form of their API key). Once we have the bits to pull full builds (e.g., traits/skillbar) I imagine someone will make a site which lets you easily share what builds you’re running, so they can just copy-paste a URL into TS/Mumble.

Launching inventory endpoints

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Can confirm that this does not currently allow more than 256 slots in the bank, at least for me.

The bug that caused this is annoyingly in a fairly low-level component, so deploying the proper fix is going to take awhile. I’ve got a potential bandaid fix that I could conceivably deploy today, but it’s got some edge-cases (where the player’s bank is mostly empty) that still return broken data.

I’ll probably push it out, because I doubt that the edge cases are that common.

Just deployed the bandaid fix for this. The API will still return invalid data if:

  • The user has no items in the first 255 slots OR
  • If the slot index of the last item in the first 255 slots is less than the slot index of the first item after 255 — e.g., if you’ve got only got items in slots 4 and 235.

I expect most players will have quite a bit of stuff in their bank, so the above cases are fairly unlikely, I think.

The full fix should be released whenever the next patch lands.

Launching inventory endpoints

in API Development

Posted by: Vegeta.2563

Vegeta.2563

Is it possible to see what traits or utility skills are being used on each character using API Keys ?

This Guild Is Fire [PRUF]

Launching inventory endpoints

in API Development

Posted by: Ayusaki.6739

Ayusaki.6739

Is it possible to see what traits or utility skills are being used on each character using API Keys ?

Scroll up 7 posts…

https://forum-en.gw2archive.eu/forum/community/api/Launching-inventory-endpoints/first#post5215567

[KnT] Kuliya/Kessumi/Kiyuu/Hit My Zerg Not Me

Launching inventory endpoints

in API Development

Posted by: queicherius.2563

queicherius.2563

Hey there,

after playing around with the new APIs I came up with a Armory-Style to display your characters (WIP)

http://gw2efficiency.com/account/character/Bloodstone%20Deposit/A3966375-40A4-FA40-B32B-48AE840660746BA3DAAA-69FA-4271-8CBA-5E100C5FB28D

Launching inventory endpoints

in API Development

Posted by: fishball.7204

fishball.7204

Is the materials end point down right now? can’t seem to access it at all getting error.

{"text":"ErrUnknown"}
FOR THE GREEEEEEEEEEEEN

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Is the materials end point down right now? can’t seem to access it at all getting error.

{"text":"ErrUnknown"}

Seems to be working fine for me, both /v2/materials and /v2/account/materials. Where and how are you trying to load it?

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: fishball.7204

fishball.7204

Just using this:

https://keeky.github.io/Guild-Wars-2-API-Explorer/#v2/account/materials

T=

Edit: ok it works on my end, idk why it doesn’t work for him and it doesn’t work in my web browser (the other stuff usually displays as a blob of data but I still see it in the browser this just says error)

FOR THE GREEEEEEEEEEEEN

(edited by fishball.7204)

Launching inventory endpoints

in API Development

Posted by: LAzraeL.2346

LAzraeL.2346

Are the skins in characters equipments just simple items id?

Seems like I’m getting the wrong skin for some armors and backpacks..
In your example, the backpack skin is showing “Dolyak Greaves”, gloves skin is “Nika’s Pauldrons”,etc.

Edit: ah.. nvm. Didn’t realize there’s another API for skins.

(edited by LAzraeL.2346)

Launching inventory endpoints

in API Development

Posted by: MentalFS.2589

MentalFS.2589

Is there a way to find out if an item is soulbound? I can see “SoulBindOnUse” when I query the items endpoint, but not if the item was already used or not. I’m also not sure if there’s something like “AccountBindOnUse”, but the same would apply there.

Let the bards sing and the skaalds proclaim her glorious name forever[…]: Apatia!

(edited by MentalFS.2589)

Launching inventory endpoints

in API Development

Posted by: Tacco Raw.3168

Tacco Raw.3168

Is the materials end point down right now? can’t seem to access it at all getting error.

{"text":"ErrUnknown"}

Seems to be working fine for me, both /v2/materials and /v2/account/materials. Where and how are you trying to load it?

It shows when using Chrome or IE, but request sent by python code works fine.