Scripts
platform.extensions.scripts
A script action runs Python code. Use it when a Data Mapper expression can’t do the transformation.
To learn what scripts do, see Scripts in the Tool Studio docs.
- Endpoint:
/platform/extensions/scripts| Methods: GET, PATCH, POST - Request shape: fields go at the top level of the JSON body, with no
resourcewrapper. The item’sidgoes in the URL for reads and updates, not in the body. - Updates: a JSON merge-patch with
version: {num, change_description}from your last read. Lists of objects merge row by row, so read first and send the whole list when you remove or reorder rows. See Tool Studio. - References: Conversational processes, data types and plugins call the script by its
id; compound actions call it bysignature.name.
Endpoints
All paths are relative to https://api.moveworks.ai/configurations/v1alpha1. Each endpoint page lists the request and response schema, an example, and the errors it can return.
Rules the API checks
codeis required. The script’s inputs are available as plain variable names.- The last line must be an expression, which becomes the result. Assign inside
if,forortryblocks, then put the variable alone on the last line. - Read a secret with
_SECRETS['name']. Secrets come back redacted. languageis always Python and can’t be changed.