Allow passing a list of fields when retrieving data
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 254
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Title: Allow passing a list of fields when retrieving data
Issue found of: 10/13/2021
Endpoint(s):
- Any endpoint that returns data
Expected behaviour:
As an example, with the /users/{id}/tracks endpoint, it is currently returning a whole bunch of fields that I do not need for my application. It would be nice to have an optional fields querystring parameter, something along the lines of /users/{id}/tracks?fields=id,title,uri,permalink,user[username],... to get only the fields that are needed in the result. This could help greatly reduce request size.
Actual behaviour:
Currently, we get all of the data, even if we don't need all of it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the /users/{id}/tracks endpoint and review how responses are defined for the other endpoints that return data. Determine the scope and behavior of an optional fields query parameter, including nested fields such as user[username]; done means responses contain only the requested fields and request size is reduced.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100