---
title: "Run SQL query on the datasource"
method: POST
path: "/api/v1/run-sql"
---

# Run SQL query on the datasource

`POST /api/v1/run-sql`

## Headers

- `x-hasura-datasource-id` string, uuid, required
- `x-hasura-branch-id` string, uuid

## Request body

- RunSQLRequest
  - `query` string, required

## Response `200`

Successful operation

## Other responses

- `500` — Failed operation

---

[API](https://skmtc.net/synmetrix/apis/cube-api.md) · [All operations](https://skmtc.net/synmetrix/apis/cube-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/synmetrix/cube-api/revisions/2760f840d69f/schema)
