Update a Function
Update a function. Updates create a new version.
The previous version remains addressable and immutable. Workflow
nodes that pinned the function with a versionNum continue to use
the pinned version; nodes that reference the function by name with
no version automatically pick up the new version on their next call.
What you can change
Any field allowed by the function's type. Most commonly:
outputSchema (for extract/join), classifications (for
classify), displayName, and tags.
Versioning behaviour
- Each successful update increments
currentVersionNumby 1. displayName,tags, andfunctionNameupdates also create a new version, so the version history is a complete record of every change.- To revert, fetch the previous version and re-submit its configuration as a new update — versions themselves are immutable.
Authorization
API Key Authenticate using API Key in request header
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://api.bem.ai/v3/functions/string" \ -H "Content-Type: application/json" \ -d '{ "type": "extract" }'{
"function": {
"functionID": "string",
"functionName": "string",
"versionNum": 0,
"usedInWorkflows": [
{
"workflowID": "string",
"workflowName": "string",
"currentVersionNum": 0,
"usedInWorkflowVersionNums": [
0
]
}
],
"displayName": "string",
"tags": [
"string"
],
"audit": {
"functionCreatedBy": {
"userActionID": "string",
"userID": "string",
"userEmail": "string",
"apiKeyName": "string",
"emailAddress": "string",
"createdAt": "2019-08-24T14:15:22Z"
},
"functionLastUpdatedBy": {
"userActionID": "string",
"userID": "string",
"userEmail": "string",
"apiKeyName": "string",
"emailAddress": "string",
"createdAt": "2019-08-24T14:15:22Z"
},
"versionCreatedBy": {
"userActionID": "string",
"userID": "string",
"userEmail": "string",
"apiKeyName": "string",
"emailAddress": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
},
"type": "transform",
"outputSchemaName": "string",
"outputSchema": {},
"emailAddress": "string",
"tabularChunkingEnabled": true
}
}See also
- Function types overview — extract, classify, split, join, enrich, parse, payload shaping
- Schema building guide — designing outputSchema