canonical: https://jentic.com/apis/amazonaws.com/redshift-data

# AWS Redshift Data API Service

Jentic publishes the only available OpenAPI specification for the Amazon Redshift Data API, keeping it validated and agent-ready. The Redshift Data API runs asynchronous SQL against provisioned Redshift clusters and Redshift Serverless workgroups over HTTPS without persistent connections. Ten operations cover statement execution, batch execution, statement status and result fetch, table and schema discovery, and statement listing. It is the primary interface for analytical queries from Lambda, Step Functions, and AI agents that need ad-hoc access to a warehouse without ODBC or JDBC.

## For AI agents

Run asynchronous SQL queries on Amazon Redshift clusters and Serverless workgroups, fetch results, and inspect schemas through the Data API.

## Scope

Does not provision clusters, load data, or modify cluster settings - use for asynchronous SQL execution and catalog inspection on existing Redshift clusters and Serverless workgroups only.

## Capabilities

- Submit a single SQL statement with parameters via ExecuteStatement and receive a statement Id
- Run multiple statements in one call with BatchExecuteStatement and track them as a single batch
- Check execution status, query duration, and error messages with DescribeStatement
- Retrieve paged result rows with ColumnMetadata using GetStatementResult or GetStatementResultV2
- List databases, schemas, and tables visible to the connection via ListDatabases, ListSchemas, ListTables
- Cancel a running statement by Id with CancelStatement and inspect column-level details with DescribeTable

## Use cases

### Async Analytical Queries from Lambda

Submit a long-running SELECT to Redshift from a stateless service without holding a JDBC connection. ExecuteStatement returns a statement Id immediately; the caller polls DescribeStatement until Status is FINISHED, then pages results with GetStatementResult. Works against both provisioned ClusterIdentifier with a DbUser, and Redshift Serverless with a WorkgroupName plus Secrets Manager secretArn.

Example prompt: Call POST ExecuteStatement with WorkgroupName 'analytics', Database 'prod', and Sql 'SELECT count(*) FROM events WHERE created_at > current_date - 7'; capture Id and poll DescribeStatement until Status='FINISHED'

### Schema Discovery for Agents

Let an agent reason over a warehouse it has not seen before by listing schemas and tables on demand. ListDatabases, ListSchemas, and ListTables produce a navigable tree, and DescribeTable returns column names and types for a specific table. Pair with a query-generation step so the agent grounds SQL on real columns rather than guessing.

Example prompt: Call ListSchemas with WorkgroupName 'analytics' and Database 'prod', then DescribeTable for each candidate table to get its columns

### Multi-Statement Batches and Cancellation

Run a batch of related SQL statements (e.g., SET search_path; SELECT ...; SELECT ...) with BatchExecuteStatement so they execute on the same backend session. If a downstream tool times out, CancelStatement aborts the running query by Id, and DescribeStatement surfaces the final state. Useful for orchestrated reports from Step Functions or Airflow.

Example prompt: Call BatchExecuteStatement with Sqls ['SET search_path TO analytics', 'SELECT ...'] and the same WorkgroupName, then CancelStatement if the orchestrator times out

### AI Agent Warehouse Tool via Jentic

A data-analyst agent uses Jentic to discover the Redshift Data API, generate SQL grounded in the introspected schema, submit it, and stream the results back to the user. Jentic stores AWS credentials in its vault and signs each call with SigV4; database credentials remain in Secrets Manager (or temporary credentials via DbUser), so neither secret leaks to the agent context.

Example prompt: Use Jentic to search 'run sql on redshift', load ExecuteStatement, and execute it with WorkgroupName, Database, and a generated Sql string

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#X-Amz-Target=RedshiftData.ExecuteStatement | Submit a SQL statement and receive a statement Id |
| POST | /#X-Amz-Target=RedshiftData.BatchExecuteStatement | Run a batch of SQL statements as one request |
| POST | /#X-Amz-Target=RedshiftData.DescribeStatement | Get status, duration, and error info for a statement Id |
| POST | /#X-Amz-Target=RedshiftData.GetStatementResult | Page through result rows for a finished statement |
| POST | /#X-Amz-Target=RedshiftData.CancelStatement | Cancel a running statement by Id |
| POST | /#X-Amz-Target=RedshiftData.ListTables | List tables in a database and schema |
| POST | /#X-Amz-Target=RedshiftData.DescribeTable | Return column metadata for a specific table |

