Version 4.0.26.18

> [!NOTE]
> **Note:** These docs are for an older version of the API. The API reference is also available for [the latest version, 4.0.26.22](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest).

Execute a SQL Runner query in a given result_format.

## Request

POST /sql_queries/{slug}/run/{result_format} Datatype Description Request HTTP Request path HTTP Path Expand HTTP Path definition... slug string slug of query result_format string Format of result, options are: \["inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "odc", "json_label"\] query HTTP Query Expand HTTP Query definition... download string Defaults to false. If set to true, the HTTP response will have content-disposition and other headers set to make the HTTP response behave as a downloadable attachment instead of as inline content.

## Response

### 200: SQL Runner Query

Datatype Description (string) string

### 400: Bad Request

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link

### 404: Not Found

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link

### 422: Validation Error

Datatype Description (object) [ValidationError](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/ValidationError) message string Error details errors [ValidationErrorDetail](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/ValidationErrorDetail)\[\] Expand ValidationErrorDetail definition... field string Field with error code string Error code message string Error info message documentation_url string Documentation link documentation_url string Documentation link

### 429: Too Many Requests

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link