openapi: 3.0.0 servers: - description: Snowflake REST Server url: https://org-account.snowflakecomputing.com info: version: 0.0.1 title: Snowflake Procedure API description: The Snowflake Procedure API is a REST API that you can use to access, update, and perform certain actions on Procedure resource in a Snowflake database. contact: name: Snowflake, Inc. url: https://snowflake.com email: support@snowflake.com paths: /api/v2/databases/{database}/schemas/{schema}/procedures: get: summary: List Procedures tags: - procedure description: List procedures operationId: listProcedures parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/like 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/Procedure' examples: Listprocedures200Example: summary: Default listProcedures 200 response x-microcks-default: true value: - name: Example Title execute_as: CALLER is_secure: true arguments: - {} return_type: type: example_value language_config: language: example_value called_on_null_input: true comment: example_value body: example_value created_on: '2026-01-15T10:30:00Z' schema_name: example_value database_name: example_value min_num_arguments: 10 max_num_arguments: 10 owner: example_value owner_role_type: example_value is_builtin: true '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 Procedure tags: - procedure description: Create a procedure operationId: createProcedure 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 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 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Procedure' examples: CreateprocedureRequestExample: summary: Default createProcedure request x-microcks-default: true value: name: Example Title execute_as: CALLER is_secure: true arguments: - name: Example Title datatype: ARRAY default_value: example_value return_type: type: example_value language_config: language: example_value called_on_null_input: true comment: example_value body: example_value created_on: '2026-01-15T10:30:00Z' schema_name: example_value database_name: example_value min_num_arguments: 10 max_num_arguments: 10 owner: example_value owner_role_type: example_value is_builtin: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /api/v2/databases/{database}/schemas/{schema}/procedures/{nameWithArgs}: get: summary: Fetch a Procedure tags: - procedure description: Fetch a procedure operationId: fetchProcedure parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/nameWithArgs 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/Procedure' examples: Fetchprocedure200Example: summary: Default fetchProcedure 200 response x-microcks-default: true value: name: Example Title execute_as: CALLER is_secure: true arguments: - name: Example Title datatype: ARRAY default_value: example_value return_type: type: example_value language_config: language: example_value called_on_null_input: true comment: example_value body: example_value created_on: '2026-01-15T10:30:00Z' schema_name: example_value database_name: example_value min_num_arguments: 10 max_num_arguments: 10 owner: example_value owner_role_type: example_value is_builtin: true '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: summary: Delete a Procedure tags: - procedure description: Delete a procedure operationId: deleteProcedure parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/nameWithArgs - $ref: common.yaml#/components/parameters/ifExists 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}/procedures/{nameWithArgs}:call: post: summary: Call a Procedure tags: - procedure description: Call a procedure operationId: callProcedure parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/nameWithArgs 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: {} examples: Callprocedure200Example: summary: Default callProcedure 200 response x-microcks-default: true value: [] '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 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CallArgumentList' examples: CallprocedureRequestExample: summary: Default callProcedure request x-microcks-default: true value: call_arguments: - name: Example Title datatype: ARRAY value: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: Procedure: type: object description: A Snowflake procedure properties: name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ description: Name of the procedure example: Example Title execute_as: type: string enum: - CALLER - OWNER description: What permissions should the procedure execution be called with example: CALLER is_secure: type: boolean description: Specifies whether the function/procedure is secure or not example: true arguments: type: array items: $ref: '#/components/schemas/Argument' description: List of arguments for the function/procedure example: [] return_type: $ref: '#/components/schemas/ReturnType' description: Return type of the function/procedure. Should be a SQL data type or a table language_config: $ref: '#/components/schemas/FunctionLanguage' description: Language that the function/procedure is written in comment: type: string description: Specifies a comment for the function/procedure example: example_value body: type: string description: Function/procedure definition example: example_value created_on: type: string format: date-time readOnly: true description: The date and time when the function/procedure was created example: '2026-01-15T10:30:00Z' schema_name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ readOnly: true description: The name of the schema in which the function/procedure exists. example: example_value database_name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ readOnly: true description: The name of the database in which the function/procedure exists. example: example_value min_num_arguments: type: integer readOnly: true description: The minimum number of arguments example: 10 max_num_arguments: type: integer readOnly: true description: The maximum number of arguments example: 10 owner: type: string readOnly: true description: Role that owns the function/procedure example: example_value owner_role_type: type: string readOnly: true description: The type of role that owns the function/procedure example: example_value is_builtin: type: boolean readOnly: true description: If the function/procedure is built-in or not (user-defined) example: true required: - name - arguments - return_type - language_config - body Argument: type: object properties: name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ description: Argument name example: Example Title datatype: type: string enum: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR x-enum-varnames: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE_PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR description: Argument data type example: ARRAY default_value: type: string description: Default value of the argument example: example_value required: - name - datatype ReturnType: type: object properties: type: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ description: Type of the return, can be either DATATYPE or TABLE example: example_value required: - type discriminator: propertyName: type mapping: DATATYPE: ReturnDataType TABLE: ReturnTable ReturnDataType: allOf: - $ref: '#/components/schemas/ReturnType' properties: datatype: type: string enum: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR x-enum-varnames: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE_PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR description: Return data type example: ARRAY nullable: type: boolean description: Argument null return acceptance criteria example: true required: - datatype ReturnTable: allOf: - $ref: '#/components/schemas/ReturnType' properties: column_list: type: array items: $ref: '#/components/schemas/ColumnType' description: List of table columns to return example: [] ColumnType: type: object properties: name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ description: Argument name example: Example Title datatype: type: string enum: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR x-enum-varnames: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE_PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR description: Argument data type example: ARRAY required: - name - datatype FunctionLanguage: type: object properties: language: type: string description: 'Language that the function/procedure is written in. Possible values include: JAVA, JAVASCRIPT, PYTHON, SCALA, SQL' example: example_value called_on_null_input: type: boolean description: Decide if the function/procedure can receive null input example: true required: - language discriminator: propertyName: language mapping: JAVA: JavaFunction PYTHON: PythonFunction SCALA: ScalaFunction JAVASCRIPT: JavaScriptFunction SQL: SQLFunction BaseLanguage: allOf: - $ref: '#/components/schemas/FunctionLanguage' properties: runtime_version: type: string description: Runtime version of the function's/procedure's specified language example: example_value packages: type: array items: type: string description: Packages to include with the function/procedure example: [] imports: type: array items: type: string description: List of imports example: [] handler: type: string description: Fully qualified method name including the package and the class example: example_value required: - runtime_version - packages - handler JavaFunction: allOf: - $ref: '#/components/schemas/BaseLanguage' properties: external_access_integrations: type: array items: type: string description: List of external access integrations attached to this function/procedure example: [] secrets: type: object additionalProperties: type: string description: Secrets to be used with this function/procedure for external access example: example_value target_path: type: string description: Specifies where Snowflake should write the compiled code for inline procedures example: example_value PythonFunction: allOf: - $ref: '#/components/schemas/BaseLanguage' properties: external_access_integrations: type: array items: type: string description: List of external access integrations attached to this function/procedure example: [] secrets: type: object additionalProperties: type: string description: Secrets to be used with this function/procedure for external access example: example_value ScalaFunction: allOf: - $ref: '#/components/schemas/BaseLanguage' properties: target_path: type: string description: Specifies where Snowflake should write the compiled code for inline function/procedures example: example_value JavaScriptFunction: allOf: - $ref: '#/components/schemas/FunctionLanguage' SQLFunction: allOf: - $ref: '#/components/schemas/FunctionLanguage' CallArgumentList: type: object properties: call_arguments: type: array items: $ref: '#/components/schemas/CallArgument' description: Call Argument list example: [] required: - call_arguments CallArgument: type: object properties: name: type: string pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ description: Name of the call argument example: Example Title datatype: type: string enum: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR x-enum-varnames: - ARRAY - BIGINT - BINARY - BOOLEAN - BYTEINT - CHAR - CHARACTER - DATE - DATETIME - DECIMAL - DOUBLE - DOUBLE_PRECISION - FLOAT - FLOAT4 - FLOAT8 - GEOGRAPHY - GEOMETRY - INT - INTEGER - NUMBER - NUMERIC - OBJECT - REAL - STRING - SMALLINT - TEXT - TIME - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - TINYINT - VARBINARY - VARCHAR - VARIANT - VECTOR description: Call argument data type example: ARRAY value: description: Value of the call argument example: example_value required: - name - datatype - value securitySchemes: KeyPair: $ref: common.yaml#/components/securitySchemes/KeyPair ExternalOAuth: $ref: common.yaml#/components/securitySchemes/ExternalOAuth SnowflakeOAuth: $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth security: - KeyPair: [] - ExternalOAuth: [] - SnowflakeOAuth: []