## Key resources

- **Statement** — Submit, describe, cancel, and fetch results of SQL statements
- **BatchStatement** — Execute several SQL statements as a single batch on one backend session
- **Database** — Catalog discovery for databases, schemas, and tables
- **Table** — Column-level metadata for a specific table

## Why Jentic

- **Setup:** Wiring the Redshift Data API by hand means computing SigV4 HMAC signatures, setting the X-Amz-Target header per action, routing to the regional redshift-data host, and polling for asynchronous statement results yourself. Through Jentic you install once, import Redshift Data API Service from the API Directory, store your AWS access keys once, and your agent calls it with signing and targeting handled per request.
- **Permission scoping:** The workgroup, cluster, database, and SQL travel in the request body rather than the URL path, so you limit the agent to the operations it needs, such as ExecuteStatement, DescribeStatement, and GetStatementResult for running and reading queries. Operations like CancelStatement are included only when you grant them.
- **Credential handling:** Your AWS access keys are stored once, encrypted, by your own Jentic One instance and used to produce a SigV4 signature per request, while Redshift credentials stay in Secrets Manager referenced by SecretArn. Neither secret enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run SQL on a Redshift cluster', and Jentic returns ExecuteStatement with its parameter schema for WorkgroupName, ClusterIdentifier, Database, Sql, and Parameters so the agent calls the right endpoint directly.

## Related APIs

- **AWS RDS Data API** — Same HTTPS-SQL pattern but targeted at Aurora Serverless rather than Redshift
- **Amazon Athena** — Athena queries S3 data directly without a warehouse; Redshift Data API queries the Redshift warehouse
- **Amazon CloudWatch** — Inspect Redshift cluster metrics emitted to CloudWatch alongside Data API statement timings

## FAQ

### Why is there no official OpenAPI spec for the Amazon Redshift Data API?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call the Amazon Redshift Data API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Redshift Data API use?

The API uses AWS SigV4 HMAC request signing. The caller authenticates to Redshift either via temporary credentials (DbUser plus IAM auth on the cluster) or via a Secrets Manager secretArn passed in the request. Through Jentic, AWS credentials live in the vault and SigV4 signatures are produced per call.

### Does this API support Redshift Serverless?

Yes. Pass WorkgroupName instead of ClusterIdentifier in ExecuteStatement and BatchExecuteStatement. Redshift Serverless requires SecretArn for authentication; it does not accept DbUser-based IAM auth.

### Are Data API queries synchronous?

No. ExecuteStatement and BatchExecuteStatement return a statement Id immediately and run asynchronously. Poll DescribeStatement until Status is FINISHED, then call GetStatementResult or GetStatementResultV2 to page through the rows.

### What are the limits on result size and statement duration?

Statement results have a 100 MB cap and a maximum row count limit; results are paginated via NextToken. Statements have a 24-hour maximum runtime, and around 500 active statements are allowed per cluster or workgroup. Throttled requests return ThrottlingException.

### How do I query Redshift through Jentic?

Search Jentic for 'run sql on redshift', load ExecuteStatement, and execute it with WorkgroupName (or ClusterIdentifier), Database, and Sql. Poll the returned Id with DescribeStatement, then GetStatementResult to fetch rows. Install with pip install jentic.

### Can I limit what my agent is allowed to do with the Redshift Data API?

Yes. Because you run Jentic One yourself, your own rules decide which Redshift Data API operations and credentials the agent may use. The workgroup, cluster, database, and SQL all travel in the request body, so you can grant the agent only read-and-run operations like ExecuteStatement, DescribeStatement, and GetStatementResult while withholding others. Operations such as CancelStatement or BatchExecuteStatement are available to the agent only when you explicitly grant them.
