Deploy a version
Deploys an uploaded archive, or the function's workspace when no archive is given, and promotes the result unless asked not to.
A container deploy answers before its build finishes: the version comes back BUILDING and promotes itself when the build succeeds. Poll GetVersion and GetBuildLog to follow it.
Authorization
BearerAuth A team API token, created by a team owner and presented as
Authorization: Bearer fnt_…. The secret is shown once at creation and
stored only as a hash.
In: header
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
source_zip is an uploaded source tree, at most 64 MiB. Empty deploys what is already in the function's workspace, which is the path a function authored in the console takes.
byteskip_promote builds a version without pointing traffic at it. Deploys promote by default: an author deploying expects it to go live.
Response Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v1.FunctionService/DeployVersion" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"version": {
"versionId": "string",
"functionId": "string",
"state": "VERSION_STATE_UNSPECIFIED",
"snapshotId": "string",
"environmentId": "string",
"appId": "string",
"staticRoot": "string",
"gitCommit": "string",
"gitRef": "string",
"failureMessage": "string",
"createdAtUnix": 0
}
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}Deploy from git POST
Builds the connected repository on demand, optionally at a ref supplied for this deploy only — nothing about the configured push-to-deploy branch is changed.
Disconnect repository POST
Stops deploying from the repository, removing the webhook and revoking the credential that was provisioned for it.