{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appbricx-com/json-schema/appbricx-com-post-api-dev-v1-projects-id-data-query-request-schema.json",
  "title": "PostApiDevV1ProjectsIdDataQueryRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/appbricx-com-openapi-generated.yml#/components/schemas/PostApiDevV1ProjectsIdDataQueryRequest",
  "type": "object",
  "properties": {
    "project_id": {
      "type": "string",
      "description": "Project id."
    },
    "entity": {
      "type": "string",
      "description": "Entity (table) name."
    },
    "where": {
      "type": "object",
      "description": "Column → value equality filters."
    },
    "filter": {
      "type": "array",
      "description": "Advanced filters."
    },
    "search": {
      "type": "object",
      "description": "Case‑insensitive substring search."
    },
    "fields": {
      "type": "array",
      "description": "Columns to answer."
    },
    "order_by": {
      "type": "string",
      "description": "Column to order by."
    },
    "desc": {
      "type": "boolean",
      "description": "Descending order (default true)."
    },
    "limit": {
      "type": "integer",
      "description": "Page size (1‑200)."
    },
    "as": {
      "type": "object",
      "description": "Run as admin or as a role."
    },
    "env": {
      "type": "string",
      "description": "\"dev\" or \"prod\"."
    },
    "count": {
      "type": "boolean",
      "description": "Include total count."
    },
    "aggregate": {
      "type": "object",
      "description": "Aggregate definition."
    }
  },
  "required": [
    "project_id",
    "entity"
  ]
}