Snowflake REST APIs

554 Views Asked by At

The python native connector for snowflake uses REST Apis as per PEP249. Looking into the code of this connector, it seems to use REST APIs like

/queries/v1/query-request

ret = self.rest.request(
        "/queries/v1/query-request?" + urlencode(url_parameters),
        data,
        client=client,
        _no_results=_no_results,
        _include_retry_params=True,
        _no_retry=_no_retry,
    )

A good description is here: https://amacal.medium.com/snowflake-and-rest-api-bf7bc2295700

Question is - where are these APIs and their endpoints defined in snowflake documentation? Or are these the same as the Snowflake SQL APIs defined here, which clearly don't have any mention of the above endpoint: https://docs.snowflake.com/en/developer-guide/sql-api/reference.html

1

There are 1 best solutions below

0
Sergiu On BEST ANSWER

The REST API endpoints are not documented as you are supposed to use the Python connector API, not the REST API.

If you want to use a REST API then indeed use the SQL API.