> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Get Query Status

GET https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/queries/{queryId}/status

Retrieves a query's status.

This method requires a query ID, which you can get only from the [Run Query](./run-query) response.

When a query is completed, you can retrieve the query results in one of these ways:

- Following the `outputLocation` URI in this method's response object.
  The URI points to where the results are stored as a CSV file.
- Calling [Get Query Result](./get-query-result).
  Get Query Result returns a paginated array of results as JSON for additional processing or handling.

If the query failed, see [Troubleshooting Queries] for possible errors and how to resolve them.

[Troubleshooting Queries]: /data-protection/backup-and-protection/exploring-and-querying/query/troubleshooting-queries


Reference: https://docs.eon.io/api/api-reference/query-databases/get-query-status

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project that contains the query status you want to retrieve. You can see your project ID in the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `queryId` (string, required) — Query ID returned by [Run Query](./run-query).

## Response

### 200

Query status retrieved.

- `status` (enum, required) — Query status. If completed, the query results can be retrieved. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `UNSPECIFIED`, `IN_PROGRESS`, `COMPLETED`, `CANCELED`, `FAILED`
- `runningTimeMs` (integer, optional) — Time the query took to run, in milliseconds.
- `errorMessage` (string, optional, nullable) — Error message. Present only if the status is `FAILED`.
- `outputLocations` (list of string, optional) — Locations where the query results are saved to. This is set by `destination` in the [Run Query](./run-query) request body.

## Errors

### 404 Not Found Error

Query wasn't found.

- `any`

## Examples

**Response**

```json
{
  "status": "IN_PROGRESS",
  "runningTimeMs": 5000,
  "errorMessage": "string",
  "outputLocations": [
    "s3://my-restore-bucket/restored_records/eon_queries/project=330e9...cf94/2025/01/23/22/resource=2c7b...73af/snapshot_time=2025-01-16T00:44:49Z/1c4cd...f666.csv"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/330e9e09-6cb8-52af-b532-a476f598cf94/queries/330e9e09-6cb8-52af-b532-a476f598cf94%3A3fdf3419-366b-5e58-847d-c4671f79ce8f/status"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/330e9e09-6cb8-52af-b532-a476f598cf94/queries/330e9e09-6cb8-52af-b532-a476f598cf94%3A3fdf3419-366b-5e58-847d-c4671f79ce8f/status';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{account-domain}.console.eon.io/api/v1/projects/330e9e09-6cb8-52af-b532-a476f598cf94/queries/330e9e09-6cb8-52af-b532-a476f598cf94%3A3fdf3419-366b-5e58-847d-c4671f79ce8f/status")
  .header("Authorization", "Bearer <token>")
  .asString();
```