---
search:
  tags:
    - V1
    - POST
seo:
  description: >-
    Runs one read-only SELECT against the virtual catalog for the authenticated…
    Reference for the POST /v1/projects/{projectId}/sql endpoint in the Judgeval
    API.
sidebar:
  label: Run a tenant-scoped virtual SQL query
  badge: POST
title: Run a tenant-scoped virtual SQL query
type: openapi-operation
---
Runs one read-only SELECT against the virtual catalog for the authenticated organization and project. DAL catalog restrictions and limits of 1,000 rows and 5 MiB apply.

`POST /v1/projects/{projectId}/sql`

**Request body** (`application/json`, required)

- `sql` (string, required)

Request body example:

```json
{
  "sql": "string"
}
```

**Responses**

- `200` — Response for status 200
- `400` — Response for status 400
- `401` — Response for status 401
- `403` — Response for status 403
- `404` — Response for status 404
- `422` — Response for status 422
- `429` — Response for status 429
- `502` — Response for status 502
- `503` — Response for status 503

Response example, 200:

```json
{
  "catalog_version": "string",
  "columns": [
    {
      "name": "string",
      "type": "string",
      "nullable": true
    }
  ],
  "rows": [
    {}
  ],
  "row_count": 0,
  "elapsed_ms": 0
}
```
