JeroenDeDauw / QueryrAPI

🖹 REST API for Wikibase data
https://wikibase.consulting
7 stars 0 forks source link

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

Open JeroenDeDauw opened 8 years ago

JeroenDeDauw commented 8 years ago

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

The GitHub API has

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 commented 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

JeroenDeDauw commented 8 years ago

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?