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

How lean should the item and property endpoints be? #28

Open
JeroenDeDauw opened this issue Nov 27, 2015 · 2 comments
Open

How lean should the item and property endpoints be? #28

JeroenDeDauw opened this issue Nov 27, 2015 · 2 comments

Comments

@JeroenDeDauw
Copy link
Owner

Right now these endpoints (/items/$id) provide a view on the entire item/property document. A lot of information is omitted, though it is still a view on the entire thing. In list form we have

  • Collection endpoint (/items): small element summaries
  • Element endpoint (/items/$id): view of the entire document
  • Sub element endpoints (/items/$id/aliases): partial view of the document

The GitHub API has

  • Collection endpoint (/users): small element summaries
  • Element endpoint (/users/$id): more elaborate element summary
  • Sub element endpoints (/users/$id/followers): partial view of the "document"

Would following the GitHub approach (not having statements and such on the element endpoints) be better, and why? (This depends on the use cases, and it's unclear to me which ones are more important.)

@addshore
Copy link

Thinking ahead it might be nice to add another level here
/entities/items/$id etc?
/entities/ then exposes all entity types accessible through the API
Providing more room at the root level for other things

Yes I think the github approach is the way forward

@JeroenDeDauw
Copy link
Owner Author

Thinking ahead it might be nice to add another level here
/entities/items/$id etc?

Can you file a dedicated ticket for that?

Yes I think the github approach is the way forward

Can you elaborate on why?

One downside of this approach is that it will be harder to get both labels and statements for an item. Then again, I'm not sure how common that situation is.

Another downside is that it seems more intuitive to have a whole item at /items/$id.

So what justifies the change?

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

2 participants