Chelabase
ManagementFunctions

Deploy a bundle, or a service's spec

POST
/v1/databases/{id}/branches/{branch_id}/functions/{name}/deployments

A function: stores the manifest (byte for byte as sent, at most 10 MiB; the body at most 12 MiB) with the functions service. A service: checks the spec's URL (a tenant admin only). Then records the deployment and, unless activate is false, makes it the active one on the branch. The function's enabled state doesn't change.

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Database id

Formatuuid
branch_id*string

Branch id

Formatuuid
name*string

Function name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A deployment: a function's bundle manifest (the runtime's format) and its hash, or a service's spec.

activate?|

Make it the active deployment on the branch (default true). The function stays enabled or disabled as it was; a new one starts disabled.

compatibility_date?|

Defaults to the manifest's compatibilityDate.

Formatdate
manifest?|

A function's bundle manifest, as the runtime loads it. Stored byte for byte as sent.

note?string|null
sha256?|

SHA-256 of the manifest's bytes as sent, lowercase hex.

spec?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/functions/string/deployments" \  -H "Content-Type: application/json" \  -d '{}'
{  "bundle_sha256": "string",  "bundle_size": 0,  "compatibility_date": "2019-08-24",  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "note": "string",  "rollout": "pending",  "spec": {}}