Voedger Internals
  • Introduction
  • 💡Concepts
    • Event Sourcing & CQRS
    • Editions (deprecated)
      • Community Edition
      • Standart Edition
      • Standart Edition (v1)
  • 🚀Server
    • Overview (Server)
    • Design
      • Query Processor
      • API Gateway implementation
      • N1 Cluster
      • N3 Cluster
      • N5 Cluster
      • Orchestration
      • Sequences
      • Packages overview
        • sys
        • registry
    • Features
      • API Gateway
        • API v2
          • Conventions
            • API URL
            • HTTP methods and processors
            • Naming conventions
            • Query constraints
            • Error handling
          • Documents and records
            • Create document or record
            • Update document or record
            • Deactivate document or record
            • Read document or record
            • Read from CDoc collection
          • Queries
            • Read from query
          • Views
            • Read from view
          • Commands
            • Execute command
          • BLOBs
            • Create BLOB
            • Read BLOB
          • Temporary BLOBs
            • Create temporary BLOB
            • Read temporary BLOB
          • Schemas
            • List app workspaces
            • List workspace roles
            • Read workspace role schema
        • API v1
          • API Conventions
          • BLOBs
      • Admin Endpoint
      • Clusters
        • Bootstrap
        • Monitoring
        • Secure prometheus and grafana
        • Alerting
        • Maintenance
          • SELECT, UPDATE
      • VVMs
      • Applications
        • Deploy Application
        • Sidecar Applications
      • AuthNZ
        • Issue Principal Token
        • Refresh Principal Token
        • Enrich Principal Token
        • ACL Rules
        • Global Roles
      • Data types
        • Core types
        • Small integers
        • Uniques With Multiple Fields
        • Verifiable Fields
      • Workspaces
        • Create Workspace
        • Deactivate Workspace
        • See also (Workspaces)
      • Invites
        • Invite to Workspace
        • Join Workspace
        • Leave Workspace
        • Cancel sent Invite
        • Cancel accepted Invite
        • Update Invite roles
      • Users
        • Create a new user
        • Change user password
        • Send Email
        • Reset password
        • Change Email
      • Notifications
        • Heartbeats
      • Devices
        • Create a new device
        • Join device to workspace
      • Jobs
      • DMBS Drivers
        • AmazonDB Driver
      • Frozen
        • Ephemeral Storage
        • Storage Extensions
  • 🛠️Framework
    • Overview (Framework)
    • Features
      • vpm
      • vpm init
      • vpm tidy
      • vpm baseline
      • vpm orm
      • vpm build
      • API for testing
  • Development
    • Requirements Management
    • Requirements Management (Overview)
Powered by GitBook
On this page
  • Motivation
  • Functional Design
  • Example
  • Request
  • Response
  • Include
  • Technical Design
  • Misc
  • See Also

Was this helpful?

Edit on GitHub
  1. 🚀Server
  2. Features
  3. API Gateway
  4. API v2
  5. Conventions

Query constraints

PreviousNaming conventionsNextError handling

Last updated 1 month ago

Was this helpful?

Motivation

In API operations which return the list of objects, the API must provide a way to apply constraints: filter, order, etc.

Functional Design

Support basic request syntax in the API.

Supported constraints:

  • order (string) - order by field

  • limit (int) - limit number of records

  • skip (int) skip number of records

  • include (string) - include referenced objects and/or containers

  • keys (string) - select only some field(s)

  • where (object) - filter records

Example

Request

curl -X GET \
-H "AccessToken: ${ACCESS_TOKEN}"
--data-urlencode 'order=name'
--data-urlencode 'limit=10'
--data-urlencode 'skip=30'
--data-urlencode 'include=department.group,article_prices'  #include both department and group; include article_prices container
--data-urlencode 'keys=id,name,department.name,department.group.name' #select only some fields
--data-urlencode 'where={"id_department":123456,"number":{"$gte": 100, "$lte": 200}}'

  https://air.untill.com/api/v2/apps/untill/airs-bp/workspaces/140737488486431/cdocs/untill.articles

Response

{
    "results": [
        {
            "id": 123,
            "name": "Coca-Cola 0.5l",
            "department": {
                "name": "Fresh Drinks",
                "group": {
                    "name": "Drinks"
                }
            },
            "article_prices": [
                {
                    "id": 125,
                    "price": 1.5,
                    "currency": "EUR"
                }
            ]
        },
        {
            "id": 124,
            "name": "Fanta 0.5l",
            "department": {
                "name": "Fresh Drinks",
                "group": {
                    "name": "Drinks"
                }
            },
            "article_prices": [
                {
                    "id": 126,
                    "price": 1.4,
                    "currency": "EUR"
                }
            ]
        }
    ]

}

Include

  • the include parameter expects comma-separated list, where each entry is either:

    • the name of the pointer field

    • the name of the cotainer

  • the names can be nested, e.g. include=department.group,article_prices

Technical Design

Misc

curl -X GET \
  -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
  -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
  -G \
  --data-urlencode 'order=-createdAt' \
  --data-urlencode 'limit=10' \
  --data-urlencode 'include=post.author' \
  https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment

See Also

Rows are filtered by component of the Query Processor.

Parse API :

Parse API
multi-level inclding
Parse API: select only some fields
see also: Stack overflow
Launchpad: Schemas: Describe Heeus Functions with OpenAPI Standard
Launchpad: API v2
Rows Processor