---
title: "Query"
description: "A Trails Query."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Trails API

A Trails Query.

## Fields

- `Query.cancelRequested` (boolean, required)
- `Query.createdAt` (string, required)
  - format `date-time`
- `Query.createdBy` (string, required) — The principal who started it.
- `Query.from` (string, required)
  - format `date-time`
- `Query.id` (string, required)
  - format `uuid`
- `Query.queuePosition` (integer | null, required) — Its place in the organization's line while it's queued (1 is next), in GetQuery's answer; null otherwise, and in lists.
  - format `int64`
- `Query.sql` (string, required)
- `Query.status` (string, required) — queued, running, succeeded, failed or cancelled.
- `Query.to` (string, required)
  - format `date-time`
- `Query.truncated` (boolean, required)
- `Query.createdByIdentity` (object | null, optional)
- `Query.error` (one of, optional)
  - one of: [QueryError](/trails-api/schemas/QueryError/), `null`
- `Query.finishedAt` (string | null, optional)
- `Query.resultRows` (integer | null, optional)
  - format `int64`
- `Query.startedAt` (string | null, optional)
- `Query.stats` (one of, optional)
  - one of: [QueryStats](/trails-api/schemas/QueryStats/), `null`


Source: https://docs.ezghcloud.com/trails-api/schemas/Query/index.md
