Use this guide to update integrations built on Query API V1 or V2 to the Data 360 Query API V3. Query API V3 introduces asynchronous and adaptive execution modes and standardizes error reporting. Review the considerations and SQL function mapping tables before migrating.
Endpoint Mapping
V1 / V2 Endpoint
V3 Endpoint
Notes
POST /api/v1/query
POST /api/v3/query
V1 was synchronous only; V3 supports ASYNC and ADAPTIVE modes.
POST /api/v2/query
POST /api/v3/query
Request body field name is sql in both versions.
GET /api/v2/query/{nextBatchId}
GET /api/v3/query/{queryId}/chunks/{chunkId} (preferred) or GET /api/v3/query/{queryId}/rows
Replace nextBatchId with queryId. For chunks, use chunkId from chunkCount. For rows, add ?offset=0.
—
GET /api/v3/query/{queryId}
New in V3: poll for query completion status.
—
GET /api/v3/query/{queryId}/metadata
New in V3: retrieve output schema without fetching data rows.
—
DELETE /api/v3/query/{queryId}
New in V3: cancel a running query and free resources.
-
GET /api/v3/query/{queryId}/chunks/{chunkId}
New in V3: retrieve a chunk of query data.
Considerations
Review the following behavioral changes before migrating.
No Synchronous Mode
Query API V1 returned results inline in the POST response. Query API V3 doesn’t support synchronous execution. Use ADAPTIVE mode to receive results immediately for fast queries, or ASYNC mode for long-running queries. In both modes, retrieve the queryId from the x-hyperdb-status response header to poll for status or fetch results.
Error Response Format
Query API V3 standardizes error responses using SQLSTATE codes and a rich error model. Update any code that parsed error strings. See Query API V3 Error Handling for the error format.
Field Naming
The Query API V3 HTTP endpoint uses sql for the query field. Confirm whether any Query API V1 integrations used a different field name.
Column Name Casing
Query API V3 changes how output column names are cased.
Query API V1 and V2: Output column name casing matches exactly what was written in the SELECT clause.
V3 with alias: Output column name uses the exact casing of the alias. Use quoted aliases to guarantee specific casing.
V3 without alias: Output column name reverts to the casing defined in the underlying table schema, regardless of how the column was written in the SELECT clause.
This is a breaking change for downstream code that relies on exact column name matching for non-aliased columns. To guarantee output casing, use explicit quoted aliases.
Auto-Generated Column Names
In Query API V1 and V2, expressions without aliases (for example, SELECT count(*), sum(x) FROM ...) produced output column names _col0, _col1. In Query API V3, the same expressions produce 1, 2.
SQL Function Changes
The following functions are renamed, replaced, or removed.