About the SQL API endpoints

The SQL API is available at https://account_identifier.snowflakecomputing.com/api, where account_identifier is your account identifier.

Using the SQL API over private connectivity

You can call the SQL API over AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect instead of the public internet. To do so, substitute your account’s private connectivity URL for the standard account URL in all SQL API requests, including the base URL and the statementHandle URLs.

To determine the private connectivity URL for your account, run SYSTEM$GET_PRIVATELINK_CONFIG as the ACCOUNTADMIN role and use the returned privatelink-account-url value.

Before you can use private connectivity, you must configure it for your account. For instructions, see:

Beginning with Snowflake version 6.3, the API consists of the /api/v2/statements/ resource and provides the following endpoints:

EndpointDescription
/api/v2/statements/Use this endpoint to submit SQL statements for execution.
/api/v2/statements/statementHandleUse this endpoint to check the status of the execution of a statement. (statementHandle is a unique identifier for the statement submitted for execution.)
/api/v2/statements/statementHandle/cancelUse this endpoint to cancel the execution of a statement.

These endpoints include the new method of retrieving results, which was introduced in Snowflake version 5.40. However, when sending a request to these new endpoints, you do not need to set the format field to jsonv2 in the resultSetMetaData field. If the format field is set in the request, the SQL API ignores the field.

The new version of the SQL API also removes concurrency limits, enabling you to retrieve query results from multiple threads.

You can use development tools and libraries for REST APIs (e.g. Postman) to send requests and handle responses.