Skip to content
Developers
Get an API token

Novi UDM Data (v4) API

Get results

Check a query you ran and read its results.

Get results

GET/api/v2/statements/{statementHandle}

Check a query you ran and read its results. 200 means it finished and the body holds the partition you asked for. 202 means it is still running: ask again.

Send a Snowflake programmatic access token as a bearer token on every request. Authentication
Partitions

Partition 0 comes in the first answer that holds results, from Run a query or from this call. Ask for partition=1 up to the number of entries in partitionInfo minus one. These answers are gzip-compressed (Content-Encoding: gzip) and carry no metadata, so keep resultSetMetaData from the first answer.

Retries

While a query runs, Snowflake can also answer 429. Retry with backoff.

Parameters

Path parameters

  • statementHandlestringRequired

    Format uuid

    The statementHandle from Run a query.

Query parameters

  • partitionintegerOptional

    Format int64≥ 0

    The partition of results to return, from 0 to the number of partitions minus one.

Header parameters

  • User-AgentstringRequired

    Your application's name and version, for example myApplication/1.0. Snowflake requires a value that complies with RFC 7231.

Responses

The query finished. The body holds the requested partition of the results.

  • codestringOptional

    Snowflake status code. 090001 means the statement ran successfully.

  • sqlStatestringOptional

  • messagestringOptional

  • statementHandlestringOptional

    Format uuid

    The statement's ID. Use it with Get results and Cancel a query.

  • createdOnintegerOptional

    Format int64

    When the statement started, in milliseconds since the epoch.

  • statementStatusUrlstringOptional

    Format uri-reference

    Path to the statement's status and results.

  • resultSetMetaDataobjectOptional

    Columns, row count and partitions of the whole result. Sent with the first partition only.

    ShowHide 4 child fields
    • numRowsintegerOptional

      Format int64

      Total rows across all partitions.

    • formatstringOptional

      Format of data. Always jsonv2.

      "jsonv2"
    • rowTypearray of objectsOptional

      One entry per column, in column order.

      ShowHide 6 child fields in each item
      • namestringOptional

        Column name.

      • typestringOptional

        Snowflake data type of the column.

      • lengthinteger or nullOptional

        Format int64

        Length of the column.

      • precisioninteger or nullOptional

        Format int64

        Precision of the column.

      • scaleinteger or nullOptional

        Format int64

        Scale of the column.

      • nullablebooleanOptional

        Whether the column can hold NULL.

    • partitionInfoarray of objectsOptional

      One entry per partition. The first describes the rows in this response.

      ShowHide 3 child fields in each item
      • rowCountintegerOptional

        Format int64≥ 0

        Rows in the partition.

      • uncompressedSizeintegerOptional

        Format int64≥ 0

        Partition size in bytes, uncompressed.

      • compressedSizeintegerOptional

        Format int64≥ 0

        Partition size in bytes, compressed. Not always present.

  • dataarray of arraysOptional

    Rows of this partition. Each row is an array of column values in rowType order, each a JSON string or null.

Errors

StatusWhen
422

The statement failed. code and message say why.

429

Too many requests, or too many at once. Retry with exponential backoff and jitter.

Shared errors400401403404500503504What they mean