Functions

Deploy multiple functions in one request

Changed on

Upload multiple function source archives in one multipart request. Each archive should contain source files plus dependency manifests/lockfiles, not installed dependency directories. ZIP and tar.gz uploads are accepted and normalized to tar.gz before storage. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB for each uploaded and normalized source archive. The server records a shared deployment batch ID for the resulting function deployments. Each function deployment runs its own compile/publish workflow concurrently, and each publish build enforces LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB for the final container image. One batch request can include up to 100 functions. Submit multiple batch requests for larger projects. If one function fails before its workflow starts, already-started function deployments are left running and the failed function is reported in the failed array. Failed new functions are deleted; failed updates are rolled back to their previous metadata/status where possible.

post/projects/{id}/functions/batch

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

Request body multipart/form-data

object required
functions, string required

JSON array of functions with name, runtime, optional handler, and file_field. Each file_field must name a multipart file field containing that function's ZIP or tar.gz source bundle.

Each entry may also declare variable_scope (all or scoped) and variables (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes.

code_0, string binary

Function ZIP or tar.gz archive referenced by the first manifest entry's file_field; additional code_N file fields may be included. Each archive is subject to SOURCE_ARCHIVE_SIZE_LIMIT_MB.

Response

Batch deployment accepted

BatchFunctionDeployResponse required
batch_id, string uuid required
data, Function[] required

Functions whose deployment workflows were started successfully

failed, BatchFunctionDeployFailure[]

Functions that failed before their workflow started. Successful functions are left running; failed new functions are deleted and failed updates are rolled back where possible.

Changes

    • warning

      removed the optional property data/items/aws_function_arn from the response with the status

    • warning

      removed the optional property data/items/aws_function_arn from the response with the status

    • info

      the endpoint scheme security ProjectAccessToken was added to the API

    6 more changes in this revision