Variations in API Filter Syntax
Doing a bit of research today on variations in how different API implementations have chosen to support filter syntax. This blog post is a placeholder for organizing additional examples that I am working collect and organize.
1.0 References
- https://en.wikipedia.org/wiki/Query_string
- " Various ad hoc limitations on request-line length are found in practice."
- "The common workaround for these problems is to use POST instead of GET and store the parameters in the request body."
- RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax
- https://www.programmableweb.com/category/all/apis
2.0 Query Syntax Examples
2.1 Elastic Search Query Syntax:
Elastic Search query syntax:
- FDIC: BankFind Suite: API for Data Miners & Developers
2.2 Github.com
- https://docs.github.com/en/free-pro-team@latest/rest/reference/search
- NOTE: Syntax, request & response examples shows on this page
- The Search API does not support queries that:
- "are longer than 256 characters (not including operators or qualifiers)."
- "have more than five
AND
,OR
, orNOT
operators." - "GitHub Search API provides up to 1,000 results for each search."
- Note: Uses the page metaphor: "Results per page (max 100)"
- TO-DO: verify if the API still uses the "per_page" parameter
- https://docs.github.com/en/free-pro-team@latest/github/searching-for-information-on-github/understanding-the-search-syntax
- https://docs.github.com/en/free-pro-team@latest/github/searching-for-information-on-github/searching-on-github
- Finding Files on Github
- Search code:
- https://docs.github.com/en/free-pro-team@latest/github/searching-for-information-on-github/searching-code
- "Only files smaller than 384 KB are searchable."
-
- Search commits
- Search issues and pull requests
- Search labels
- Search repositories
- Search topics
- Search users
- Search packages
- Searching wikis
- Searching Github Marketplace
3.0 Review Backlog: Other API collections to examine:
- Wikipedia
- YouTube
- Box
- DropBox
- Yelp
- Indeed
- Fadcebook
- Twilio
- Etsy
- PayPal
- Ebay
- Concur
- Uber
- SoundCloud
- Rotten Tomatoes
- Thomson Reuters
- Basecamp
- Kiva
- Fitbit
- Vimeo
- Stripe
- Salesforce
- Coupa.com
- SAP
- AWS
- Azure
4.0 Additional Suggested Reading
- https://apievangelist.com/
- http://apistylebook.com/
- http://apistylebook.com/design/topics/collection-filtering
- http://apistylebook.com/design/topics/resource-retrieve-partial
- https://www.moesif.com/blog/technical/api-design/REST-API-Design-Filtering-Sorting-and-Pagination/
- https://www.progress.com/blogs/rest-api-industry-debate-odata-vs-graphql-vs-ords
5.0 Suggested Books
- The Design of Web APIs, 1st Edition, by Arnaud Lauret
- https://www.manning.com/books/the-design-of-web-apis
- In particular, see sections 4.3, 4.4,
- And section 10.3
No comments:
Post a Comment