Return only specific fields from the API GET response

Great question, but no this is not an option. There is not anything in the core app that is listening for params to filter by.

I think you will be best off just filtering out the results either with a tool like jq on the command line or using whatever programming language you are using to make the api requests.

If this is indeed a must have requirement two options do exist though. You could use the data explorer plugin with a query that returns only the data you need and then make an api request to that query. Another alternative would be to create a custom plugin that you create a new route and controller for that returns only the data you need.

1 Like