---
title: "Use SQL in a RESTful way"
method: GET
path: "/sql"
tags: ["query"]
---

# Use SQL in a RESTful way

`GET /sql`

API exposed for sending SQL queries directly against the chainquery database. Since this is an exposed API there are limits to its use. These limits include queries per hour, read-only, limited to 60 second timeout.

## Path parameters

- `query` string, required
- `values` string[], required

## Response `200`

It will return the rows as a json array.

- object[]

## Other responses

- `400` — This is returned when the sql query has failed, either due to syntax issues with the query, nameing, priviledges etc. An error is provided with the response.

## Changes

> 7 revisions in range; 1 not diffed.

- **2018-05-10** `e7aa025e3f10` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/odyseeteam/apis/chain-query/changes/sql/get.md)

---

[API](https://skmtc.dev/odyseeteam/apis/chain-query.md) · [All operations](https://skmtc.dev/odyseeteam/apis/chain-query/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/odyseeteam/chain-query/revisions/b0b6c32cdcf5/schema)
