Utilities
You can use the following utilities in your script:
- Call internal API
- Execute HTTP request
- Execute asset upload
- Import from a third party
- Update from a third party
- Sign JWT with RSA
- Get or add cache
- Has document imported
- Import content file
- Publish message to AWS SNS
- Export to S3
Utils.ExecuteWithLock(key, fn, options): Runs a function under a distributed lock.Utils.SetScriptOutput(value): Sets `ScriptResult.Data`.Utils.MergeObjects(target, a, b): Merges objects into a target.Utils.ExportToGCS(recordId, format, options): Exports an asset to Google Cloud Storage.
Unless otherwise indicated, each utility includes both a success and a failure callback attribute.
| Attribute | Type | Description | Required |
|---|---|---|---|
CallbackSuccess | function | A function called when the request succeeds. Specify a response object using the following fields:
| yes |
CallBackFail | function | A function called when the request fails. Specify a response object, including the following fields:
| yes |
Updated about 1 month ago
Did this page help you?

