Version 4.0.26.22 (latest)

### Connection cost estimating

Assign a `sql` statement to the body of the request. e.g., for Ruby, `{sql: 'select * from users'}`

**Note**: If the connection's dialect has no support for cost estimates, an error will be returned

## Request

POST /connections/{connection_name}/cost_estimate Datatype Description Request HTTP Request path HTTP Path Expand HTTP Path definition... connection_name string Name of connection body HTTP Body Expand HTTP Body definition... body [CreateCostEstimate](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/types/CreateCostEstimate) SQL statement to estimate Expand CreateCostEstimate definition... sql string SQL statement to estimate query HTTP Query Expand HTTP Query definition... fields string Requested fields.

## Response

### 200: Connection cost estimates

Datatype Description (object) [CostEstimate](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/types/CostEstimate) cost integer Cost of SQL statement cache_hit boolean Does the result come from the cache? cost_unit string Cost measurement size message string Human-friendly message

### 400: Bad Request

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/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/latest/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/latest/types/ValidationError) message string Error details errors [ValidationErrorDetail](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/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/latest/types/Error) message string Error details documentation_url string Documentation link