{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-list-queries-response-schema.json",
  "title": "ListQueriesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-workspaces-api-openapi.yml#/components/schemas/ListQueriesResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "queries": {
          "type": "array",
          "description": "One row per executed query, newest first",
          "items": {
            "type": "object",
            "properties": {
              "queryId": {
                "type": "string",
                "format": "uuid"
              },
              "userId": {
                "type": "string",
                "format": "uuid",
                "description": "User who executed the query"
              },
              "userEmail": {
                "type": "string",
                "description": "Email of the executing user (falls back to userId if unresolved)"
              },
              "namespace": {
                "type": "string",
                "description": "Catalog namespace the query ran against"
              },
              "querySize": {
                "type": "string",
                "enum": [
                  "small",
                  "large"
                ],
                "description": "Compute size the query ran on"
              },
              "durationMs": {
                "type": "integer",
                "description": "Actual query execution time in milliseconds"
              },
              "creditsCharged": {
                "type": "number",
                "description": "Credits charged for the query"
              },
              "executedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the query was executed, ISO 8601"
              },
              "queryText": {
                "type": "string",
                "description": "The SQL text that was executed"
              }
            }
          }
        },
        "users": {
          "type": "array",
          "description": "The workspace's members, for populating a user filter",
          "items": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string"
              }
            }
          }
        },
        "pageSize": {
          "type": "integer"
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the next page; null when there are no more matching records"
        }
      }
    }
  }
}