Snowflake Table API
The Snowflake Table API is a REST API that you can use to access, update, and perform certain actions on Tables resource in a Snowflake database.
The Snowflake Table API is a REST API that you can use to access, update, and perform certain actions on Tables resource in a Snowflake database.
openapi: 3.0.0
servers:
- description: Snowflake REST Server
url: https://org-account.snowflakecomputing.com
info:
version: 0.0.1
title: Snowflake Table API
description: The Snowflake Table API is a REST API that you can use to access, update, and perform certain actions on Tables resource in a Snowflake database.
contact:
name: Snowflake, Inc.
url: https://snowflake.com
email: support@snowflake.com
paths:
/api/v2/databases/{database}/schemas/{schema}/tables:
get:
summary: List Tables
tags:
- table
description: Lists the tables under the database and schema.
operationId: listTables
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/like
- $ref: common.yaml#/components/parameters/startsWith
- $ref: common.yaml#/components/parameters/showLimit
- $ref: common.yaml#/components/parameters/fromName
- name: history
description: Optionally includes dropped tables that have not yet been purged.
in: query
required: false
schema:
type: boolean
example: true
- name: deep
description: Optionally includes dependency information of the table.
in: query
required: false
schema:
type: boolean
example: true
responses:
'200':
description: successful
headers:
X-Snowflake-Request-ID:
$ref: common.yaml#/components/headers/X-Snowflake-Request-ID
Link:
$ref: common.yaml#/components/headers/Link
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Table'
examples:
Listtables200Example:
summary: Default listTables 200 response
x-microcks-default: true
value:
- name: Example Title
kind: PERMANENT
cluster_by:
- example_value
enable_schema_evolution: true
change_tracking: true
data_retention_time_in_days: 10
max_data_extension_time_in_days: 10
default_ddl_collation: example_value
columns:
- {}
constraints:
- {}
comment: example_value
created_on: '2026-01-15T10:30:00Z'
database_name: example_value
schema_name: example_value
rows: 10
bytes: 10
owner: example_value
dropped_on: '2026-01-15T10:30:00Z'
automatic_clustering: true
search_optimization: true
search_optimization_progress: 10
search_optimization_bytes: 10
owner_role_type: example_value
budget: example_value
table_type: NORMAL
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
summary: Create a Table (clone and Undrop Are Separate Subresources)
tags:
- table
description: Create a table.
operationId: createTable
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
examples:
CreatetableRequestExample:
summary: Default createTable request
x-microcks-default: true
value:
name: Example Title
kind: PERMANENT
cluster_by:
- example_value
enable_schema_evolution: true
change_tracking: true
data_retention_time_in_days: 10
max_data_extension_time_in_days: 10
default_ddl_collation: example_value
columns:
- name: Example Title
datatype: example_value
nullable: true
collate: example_value
default: example_value
autoincrement: true
autoincrement_start: 10
autoincrement_increment: 10
constraints: {}
comment: example_value
constraints:
- name: Example Title
column_names: {}
constraint_type: example_value
comment: example_value
created_on: '2026-01-15T10:30:00Z'
database_name: example_value
schema_name: example_value
rows: 10
bytes: 10
owner: example_value
dropped_on: '2026-01-15T10:30:00Z'
automatic_clustering: true
search_optimization: true
search_optimization_progress: 10
search_optimization_bytes: 10
owner_role_type: example_value
budget: example_value
table_type: NORMAL
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables/{name}:as_select:
post:
deprecated: true
summary: Create a Table Using the Result of the Specified Select Query
tags:
- table
description: Create a table as select.
operationId: createTableAsSelectDeprecated
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: query
in: query
required: true
description: The SQL select query to run to set up the table values (and possibly columns).
schema:
type: string
example: example_value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
examples:
CreatetableasselectdeprecatedRequestExample:
summary: Default createTableAsSelectDeprecated request
x-microcks-default: true
value:
name: Example Title
kind: PERMANENT
cluster_by:
- example_value
enable_schema_evolution: true
change_tracking: true
data_retention_time_in_days: 10
max_data_extension_time_in_days: 10
default_ddl_collation: example_value
columns:
- name: Example Title
datatype: example_value
nullable: true
collate: example_value
default: example_value
autoincrement: true
autoincrement_start: 10
autoincrement_increment: 10
constraints: {}
comment: example_value
constraints:
- name: Example Title
column_names: {}
constraint_type: example_value
comment: example_value
created_on: '2026-01-15T10:30:00Z'
database_name: example_value
schema_name: example_value
rows: 10
bytes: 10
owner: example_value
dropped_on: '2026-01-15T10:30:00Z'
automatic_clustering: true
search_optimization: true
search_optimization_progress: 10
search_optimization_bytes: 10
owner_role_type: example_value
budget: example_value
table_type: NORMAL
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables:as-select:
post:
summary: Create a Table Using the Result of the Specified Select Query
tags:
- table
description: Create a table as select.
operationId: createTableAsSelect
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: query
in: query
required: true
description: The SQL select query to run to set up the table values (and possibly columns).
schema:
type: string
example: example_value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TableAsSelect'
examples:
CreatetableasselectRequestExample:
summary: Default createTableAsSelect request
x-microcks-default: true
value:
name: Example Title
columns:
- name: Example Title
datatype: example_value
nullable: true
collate: example_value
default: example_value
autoincrement: true
autoincrement_start: 10
autoincrement_increment: 10
constraints: {}
comment: example_value
cluster_by:
- example_value
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables/{name}:using_template:
post:
deprecated: true
summary: Create a Table Using the Templates Specified in Staged Files
tags:
- table
description: Create a table using template.
operationId: createTableUsingTemplateDeprecated
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: query
description: The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table.
in: query
required: true
schema:
type: string
example: example_value
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables:using-template:
post:
summary: Create a Table Using the Templates Specified in Staged Files
tags:
- table
description: Create a table using template.
operationId: createTableUsingTemplate
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: query
description: The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table.
in: query
required: true
schema:
type: string
example: example_value
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/TableUsingTemplate'
examples:
CreatetableusingtemplateRequestExample:
summary: Default createTableUsingTemplate request
x-microcks-default: true
value:
name: Example Title
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables/{name}:
get:
summary: Fetch a Table.
tags:
- table
description: Fetch a Table using the describe command output.
operationId: fetchTable
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
responses:
'200':
description: successful
headers:
X-Snowflake-Request-ID:
$ref: common.yaml#/components/headers/X-Snowflake-Request-ID
Link:
$ref: common.yaml#/components/headers/Link
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
examples:
Fetchtable200Example:
summary: Default fetchTable 200 response
x-microcks-default: true
value:
name: Example Title
kind: PERMANENT
cluster_by:
- example_value
enable_schema_evolution: true
change_tracking: true
data_retention_time_in_days: 10
max_data_extension_time_in_days: 10
default_ddl_collation: example_value
columns:
- name: Example Title
datatype: example_value
nullable: true
collate: example_value
default: example_value
autoincrement: true
autoincrement_start: 10
autoincrement_increment: 10
constraints: {}
comment: example_value
constraints:
- name: Example Title
column_names: {}
constraint_type: example_value
comment: example_value
created_on: '2026-01-15T10:30:00Z'
database_name: example_value
schema_name: example_value
rows: 10
bytes: 10
owner: example_value
dropped_on: '2026-01-15T10:30:00Z'
automatic_clustering: true
search_optimization: true
search_optimization_progress: 10
search_optimization_bytes: 10
owner_role_type: example_value
budget: example_value
table_type: NORMAL
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
summary: Create a (or Alter an Existing) Table.
tags:
- table
description: Create a (or alter an existing) table. Even if the operation is just an alter, the full property set must be provided.
operationId: createOrAlterTable
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
examples:
CreateoraltertableRequestExample:
summary: Default createOrAlterTable request
x-microcks-default: true
value:
name: Example Title
kind: PERMANENT
cluster_by:
- example_value
enable_schema_evolution: true
change_tracking: true
data_retention_time_in_days: 10
max_data_extension_time_in_days: 10
default_ddl_collation: example_value
columns:
- name: Example Title
datatype: example_value
nullable: true
collate: example_value
default: example_value
autoincrement: true
autoincrement_start: 10
autoincrement_increment: 10
constraints: {}
comment: example_value
constraints:
- name: Example Title
column_names: {}
constraint_type: example_value
comment: example_value
created_on: '2026-01-15T10:30:00Z'
database_name: example_value
schema_name: example_value
rows: 10
bytes: 10
owner: example_value
dropped_on: '2026-01-15T10:30:00Z'
automatic_clustering: true
search_optimization: true
search_optimization_progress: 10
search_optimization_bytes: 10
owner_role_type: example_value
budget: example_value
table_type: NORMAL
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
- $ref: common.yaml#/components/parameters/ifExists
summary: Delete a Table
tags:
- table
description: Delete a table with the given name.
operationId: deleteTable
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables/{name}:clone:
post:
summary: Clone Table
tags:
- table
description: Create a new table by cloning from the specified resource
operationId: cloneTable
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: targetDatabase
in: query
description: Database of the newly created table. Defaults to the source table's database.
schema:
$ref: ./common.yaml#/components/schemas/Identifier
example: example_value
- name: targetSchema
in: query
description: Schema of the newly created table. Defaults to the source table's schema.
schema:
$ref: ./common.yaml#/components/schemas/Identifier
example: example_value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TableClone'
examples:
ClonetableRequestExample:
summary: Default cloneTable request
x-microcks-default: true
value:
point_of_time: {}
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAllowed
'408':
$ref: common.yaml#/components/responses/408RequestTimeout
'409':
$ref: common.yaml#/components/responses/409Conflict
'410':
$ref: common.yaml#/components/responses/410Gone
'429':
$ref: common.yaml#/components/responses/429LimitExceeded
'500':
$ref: common.yaml#/components/responses/500InternalServerError
'503':
$ref: common.yaml#/components/responses/503ServiceUnavailable
'504':
$ref: common.yaml#/components/responses/504GatewayTimeout
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/databases/{database}/schemas/{schema}/tables/{name}:create_like:
post:
deprecated: true
summary: Create a Table Like This Existing One
tags:
- table
description: Create a new table like the specified resource, but empty
operationId: createTableLikeDeprecated
parameters:
- $ref: common.yaml#/components/parameters/database
- $ref: common.yaml#/components/parameters/schema
- $ref: common.yaml#/components/parameters/name
- $ref: common.yaml#/components/parameters/createMode
- $ref: common.yaml#/components/parameters/copyGrants
- name: newTableName
description: The name of the table to be created.
in: query
required: true
schema:
type: string
example: example_value
responses:
'200':
$ref: common.yaml#/components/responses/200SuccessResponse
'202':
$ref: common.yaml#/components/responses/202SuccessAcceptedResponse
'400':
$ref: common.yaml#/components/responses/400BadRequest
'401':
$ref: common.yaml#/components/responses/401Unauthorized
'403':
$ref: common.yaml#/components/responses/403Forbidden
'404':
$ref: common.yaml#/components/responses/404NotFound
'405':
$ref: common.yaml#/components/responses/405MethodNotAl
# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/openapi/table.yaml