API template library

Simulate the Snowflake SQL REST API

A WireMock simulation of Snowflake's REST API — covering SQL statement submission, status polling, partitioned result sets, cancellation, and requestId retries.

Vendor
Snowflake
Functionality
Statements, result partitions, cancellation
Spec version
2.0.0
Endpoints
3
Stubs
20
Protocol
REST
Validation
AI-validated Before publication, an AI agent exercised these endpoints against the real Snowflake API through WireMock's recording proxy, and the recorded traffic was used to verify each stub's request and response shapes.

Live sandbox · no signup, no API key

Snowflake SQL API

A running WireMock Cloud instance of this template, callable right now from a terminal, a script, or an AI agent.

Base URL
https://9emvdl.wiremockapi.cloud

POST Submit a SQL statement and get the result set

curl -s -X POST 'https://9emvdl.wiremockapi.cloud/api/v2/statements' \
  -H 'Content-Type: application/json' \
  -d '{"statement":"SELECT * FROM CUSTOMERS ORDER BY ROWNUM","database":"TESTDB","schema":"PUBLIC","warehouse":"COMPUTE_WH","role":"ANALYST","timeout":60}'
Method Path Summary
POST /api/v2/statements Submits a SQL statement for execution.
GET /api/v2/statements/{statementHandle} Checks the status of the execution of a statement
POST /api/v2/statements/{statementHandle}/cancel Cancels the execution of a statement.

Unauthenticated WireMock Cloud demo sandbox for Snowflake — not an official Snowflake sandbox, and it returns simulated example data only.

What's inside the SQL API template

The template implements the three routes of Snowflake's SQL API v2. A submitted SELECT answers like a finished query: a statementHandle, Snowflake's 090001 success code, and a jsonv2 result set whose resultSetMetaData carries column types in rowType and row counts in partitionInfo, with the data as arrays of strings. The handle is stored, so the status route returns the same result later. Connectors and hand-rolled clients that page through partitions run their real parsing code.

  • Statement submission — synchronous and asynchronous execution, multi-statement counts, timeouts and the statement's canned result
  • Status and partitions — 1,000-row partitions fetched by number, with first, prev, next and last links in the Link header
  • Cancellation — cancel a running statement, and the documented refusal for one that has already finished
  • Retries — requestId with retry=true returns the earlier result or status instead of running the statement again

Snowflake SQL REST mock API FAQ

No. Each statement is classified (query, DML, DDL and so on) and answered with a canned result of the right shape. There are no tables behind it, so a SELECT doesn't reflect an earlier INSERT; test that kind of round trip against a real warehouse.

With 422 and code 000709, "Statement ... not found", as Snowflake does. Canceled, failed and timed-out statements also answer 422 with their own codes, while a statement still running answers 202 with 333334.

None is checked; send any Authorization header or none. The spec does require a User-Agent header, which most HTTP clients send anyway. Don't put a real key-pair JWT or OAuth token into the shared sandbox.

Yes. A statement that would exceed 45 seconds answers 202 at once and reports running until its simulated duration passes, so polling code is exercised in seconds rather than minutes.

Vendor names identify APIs represented by WireMock template sources. This page does not imply vendor endorsement, certification, partnership, or official integration status.