Generated from the same public contract that feeds the Monaco editor. Declaration-marked deprecated compatibility methods are intentionally excluded. Do not edit this page manually.
api.createDatabase()api.cloneDatabase()api.exportDatabase()api.exportDatabaseView()api.updateDatabase()api.deleteDatabase()api.restoreDatabase()api.truncateDatabase()api.transactionDatabase()api.getDatabaseData()api.getDatabaseViewData()api.getDatabaseAudit()api.insertDatabaseData()api.upsertDatabaseData()api.updateDatabaseData()api.deleteDatabaseData()api.updateDatabaseDataRequest()api.deleteDatabaseDataRequest()api.queryDatabase()api.currentUser()api.isDebug()api.disableDebug()api.enableDebug()api.getCache()api.setCache()api.getContext()api.getErrors()api.getWarnings()api.getExecutionId()api.getLogs()api.getOperationId()api.executeComponent()api.input()api.log()api.exit()api.throw()api.getCurrentInstance()api.getInstanceData()api.getInstanceDetails()api.getSecret()api.getSecrets()api.publishMessage()api.getInstanceCache()api.setInstanceCache()api.setInstanceCacheIfNotExists()api.getOrSetInstanceCache()api.removeInstanceCache()api.existsInstanceCache()api.persistInstanceCache()api.expireInstanceCache()api.getExpireInstanceCache()api.listInstanceCache()api.incrementInstanceCache()api.decrementInstanceCache()api.compareAndSetInstanceCache()api.acquireIdempotencyKey()api.getIdempotencyKey()api.releaseIdempotencyKey()api.concurrencyLimit()api.rateLimit()api.releaseRateLimit()api.releaseConcurrencyLimit()api.triggerEvent()api.triggerTarget()api.triggerJob()api.triggerWebhook()api.httpCall()api.sftpExec()api.sftpPut()api.sftpGet()
api.createDatabase()
Creates a logical database. The server assigns databaseId, version, and timestamps;
never generate or send those values. A normal database needs at least one definition.
Notes:
- No-op in debug mode.
Signature
Example
api.cloneDatabase()
Clones a logical database by name or database id.
Notes:
- No-op in debug mode.
- By default waits for the clone and returns cloned database metadata.
- Set
{ async: true }to start a backend clone task and return immediately with an accepted response. - Omit
nameto use the backend default source-name plus_Clone.
Signature
Example
api.exportDatabase()
Exports logical database rows directly into Storage as CSV.
Notes:
- No-op in debug mode.
- By default waits for the export, final compose, and storage entry persistence.
- Set
{ async: true }to return immediately with an accepted response. - Omit
storageDestinationfor private user storage, useROOTfor Explorer root, or provide an accessible Explorer folder storageEntryId.
Signature
Example
api.exportDatabaseView()
Exports a saved database view or materialized view directly into Storage as CSV.
The saved view owns its joins and CTEs; callers may add projection, filters,
grouping, sorting, and paging over the resulting view definition.
Defaults to waiting for the completed Storage entry. Set async: true for kickoff semantics.
Signature
No dedicated example is encoded in the current editor declaration. The signature is authoritative.
api.updateDatabase()
Updates selected logical-database fields. The public contract requires the current
version for optimistic locking; send only the fields that should change. Do not
copy server-owned databaseId, timestamps, or size into this payload.
Notes:
- No-op in debug mode.
Signature
Example
api.deleteDatabase()
Soft-deletes a logical database.
Notes:
- No-op in debug mode.
Signature
Example
api.restoreDatabase()
Restores a deleted logical database.
Notes:
- No-op in debug mode.
Signature
Example
api.truncateDatabase()
Removes all rows from a logical database.
Notes:
- No-op in debug mode.
- TRUNCATE does not create row audit events, even when database audit is enabled.
- Use an ordinary filtered delete, such as primary key IS NOT NULL, to preserve row audit events.
- Identity counters are preserved by default.
- Set restartIdentity only when generated key reuse is explicitly intended.
Signature
Example
api.transactionDatabase()
Runs database-data operations inside a short-lived transaction.
Notes:
- Commits automatically when the callback resolves.
- Rolls back automatically when the callback throws.
- The default timeout is 15,000 ms.
- Use
{ flexTimeout: true }when the transaction intentionally needs the enclosing execution’s remaining timeout budget. - Long transactions reserve a database connection and may retain locks; keep waits and remote side effects outside the callback when possible.
- SERIALIZABLE is the default isolation level.
- Parallel tx.* operations are rejected; await each tx.* call sequentially.
Signature
Example
api.getDatabaseData()
Reads database rows using the structured query shape.
Notes:
- This is the canonical read API.
Signature
Example
api.getDatabaseViewData()
Reads a saved database view by its logical name. The saved view owns its
joins and CTEs; callers may add projection, filters, casts, grouping,
sorting, count, and pagination over the resulting definition.
Signature
No dedicated example is encoded in the current editor declaration. The signature is authoritative.
api.getDatabaseAudit()
Reads newest-first audit events. Prefer narrow fields and changed/filter over a
full snapshot.* or changes.* payload. Missing requested paths return null.
Signature
No dedicated example is encoded in the current editor declaration. The signature is authoritative.
api.insertDatabaseData()
Inserts rows.
Notes:
- No-op in debug mode.
Signature
Example
api.upsertDatabaseData()
Upserts rows.
Notes:
- No-op in debug mode.
Signature
Example
api.updateDatabaseData()
Updates rows matched by oldObject.
Notes:
- No-op in debug mode.
Signature
Example
api.deleteDatabaseData()
Deletes rows.
Notes:
- No-op in debug mode.
Signature
Example
api.updateDatabaseDataRequest()
Bulk-updates rows matched by an advanced structured filter.
Notes:
- No-op in debug mode.
Signature
Example
api.deleteDatabaseDataRequest()
Bulk-deletes rows matched by an advanced structured filter.
Notes:
- No-op in debug mode.
Signature
Example
api.queryDatabase()
Executes raw SELECT/WITH SQL when the structured helpers are not enough.
Do not use this for writes; use insert/upsert/update/delete helpers or
transactionDatabase for write flows.
Signature
Example
api.currentUser()
Returns the current logged user or service account.
Signature
Example
api.isDebug()
Returns true when debug mode is enabled.
Signature
Example
api.disableDebug()
Disables debug mode for the current execution.
Signature
Example
api.enableDebug()
Enables debug mode for the current execution.
Signature
Example
api.getCache()
Reads request-scoped in-memory cache.
Signature
Example
api.setCache()
Writes request-scoped in-memory cache.
Signature
Example
api.getContext()
Returns the current execution context.
Signature
Example
api.getErrors()
Returns collected error logs.
Signature
Example
api.getWarnings()
Returns collected warning logs.
Signature
Example
api.getExecutionId()
Returns the UUID that identifies the current low-code execution.
For durable jobs this is the job id. Endpoint and Sandbox executions
receive an independent execution UUID while retaining their operation id
for distributed request tracing.
Signature
Example
api.getLogs()
Returns collected info logs.
Signature
Example
api.getOperationId()
Returns the current operation id.
Signature
Example
api.executeComponent()
Executes another active component in the managed RevoEngine runtime and returns its execution result.
Notes:
- Supports CODE_JS, CODE_TS, and CUSTOM_NODEJS components.
- CODE_JS and CODE_TS run in a fresh, isolated RevoEngine V8 environment.
- CUSTOM_NODEJS runs in its governed RevoEngine component environment.
- If timeoutMs is omitted, the child receives the parent execution’s remaining timeout budget.
- A larger timeoutMs is clamped to that remaining budget.
- At least 1 second of parent budget is required for nested component execution.
- Promise.all() starts independent child component executions.
Signature
Example
api.input()
Returns the current execution payload.
Notes:
- In endpoint context this usually includes body, query, headers, params, path, and method.
- In event or job context it commonly includes type and message.
- Passing a name returns a single top-level property.
Signature
Example
api.log()
Adds a log entry.
Signature
Example
api.exit()
Stops execution early without marking it as a sandbox failure.
Signature
Example
api.throw()
Stores an HTTP-style response and aborts execution.
Notes:
- Reserved 502 and 503 codes are not allowed from Endpoint user code.
Signature
Example
api.getCurrentInstance()
Returns the current instance id.
Signature
Example
api.getInstanceData()
Reads data from platform-managed sources.
Signature
Example
api.getInstanceDetails()
Returns public instance metadata.
Signature
Example
api.getSecret()
Resolves a single secret value by name.
Signature
Example
api.getSecrets()
Resolves multiple secret values by name.
Signature
Example
api.publishMessage()
Publishes a realtime message.
Notes:
- No-op in debug mode.
- Currently only the ‘ALL’ channel is supported.
Signature
Example
api.getInstanceCache()
Reads instance-scoped cache.
Signature
Example
api.setInstanceCache()
Writes instance-scoped cache.
Notes:
- No-op in debug mode.
Signature
Example
api.setInstanceCacheIfNotExists()
Writes instance-scoped cache only when the key does not exist.
Notes:
- No-op in debug mode.
Signature
Example
api.getOrSetInstanceCache()
Reads a cache key or stores the fallback value atomically if it is missing.
Signature
Example
api.removeInstanceCache()
Removes cache keys.
Notes:
- No-op in debug mode.
Signature
Example
api.existsInstanceCache()
Checks whether an instance cache key exists.
Signature
Example
api.persistInstanceCache()
Makes a cache key persistent.
Notes:
- No-op in debug mode.
Signature
Example
api.expireInstanceCache()
Sets cache TTL in seconds.
Notes:
- No-op in debug mode.
Signature
Example
api.getExpireInstanceCache()
Returns cache TTL in seconds, 0 for no expiry, or null when the key does not exist.
Signature
Example
api.listInstanceCache()
Lists instance cache keys by prefix or pattern.
Signature
Example
api.incrementInstanceCache()
Atomically increments an integer cache key.
Notes:
- No-op in debug mode.
- ‘by’ must be an integer.
Signature
Example
api.decrementInstanceCache()
Atomically decrements an integer cache key.
Notes:
- No-op in debug mode.
- ‘by’ must be an integer.
Signature
Example
api.compareAndSetInstanceCache()
Atomically updates a cache key only when the current value matches ‘expected’.
Notes:
- No-op in debug mode.
Signature
Example
api.acquireIdempotencyKey()
Acquires an idempotency key in the instance-scoped managed cache.
Notes:
- No-op in debug mode.
Signature
Example
api.getIdempotencyKey()
Reads stored idempotency metadata.
Signature
Example
api.releaseIdempotencyKey()
Releases an idempotency key.
Notes:
- No-op in debug mode.
Signature
Example
api.concurrencyLimit()
Acquires an instance-scoped concurrency token.
Notes:
- No-op in debug mode.
Signature
Example
api.rateLimit()
Acquires an instance-scoped rate-limit token.
Notes:
- No-op in debug mode.
Signature
Example
api.releaseRateLimit()
Releases a rate-limit key.
Notes:
- No-op in debug mode.
Signature
Example
api.releaseConcurrencyLimit()
Releases a concurrency-limit key.
Notes:
- No-op in debug mode.
Signature
Example
api.triggerEvent()
Schedules a custom event.
Notes:
- The existing Date argument and
scheduleDateoption remain supported. - New code should use
scheduleForwith a Date, ISO 8601 date-time, or Unix timestamp in milliseconds. - The absolute time cannot be in the past or more than 30 days ahead.
- No-op in debug mode.
Signature
Example
api.triggerTarget()
Schedules generic execution against a normalized target.
Notes:
- Use
JOB_TEMPLATEfor legacy template execution orAGENTfor agent-native dispatch. - The existing absolute Date argument remains supported.
- New code should pass
{ scheduleFor }; the maximum horizon is 30 days. - No-op in debug mode.
Signature
Example
api.triggerJob()
Schedules a job template.
Notes:
- No-op in debug mode.
- Convenience wrapper for
api.triggerTarget('JOB_TEMPLATE', templateId, ...). - The existing absolute Date argument remains supported.
- New code should pass
{ scheduleFor }; the maximum horizon is 30 days.
Signature
Example
api.triggerWebhook()
Schedules a webhook delivery.
Notes:
- The existing absolute Date argument remains supported.
- New code should pass
{ scheduleFor }; the maximum horizon is 30 days. - No-op in debug mode.
Signature
Example
api.httpCall()
Performs an outbound HTTP request.
Notes:
- Supports proxy mode, form-data, Storage streaming, and optional current credentials.
- Use
source: { storageEntryId }when streaming an Explorer Storage file into an HTTP request. - Use
target: { name, ... }ortarget: { storageEntryId, replace: true }when streaming an HTTP response into Explorer Storage. sourceandtargetmay be used together to stream a Storage entry through an external conversion API and save its response into Storage.- For multipart requests, put
formDataon the first config argument. Use one empty part withsource, or putstorageEntryIddirectly on each binaryformDatapart. - HTTP Storage targets use one provider-streamed direct upload and are finalized automatically. Use
storage.createUploadSessionplusstorage.uploadPartfor resumable/chunked session workflows. requestType: 'storage'andresponseType: 'storage'are not valid; Storage is selected bysource/targetwhilerequestType/responseTypedescribe HTTP encoding.response.dataisundefinedwhen the response is stored; useresponse.storage.entryafter successful finalization.- For text files, prefer
computeStats: 'sync'on the storage target so line stats are immediately available after finalize. - JSON is the default request and response format. Explicit
requestType: 'json'is valid for every supported HTTP method and may be combined with any response type because it does not declare a request body.
Signature
Example
api.sftpExec()
Executes multiple SFTP commands in order.
Notes:
- No-op in debug mode.
Signature
Example
api.sftpPut()
Streams an Explorer Storage entry directly to SFTP without loading file bytes into low-code memory.
Notes:
- No-op in debug mode.
- Prefer { storageEntryId } for Explorer Storage files. String inputs are legacy fileIds.
- SFTP references use Explorer Storage; namespace is not part of this API.
Signature
Example
api.sftpGet()
Streams an SFTP file directly into Explorer Storage and returns the finalized Storage entry.
Notes:
- No-op in debug mode.
- Use { storage: … } to create an entry or { storageEntryId, replace: true } to replace one.
- Repeated finalization signals are idempotent.
- For text files, computeStats: ‘sync’ makes line statistics available immediately.

