esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
207 stars 23 forks source link

esi-universe: Agent is returned as a character #42

Open aquarhead opened 7 years ago

aquarhead commented 7 years ago

e.g.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[3010135]' 'https://esi.tech.ccp.is/latest/universe/names/?datasource=tranquility'

This returns:

[
  {
    "id": 3010135,
    "name": "Lozdod Pousel",
    "category": "character"
  }
]

Which is actually an Agent (in station), and if you query the id in /characters/{character_id}/, it tells you it's not a character:

{
  "error": "3010135 is not a character ID"
}
Robbilie commented 7 years ago

this is also true for NPC Corp CEOs, this behaviour has been breaking about all past APIs and the EVE Gate, I would really like to have the character endpoint to work for NPCs aswell, otherwise a seperate endpoint would be nice but not preferable

justin-lyon commented 7 years ago

Mission Agent ID retrieved using /universe/names/ shows Category as character. Lozdod Pousel, agent_id = 3010135

Using this Agent ID in the character resources returns mixed results. /portrait/ - 200 /characters/{character_id}/ - 422, "3010135 is not a character ID" /characters/{character_id}/location/ - 403, "Forbidden"

mumbleskates commented 7 years ago

While annoying, this does match with the behavior of the previous APIs.

The ID 1 (EVE System) and the IDs in range(3000001, 3020000) or so are all Character type and all NPCs I could find fall into this latter range. Character sheets for these characters are not queryable on any API so far but you can still get their names from the /characters/names/ endpoint.

An alternate format for the character sheet, including corporation membership and an is_npc: true key or something of the sort, would be welcome.