Skip to main content

Update a Forge function (JSON Merge Patch).

PATCH/api/v1/forge-functions/{forge_function_id}forge:deploy

Changes the display name, description, timeout, memory and environment (env_config; null empties it). A timeout, memory or environment change re-deploys the active version after the change is saved, since the function reads them when deployed. Limits are clamped to the server's maximums. Needs Edit Forge Functions, and Provision Forge Versions and Deploy Forge Function Versions when the change re-deploys an active version; is refused to external users, and is unavailable while Forge publishing is off.

Scopeforge:deploy (sensitive)
AsynchronousNo
MCP toolupdate_forge_function
Portal permissionsedit_forge_functions

Parameters​

NameInTypeRequiredDescription
forge_function_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-MatchheaderstringOptional

Request body​

Content typeType
application/jsonForgeFunctionPatchInput
application/merge-patch+jsonForgeFunctionPatchInput

Responses​

StatusDescriptionBody
200Success.application/json ForgeFunction or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflictapplication/problem+json Problem
412precondition_failedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

ForgeConfigKey​

FieldTypeRequiredDescription
defaultstring or nullRequired
descriptionstring or nullRequired
is_requiredbooleanRequired
is_secretbooleanRequiredA secret key holds a keystore secret's name, never a value.
keystringRequired

ForgeConfigKeyInput​

FieldTypeRequiredDescription
defaultstring or nullOptional
descriptionstring or nullOptional
is_requiredbooleanOptional
is_secretbooleanOptionalA secret key holds a keystore secret's name, never a value.
keystringOptional

ForgeFunction​

FieldTypeRequiredDescription
active_version_numberinteger or nullRequiredThe number of the version that runs.
archivedbooleanRequired
artifacts_enabledbooleanRequired
config_keysarray of ForgeConfigKeyRequiredThe settings a workflow step using the function asks for.
created_atstring (date-time) or nullRequired
default_modestringRequired
descriptionstring or nullRequired
display_namestringRequired
document_contextarray of stringRequiredThe optional document blocks the active version asked for (tags, folders, locations, review, collected_files).
entrypointarray of stringRequiredContainer packaging: the command the shim runs inside the image.
env_configobjectRequiredThe function's environment variables, as an opaque forge_env_config document (format_version 1).
forge_function_idstringRequired
forge_function_version_idstring or nullRequiredThe version that runs; null when none is active.
handlerstring or nullRequiredZip packaging: the code's entry point.
invocations_30_daysintegerRequiredRuns dispatched in the last 30 days. ≥ -2147483648; ≤ 2147483647
last_invoked_atstring (date-time) or nullRequired
latest_version_statusstring or nullRequiredThe provisioning state of the newest version, so a list shows one that is still deploying.
max_artifactsintegerRequired≥ -2147483648; ≤ 2147483647
memory_mbintegerRequired≥ -2147483648; ≤ 2147483647
namestringRequired
output_schemaobject or nullRequiredThe JSON Schema of the function's output (format forge_output_schema); null when it declares none.
packagingstringRequired
registry_repository_uristring or nullRequiredContainer packaging: where the image is pushed; null until the Portal made the repository.
routesarray of ForgeRouteRequiredThe handles a workflow edge leaves the function's step by.
runtimestringRequired
timeout_secondsintegerRequired≥ -2147483648; ≤ 2147483647

ForgeFunctionPatchInput​

FieldTypeRequiredDescription
active_version_numberinteger or nullOptional
archivedboolean or nullOptional
artifacts_enabledboolean or nullOptional
config_keysarray of ForgeConfigKeyInput or nullOptional
created_atstring (date-time) or nullOptional
default_modestring or nullOptional
descriptionstring or nullOptional
display_namestring or nullOptional
document_contextarray of string or nullOptional
entrypointarray of string or nullOptional
env_configobject or nullOptionalThe environment variables, as an opaque forge_env_config document (format_version 1).
forge_function_idstring or nullOptional
forge_function_version_idstring or nullOptional
handlerstring or nullOptional
invocations_30_daysinteger or nullOptional
last_invoked_atstring (date-time) or nullOptional
latest_version_statusstring or nullOptional
max_artifactsinteger or nullOptional
memory_mbinteger or nullOptional
namestring or nullOptional
output_schemaobject or nullOptional
packagingstring or nullOptional
registry_repository_uristring or nullOptional
routesarray of ForgeRouteInput or nullOptional
runtimestring or nullOptional
timeout_secondsinteger or nullOptional

ForgeRoute​

FieldTypeRequiredDescription
descriptionstring or nullRequired
handlestringRequired
labelstringRequired

ForgeRouteInput​

FieldTypeRequiredDescription
descriptionstring or nullOptional
handlestringOptional
labelstringOptional