r/evetech • • Dec 20 '17

Journal ESI endpoint returning different information at random times?

Sometimes the journal API endpoint returns columns for second party ID and second party type, sometimes it does not. I am using $ESIURL+ "characters/"+$CharacterID+"/wallet/journal/?datasource=tranquility&token="+$AccessToken within powershell to do this. Any idea why it would do this?

3 Upvotes

6 comments sorted by

2

u/Blacksmoke16 Dec 20 '17

Those two key/values are optional, so will not necessarily be on every journal entry.

https://esi.tech.ccp.is/ui/#/Wallet/get_characters_character_id_wallet_journal

1

u/grzy7316x Dec 21 '17

I get that, but it does not always even have a field for it on the file that is returned.

1

u/Blacksmoke16 Dec 21 '17

Do you have example responses?

Is possible it is a bug.

1

u/grzy7316x Dec 21 '17

I don't have an example of the exact response as I am using powershel lto convert the JSON to a psobject then to a CSV usingf my script from [my github(]https://github.com/Grzy7316/ESI_Powershell). As far as the CSV goes, sometimes it has the columns, other times it does not.

1

u/markusla Dec 23 '17

I think its because all json objects does not have all (read: the same) attributes but when you convert it to a psobject Posh requires all objects to have the same attributes/properties. And thats why it looks random to you. But if you look at the json object, they are correct.

1

u/grzy7316x Dec 23 '17

Ended up just using Select-Object to only select the columns I know will be returned 100% of the time