API BaaS supports a powerful, SQL-like query language that allows you to apply retrieve, update and delete operations to a narrowed set of entities in your data store.
Queries are sent to the Apigee API as part of the request URL, and are made up of two parts:
- The path to the collection you want to query
- The query language statement containing your query
These two statements are separated by
?ql= to indicate where the query language statement starts.
For example, a
GET request to the following URL would return all the entities in the
users that contain the property
The Apigee API supports a SQL-like query syntax that will be familiar to most users that have experience working with relational databases, including operators such as
not. As with SQL queries, these operators can be used to form complex queries that return a more refined result set.
For example, the following would query the Apigee API for the first 5
user entities that contain the properties
age less than 40, in ascending order by their
ql=status='active' and age lt 40 order by name asc
As a best practice, you should include no more than 3 parameters in your queries. The API will not prevent you from submitting a query with more than 3 parameters; however, due to the nature of NoSQL, queries with many parameters can quickly become very inefficient.
On the backend API BaaS stores your data in a NoSQL (Cassandra) database. This makes your data store extremely flexible, but also requires a different approach to storing and retrieving data than users of a traditional RDBMS, such as MySQL, will be accustomed to.
For more detail about support for queries, see the following topics:
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Send Docs Feedback
(Incorrect? Unclear? Broken link? Typo?)