Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/universe/structures/{structure_id}/ does not return structure_id in the response. #273

Closed
MrNukealizer opened this issue Feb 15, 2017 · 10 comments

Comments

@MrNukealizer
Copy link

/universe/structures/{structure_id}/ does not return structure_id in the response data. All of the other /universe/xxx/{xxx_id} endpoints return xxx_id in the response, making the response for structures unique in that regard.

@aquarhead aquarhead added the New label Feb 15, 2017
@regner
Copy link

regner commented Feb 15, 2017

It's something they are fairly inconsistent about. The character details page for example doesn't return it either.

@ddavaham
Copy link
Contributor

ddavaham commented Feb 16, 2017

Gonna chip in here. To my knowledge, no endpoint that requires an id or any type to make the request returns that id in the response. That includes Characters, Corporations, and Alliances. It would be nice if the id was included in the response body.

Edit: Apparently, most of the /universe/ endpoints return the request id in the response body. Excluding those from my statement

@MrNukealizer
Copy link
Author

That was pretty much my point. You can request info on a station and the id is in the returned data. You can do the same for types, groups, planets, stargates, etc. When requesting information on a structure, however, if you want to associate the data with the id you need to do more work on the returned data to add it.

@a-tal
Copy link
Contributor

a-tal commented Mar 9, 2017

I'm way more inclined to remove the instances where we return a param passed instead.

from a quick look at esi-universe, that would be:

  • GET /universe/categories/{category_id}/
  • GET /universe/constellations/{constellation_id}/
  • GET /universe/graphics/{graphic_id}/
  • GET /universe/groups/{group_id}/
  • GET /universe/moons/{moon_id}/
  • GET /universe/planets/{planet_id}/
  • GET /universe/regions/{region_id}/
  • GET /universe/stargates/{stargate_id}/
  • GET /universe/stations/{station_id}/ (v2 only)
  • GET /universe/systems/{system_id}/ (v2 only)
  • GET /universe/types/{type_id}/ (v2 and v3)

ping @aquarhead for input/feedback

@regner
Copy link

regner commented Mar 9, 2017

Why would you prefer to remove the ID instead of add it in if you don't mind me asking?

@a-tal
Copy link
Contributor

a-tal commented Mar 9, 2017

it's information the requestor already has

@Robbilie
Copy link
Contributor

Robbilie commented Mar 9, 2017

its information the requester probably wants to store associated with the new data
(i for example dump the returned ESI data with an id added if not existant yet into a mongodb so either i create a new object with the returned stuff and the id that i already had or i just use the complete object i get from esi…)

@regner
Copy link

regner commented Mar 9, 2017

The requester doesn't always have it. Links get passed around for example. The fleet links from the client for example? Or links passed from one app to another.

@aquarhead
Copy link
Contributor

I'm more towards thinking of it as a part/property of the resource we're requesting. So I'd vote for having it in the response (as a representation of the resource)

@lukasni
Copy link
Member

lukasni commented Feb 18, 2020

Closing this as it is covered by #1122 which includes more examples

@lukasni lukasni closed this as completed Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants