Skip to content

Create Deployment

POST
/api/v1/deployments
curl --request POST \
--url https://example.com/api/v1/deployments \
--header 'Content-Type: application/json' \
--data '{ "git_repository": "example", "branch": "main", "environment_name": "default", "file_pattern": "example", "variables": { "additionalProperty": "example" }, "on_error": "break", "description": "example", "manifest": [ { "file": "example", "objects": [ { "name": "example", "type": "example" } ] } ] }'

Create a deployment record and initialize file details.

X-Environment-Id
Any of:
string
Media typeapplication/json
DeploymentCreateRequest

Request to create a new deployment.

object
git_repository
required
Git Repository

Git repository name in Snowflake

string
branch
Branch

Git branch to deploy

string
default: main
environment_name
Any of:
string
file_pattern
Any of:
string
variables
Any of:
object
key
additional properties
Any of:
string
on_error
On Error

Behavior on error: ‘break’ or ‘continue’

string
default: break
description
Any of:
string
manifest
Any of:
Array<object>
ManifestEntry

Manifest entry mapping file to objects.

object
file
required
File

Relative file path in repository

string
objects
Objects
Array<object>
ManifestObject

Object declared in deployment manifest.

object
name
required
Name

Fully qualified object name

string
type
required
Type

Object type (TABLE, VIEW, TASK, STREAM, etc.)

string

Successful Response

Media typeapplication/json
DeploymentStatusResponse

Complete deployment status with file details.

object
deployment
required
DeploymentResponse

Deployment information

object
id
required
Id

Deployment ID

string
git_repository
required
Git Repository

Git repository name

string
branch
required
Branch

Git branch

string
commit_sha
Any of:
string
status
required
DeploymentStatus

Deployment status

string
Allowed values: pending running success failed partial_success cancelled
file_pattern
Any of:
string
variables
Any of:
object
key
additional properties
Any of:
string
on_error
required
On Error

Error handling behavior

string
description
Any of:
string
created_at
required
Created At

Creation timestamp

string format: date-time
started_at
Any of:
string format: date-time
completed_at
Any of:
string format: date-time
created_by
Any of:
string
files
required
Files

File deployment details

Array<object>
DeploymentFileDetail

Individual file deployment detail.

object
id
required
Id

Detail record ID

string
file_path
required
File Path

Relative file path in repository

string
file_type
required
FileType

Type of file

string
Allowed values: sql_ddl sql_dml procedure function task stream dynamic_table snowpark other
git_status
required
GitStatus

Git change status

string
Allowed values: added modified removed renamed
deployment_status
required
FileStatus

Deployment status

string
Allowed values: pending in_progress success failed skipped
error_message
Any of:
string
execution_order
required
Execution Order

Order of execution

integer
deployed_at
Any of:
string format: date-time
stats
required
Stats

Deployment statistics

object
key
additional properties
integer
Example
{
"deployment": {
"status": "pending"
},
"files": [
{
"file_type": "sql_ddl",
"git_status": "added",
"deployment_status": "pending"
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}