v1

latestSwagger 2.0MIT2026-07-1716717.0 KB

Deploy a new function.

post/system/functions

Request body

servicestring required

Name of deployed function

networkstring

Docker swarm network, usually func_functions

imagestring required

Docker image in accessible registry

envProcessstring required

Process for watchdog to fork

envVarsobject

Overrides to environmental variables

constraintsstring[]
labelsobject

A map of labels for making scheduling or routing decisions

annotationsobject

A map of annotations for management, orchestration, events and build tasks

secretsstring[]
registryAuthstring

Private registry base64-encoded basic auth (as present in ~/.docker/config.json)

readOnlyRootFilesystemboolean

Make the root filesystem of the function read-only

Example request

{
  "service": "nodeinfo",
  "network": "func_functions",
  "image": "functions/nodeinfo:latest",
  "envProcess": "node main.js",
  "constraints": [
    "node.platform.os == linux"
  ],
  "labels": {
    "foo": "bar"
  },
  "annotations": {
    "topics": "awesome-kafka-topic",
    "foo": "bar"
  },
  "secrets": [
    "secret-name-1"
  ],
  "registryAuth": "dXNlcjpwYXNzd29yZA==",
  "limits": {
    "memory": "128M",
    "cpu": "0.01"
  },
  "requests": {
    "memory": "128M",
    "cpu": "0.01"
  }
}

Response

Accepted