Functions

Create or update function code

Changed on

Upload a function source bundle. Direct API clients may send the function code as a ZIP or tar.gz archive via multipart/form-data. The API stores a normalized tar.gz source archive. Cloud deploys should include source files and dependency manifests/lockfiles, not installed dependency directories. Volcano installs Node.js, Python, and Ruby dependencies during the function compile build. Source archive size is enforced by the API with SOURCE_ARCHIVE_SIZE_LIMIT_MB; the CLI does not apply its own source archive size limit. After the final container image is built, the publish build enforces LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB before pushing. Uploaded source archives cannot contain symlink entries. Safe symlinks created during the cloud build are materialized before publish. Volcano builds and deploys the function asynchronously after upload. A deployment that starts immediately returns a Function resource with status: provisioning, then transitions to active or failed. If another deployment is running, the response preserves the resource's current status and exposes the queued deployment through pending_deployment_id. Existing function traffic continues to use the last known-good runtime during an update. A failed update keeps that runtime available and records the attempted deployment as failed. Only one deployment runs for a given function. A newer request supersedes any queued request and starts after the running deployment. Different functions and projects deploy concurrently. If a function with the same name already exists in the project, this operation updates that function's runtime, handler, and source bundle and returns 200 OK. Each project can contain up to 10,000 functions. Creating a new function over this cap returns 403.

post/projects/{id}/functions

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/projects/{id}/functions
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring uuid required

Project ID

Response

Existing function updated; its deployment was started or queued

idstring uuid required
project_idstring uuid required
namestring required
status'provisioning' | 'active' | 'failed' | 'deleting' required
provisioning_started_atstring date-time

Timestamp when the current provisioning phase started

visibility'private' | 'authenticated' | 'public' required

Who can invoke the function. Each level admits everything the one before it does.

  • private: service keys and the project's schedulers only. The default for a new function. To any other credential the function does not exist: it answers 404, like a missing one.
  • authenticated: also any signed-in user of the project, including anonymous sign-ins. The function receives their auth context.
  • public: also anon keys holding functions.invoke, and Frontend Function routes, which forward requests without a credential.
is_publicboolean required

Deprecated. true exactly when visibility is public.

invocation_mode'rpc' | 'http' required

Invocation contract. rpc preserves the existing POST {payload: ...} contract; http forwards HTTP request semantics to the function runtime.

http_auth_mode'volcano' | 'none' required

Authentication applied by the HTTP ingress. none is valid only for HTTP-mode functions with visibility: public and is intended for externally signed webhooks.

openapi_specobject nullable required

Optional OpenAPI 3.0 or 3.1 document describing an HTTP-mode function.

has_openapi_specboolean required

Whether OpenAPI metadata is configured; list responses omit the document itself.

invoke_urlstring

Canonical geo-routed HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted when the deployment serves no public invocation domain, as in local development, so a client testing for an empty string never matches.

deployed_regionsstring[] required

Regions where this function is currently deployed

runtimestring
handlerstring
current_deployment_idstring uuid

Identifier of the latest function deployment operation

pending_deployment_idstring uuid

Newest queued deployment that will run after the current operation

last_invoked_atstring date-time

Most recent successful invocation timestamp

created_atstring date-time required
updated_atstring date-time required

Changes

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ○

      the endpoint scheme security ProjectAccessToken was added to the API

    • ○

      added the new optional request property

    • ○

      request property deprecated

    • ○

      added the non-success response with the status

    • ○

      added the non-success response with the status

    • ○

      response property is_public deprecated

    • ○

      response property is_public deprecated

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ▲

      added the new path request parameter id

    • ▲

      request property was restricted to a list of enum values

    • ▲

      request property was restricted to a list of enum values

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ○

      added the new optional request property

    • ○

      added the new optional request property

    • ○

      the request property default value false was removed

    • ○

      added the new http enum value to the request property

    • ○

      added the new none enum value to the request property

    • ○

      added the new rpc enum value to the request property

    • ○

      added the new volcano enum value to the request property

    • ○

      the request property type was generalized from no type to string

    • ○

      the request property type was generalized from no type to string

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status