w3c / w3c-api

The W3C API
https://w3c.github.io/w3c-api/
214 stars 92 forks source link

Make it easy to get all the available data #46

Open sandhawke opened 9 years ago

sandhawke commented 9 years ago

If I want to get at the data in some way that's not anticipated, it's very painful. Hypothetically, if I wanted to find the users who had 6-letter last names, I'd have to traverse all the 100-item pages of all the groups, find their users, then traverse all the 100-item pages of those users. For some data, I'd then need to fetch every single one of those user pages, too.

A simple first step would be to allow all types to be fetched. Not just users in groups, but users, at the top level (while still only showing those in public groups). And don't max out ?items at 100. Max it at 100,000 if you need a max. That's still only a few megabytes.

It would also be nice to be able to inline data other than href and title, like with an ?inline=true flag, but that's lower priority.

Thanks.

vivienlacourba commented 9 years ago

Hi @sandhawke

users, at the top level (while still only showing those in public groups).

Initially we had an /users endpoint for all users but we removed it for confidentiality reason. At the same time we also introduced user hash (instead of the numeric ids). We might re-discuss this now that all public groups have their list of participants public (and as you said only list those in public groups).

If I wanted to find the users who had 6-letter last names

We already had in mind the ability to filter results. Simple use cases are the possibility to list only member organizations (see #41), or only list groups that are of type WG or IG.

It would also be nice to be able to inline data other than href and title, like with an ?inline=true flag, but that's lower priority.

This feature already exists. It is documented at: https://w3c.github.io/w3c-api/#parameters and https://api-test.w3.org/doc

Routes that return a collection of objects accept an ?embed=1 parameter which embeds the object instead of simply link to it (not that the embed feature only applies to those objects and not to sub resources of those objects).

Example "Chairs of the Social Web Working Group": https://api-test.w3.org/groups/72531/chairs?embed=1