Authentication
All API calls require a bearer token from a personal API key or service principal credential. See C1 API and keys for setup.Create a function
Create a new function with optional inline code.id.
To include initial code at creation time, pass an initialContent map with base64-encoded file contents:
function and a commit with the initial commit details.
Edit function code
Updating code on an existing function uses a three-step commit flow:- Create an initial commit to declare the files you want to upload and receive signed upload URLs.
- Upload each file to its signed URL.
- Finalize the commit to mark the upload as complete.
Step 1: Create an initial commit
Send the list of filenames you want to commit. The response includes acommitId and a map of uploadUrls — one signed URL per file.
Upload URLs are relative paths on the same tenant host. Prepend your tenant URL to form the full upload URL.
Step 2: Upload files
Upload each file’s contents to its signed URL using an HTTP PUT request. The signed URL is self-authenticating — no bearer token is needed.204 No Content.
Step 3: Finalize the commit
After all files are uploaded, finalize the commit to make it available.commit object.
Publish a commit
Committing code creates a new draft. To make the commit the live published version, update the function’spublishedCommitId:
Complete example
This script creates a commit, uploads a file, finalizes, and publishes — all in one sequence:List commits
Retrieve the commit history for a function:Get commit content
Retrieve a specific commit and its file contents:Other function operations
Use the following endpoints to list, retrieve, delete, invoke, and test functions.List functions
Get a function
Delete a function
Invoke a function
commitId, C1 uses the published commit.
Run tests
commitId, C1 uses the published commit.