Open JeroenDeDauw opened 8 years ago
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
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?
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/items
): small element summaries/items/$id
): view of the entire document/items/$id/aliases
): partial view of the documentThe GitHub API has
/users
): small element summaries/users/$id
): more elaborate element summary/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.)