Functions
Functions, versions, deploys, workspace files and repository connections. Reachable with a team API token.
postCreate function
Creates a function and assigns its hostname. The kind is required and immutable, and the new function is scaffolded with a working hello-world so that "created" and "deployable" are the same state.
postDelete connection
Removes a team's authorisation. Functions deploying through it stop being able to.
postDelete function
Deletes the function and releases what it holds on the platform: the App behind every version, and the workspace that owns their snapshots.
postDeploy from git
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.
postDeploy 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.
postDisconnect repository
Stops deploying from the repository, removing the webhook and revoking the credential that was provisioned for it.
postGet build log
Reads a version's build output by byte offset. Send back the offset you were given and stop when complete is true.
postGet function
Reads one function by id, or by its assigned hostname label.
postGet function stats
Reads traffic, errors, latency and cold starts, rolled up into the step requested. Counters are stored in five-minute buckets and kept for fourteen days.
postGet version
Reads one version. A version belonging to another function is not found.
postList connections
Lists a team's provider authorisations.
postList files
Lists the function's workspace, or a version's frozen snapshot.
postList functions
Lists the functions of one team. Each result embeds its active and latest version, so a status column needs no call per row.
postList repositories
Lists what the function's connection can deploy from.
postList versions
The function's deploy history, newest first.
postCreate directory
Creates a directory in the workspace.
postMove file
Moves or renames a path within the workspace.
postPromote a version
Points the function's traffic at an already-built version. This is both "deploy" and "roll back" — a rollback is just promoting an older version, and is instant because nothing is rebuilt.
postRead file
Reads one file, from the workspace or from a version's snapshot. Files larger than 2 MiB are refused.
postRedeploy a version
Produces a new version from an existing version's snapshot. This is how a failed build is retried and how an environment or secret change is applied, since a running version's environment is fixed when it is created. The version it is asked about is never mutated.
postRemove file
Removes a file or directory from the workspace.
postSelect repository
Points a function at one of those repositories, provisioning a credential and registering a webhook on the provider.
postUpdate function
Applies only the fields present in the request. Settings that do not apply to the function's kind are refused rather than stored.
postWrite file
Writes one file into the workspace. Refused for a git-backed function, whose workspace is replaced by every push.
Using the API
Base URLs, authentication, error codes and the role each call requires.
Create function POST
Creates a function and assigns its hostname. The kind is required and immutable, and the new function is scaffolded with a working hello-world so that "created" and "deployable" are the same state.