Skip to content

Execute File

POST
/api/v1/deployments/execute-file
curl --request POST \
--url 'https://example.com/api/v1/deployments/execute-file?repository_name=example&branch=main&file_path=example' \
--header 'Content-Type: application/json' \
--data '{ "additionalProperty": "example" }'

Execute a single SQL file from git repository.

This uses EXECUTE IMMEDIATE FROM to run a SQL file from a git repository branch. Supports Jinja2 template variable substitution via the USING clause.

Args: repository_name: Git repository name branch: Branch name file_path: Relative path to SQL file variables: Optional template variables for Jinja2 substitution

Returns: Dictionary with execution status

Raises: HTTPException: If execution fails

repository_name
required
Repository Name

Git repository name

string

Git repository name

branch
Branch

Branch name

string
default: main

Branch name

file_path
required
File Path

Relative file path in repository

string

Relative file path in repository

X-Environment-Id
Any of:
string
Media typeapplication/json
Any of:
object
key
additional properties
Any of:
string
Examplegenerated
{
"additionalProperty": "example"
}

Successful Response

Media typeapplication/json
Response Execute File Api V1 Deployments Execute File Post
object
key
additional properties
Any of:
string
Examplegenerated
{
"additionalProperty": "example"
}

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"
}
]
}