---
title: "Update a function."
method: PUT
path: "/system/functions"
---

# Update a function.

`PUT /system/functions`

## Request body

- FunctionDefintion
  - `service` string, required — Name of deployed function
  - `network` string — Docker swarm network, usually func_functions
  - `image` string, required — Docker image in accessible registry
  - `envProcess` string, required — Process for watchdog to fork
  - `envVars` object — Overrides to environmental variables
  - `constraints` string[]
  - `labels` object — A map of labels for making scheduling or routing decisions
  - `annotations` object — A map of annotations for management, orchestration, events and build tasks
  - `secrets` string[]
  - `registryAuth` string — Private registry base64-encoded basic auth (as present in ~/.docker/config.json)
  - `limits` object
    - `memory` string
    - `cpu` string
  - `requests` object
    - `memory` string
    - `cpu` string
  - `readOnlyRootFilesystem` boolean — Make the root filesystem of the function read-only

## Response `200`

Accepted

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/tanklabtju/apis/openfaas-api-gateway.md) · [All operations](https://skmtc.net/tanklabtju/apis/openfaas-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tanklabtju/openfaas-api-gateway/versions/15f9c1fdaeb2/schema)
