Search
Execute a CouchDB Mango _find query
Changed onExecutes a read-only Mango selector query against the database. This endpoint is a secure proxy that only allows _find queries and prevents any mutation operations. Queries are never persisted.
Security: Queries are validated to prevent mutations. The following are forbidden:
- Mutation operators ($set, $update, $unset, $inc, $push, $pull)
- Bulk operations (docs, bulk, new_edits)
- Index creation (index, ddoc, type)
- Map/reduce operations (map, reduce, views)
- Skip-based pagination (use bookmark instead)
Pagination: Use bookmark for pagination, not skip. Default limit is 25, maximum is 100. Limits exceeding 100 are clamped.
Empty selector: An empty selector object {} is allowed and matches all documents (subject to the limit).
Index refresh: This endpoint forces update: false in the CouchDB request to disable index refresh during query execution.
post/query
Request
- Base URL: https://sshf-api-330507742215.us-central1.run.app
- URL: https://sshf-api-330507742215.us-central1.run.app/query
- Auth: OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/v2/auth)
Request body
Example request
{
"selector": {
"type": "veteran",
"status": "Active"
},
"fields": [
"_id",
"name",
"status",
"phone"
],
"sort": [
{
"name": "asc"
}
],
"bookmark": "g1AAAAG3eJzLYWBg4M",
"use_index": "_design/my-index"
}Response
Query executed successfully
Changes
- info
endpoint added
- info