{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-query-details-schema.json",
  "title": "QueryDetails",
  "description": "The page with content.",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-folio-query-tool-metadata-querytool-openapi.yml#/components/schemas/QueryDetails",
  "type": "object",
  "properties": {
    "content": {
      "description": "The rows of the page.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResultsetContent"
      }
    },
    "totalRecords": {
      "description": "The total number of records in this resultset.",
      "type": "integer"
    },
    "queryId": {
      "description": "ID of the query",
      "type": "string",
      "format": "UUID"
    },
    "fqlQuery": {
      "description": "FQL query",
      "type": "string"
    },
    "entityTypeId": {
      "description": "ID of the entity type",
      "type": "string",
      "format": "UUID"
    },
    "fields": {
      "description": "Fields to be included in query results",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "description": "Status of the resultset",
      "type": "string",
      "enum": [
        "QUEUED",
        "IN_PROGRESS",
        "SUCCESS",
        "FAILED",
        "CANCELLED",
        "MAX_SIZE_EXCEEDED"
      ]
    },
    "failureReason": {
      "description": "Reason for query execution failure (if execution failed)",
      "type": "string"
    },
    "startDate": {
      "description": "Date and time when the query execution was started",
      "type": "string",
      "format": "date-time"
    },
    "endDate": {
      "description": "Date and time when the query execution was completed",
      "type": "string",
      "format": "date-time"
    },
    "crossTenant": {
      "description": "Indicates whether a query is cross-tenant",
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "entityTypeId",
    "status",
    "startDate",
    "queryId",
    "fqlQuery"
  ],
  "additionalProperties": false,
  "$defs": {
    "ResultsetContent": {
      "description": "The content row represented as a map.",
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    }
  }
}