The fields parameter allows you to specify which fields should be included in the API response. This can help reduce the amount of data transferred and processed, improving performance and efficiency.
By default, the Literary Quotes API returns all available fields for each quote. However, you may not always need all this information. The fields parameter lets you request only the specific fields you need.
To use the fields parameter, add it to your query string with a comma-separated list of the fields you want to include:
http://localhost:3000/quotes?fields=author,quote,work
The following fields are available:
Using curl:
curl "http://localhost:3000/quotes?fields=author,quote,work" \
-H "X-Bypass-Auth: true" \
-H "Accept: application/json"
Using Postman:
http://localhost:3000/quotes.id field is always included, even if not explicitly requested.