{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onyphe/json-schema/onyphe-pivot-query-request-schema.json",
  "title": "PivotQueryRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onyphe-openapi.yml#/components/schemas/PivotQueryRequest",
  "type": "object",
  "required": [
    "query",
    "field"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "OQL query to execute."
    },
    "field": {
      "type": "string",
      "description": "Field to pivot on, in the data model of the queried category."
    },
    "aslines": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ],
      "default": "false",
      "description": "\"true\" returns one JSON object per line (NDJSON); \"false\" returns the JSON envelope. Must be a string: a JSON boolean is ignored."
    },
    "astask": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ],
      "default": "false",
      "description": "\"true\" creates a background task for later processing."
    },
    "includep": {
      "description": "One or more case-insensitive, unanchored regular expressions (`^`/`$` anchor explicitly); only values matching one are kept. A string or an array.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "excludep": {
      "description": "One or more case-insensitive, unanchored regular expressions; values matching one are removed. A string or an array.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    }
  }
}