You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Function Reference

corredor

Name Description I/O

Corredor automation script executor

Executes script in Corredor Automation server

Parameters:
  • * script ( String,)

  • args ( Vars,)

Results:
  • results (Vars)

email

Name Description I/O

Email

Sends email directly

Parameters:
  • Subject ( String, Reader,)

  • Reply to ( String, User,)

  • Sender ( String, User,)

  • Recipients ( String, KV, User,)

  • CC ( String, KV, User,)

  • HTML message body ( String, Reader,)

  • Plain text message body ( String, Reader,)

Email builder

Constructs new email message from basic parameters without sending it

Parameters:
  • Subject ( String, Reader,)

  • Reply to ( String, User,)

  • Sender ( String, User,)

  • Recipients ( String, KV, User,)

  • CC ( String, KV, User,)

  • HTML message body ( String, Reader,)

  • Plain text message body ( String, Reader,)

Results:
  • message (EmailMessage)

Email sender

Sends email message

Parameters:
  • * Message to be sent ( EmailMessage,)

Email subject

Sets subject on the email message

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Subject ( String,)

Email headers

Sets message headers (overrides any existing headers, subject, recipients)

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Headers ( KVV,)

Email header

Sets or removes specific header without changing the rest

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Value ( String,)

  • Value ( String,)

Email set address

Sets the recipient, sender or reply-to addresses

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Type ( String,)

  • * Address ( String,)

  • Name ( String,)

Email add address

Adds new recipient, sender or reply-to address

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Type ( String,)

  • * Address ( String,)

  • Name ( String,)

Email attachment

Attach content to an email message

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Content ( Reader, String,)

  • Name ( String,)

Email embedded attachment

Embed file (image) to an email message

Parameters:
  • * Message to be sent ( EmailMessage,)

  • * Content ( Reader,)

  • Name ( String,)

httpRequest

Name Description I/O

HTTP request

Sends HTTP requests

Parameters:
  • * url ( String,)

  • * method ( String,)

  • params ( KVV,)

  • headers ( KVV,)

  • headerAuthBearer ( String,)

  • headerAuthUsername ( String,)

  • headerAuthPassword ( String,)

  • headerUserAgent ( String,)

  • headerContentType ( String,)

  • timeout ( Duration,)

  • form ( KVV,)

  • body ( String, Reader, Any,)

Results:
  • status (String)

  • statusCode (Integer)

  • headers (KVV)

  • contentLength (Integer)

  • contentType (String)

  • body (Reader)

jsenv

Name Description I/O

Process arbitrary data in jsenv

Parameters:
  • * scope ( Any, String, Reader,)

  • * source ( String,)

Results:
  • resultString (String)

  • resultInt (Integer)

  • resultAny (Any)

jwt

Name Description I/O

Generate JWT

Parameters:
  • scope ( String,)

  • * header ( Vars, String,)

  • * payload ( Vars, String,)

  • * secret ( String, Reader,)

Results:
  • token (String)

log

Name Description I/O

Log debug message

Parameters:
  • * message ( String,)

  • fields ( KV,)

Log info message

Parameters:
  • * message ( String,)

  • fields ( KV,)

Log warning message

Parameters:
  • * message ( String,)

  • fields ( KV,)

Log error message

Parameters:
  • * message ( String,)

  • fields ( KV,)

loop

Name Description I/O

oauth2

Name Description I/O

Authentication: OAUTH2

Parameters:
  • * client ( String,)

  • * secret ( String,)

  • * scope ( String,)

  • * tokenUrl ( String,)

Results:
  • accessToken (String)

  • refreshToken (String)

  • token (Any)

queue

Name Description I/O

Queue message send

Parameters:
  • * payload ( String, Reader,)

  • * queue ( String,)

attachment

Name Description I/O

Compose record lookup

Find specific record by ID

Parameters:
  • * attachment ( ID,)

Results:
  • attachment (Attachment)

Create file and attach it to a resource

Parameters:
  • name ( String,)

  • * resource ( ComposeRecord,)

  • * content ( String, Reader, Bytes,)

Results:
  • attachment (Attachment)

Delete attachment

Parameters:
  • * attachment ( ID,)

Open original attachment

Parameters:
  • * attachment ( ID, Attachment,)

Results:
  • content (Reader)

Open attachment preview

Parameters:
  • * attachment ( ID, Attachment,)

Results:
  • content (Reader)

modules

Name Description I/O

Compose module lookup

Find specific module by ID or handle

Parameters:
  • * module ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

Results:
  • module (ComposeModule)

namespaces

Name Description I/O

Compose namespace lookup

Find specific namespace by ID or handle

Parameters:
  • * namespace ( ID, Handle, ComposeNamespace,)

Results:
  • namespace (ComposeNamespace)

records

Name Description I/O

Compose record lookup

Find specific record by ID

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

  • * record ( ID, ComposeRecord,)

Results:
  • record (ComposeRecord)

Compose records search

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

  • query ( String,)

  • labels ( KV,)

  • deleted ( UnsignedInteger,)

  • sort ( String,)

  • limit ( UnsignedInteger,)

  • incTotal ( Boolean,)

  • incPageNavigation ( Boolean,)

  • pageCursor ( String,)

Results:
  • records (ComposeRecord)

  • Total records found (UnsignedInteger)

Compose record lookup (first created)

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

Results:
  • record (ComposeRecord)

Compose record lookup (last created)

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

Results:
  • record (ComposeRecord)

Compose record maker

Creates new compose record instance without saving it

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

Results:
  • record (ComposeRecord)

Compose record validator

Parameters:
  • * record ( ComposeRecord,)

Results:
  • Set to true when record is valid (Boolean)

Compose record create

Parameters:
  • * record ( ComposeRecord,)

Results:
  • record (ComposeRecord)

Compose record update

Parameters:
  • * record ( ComposeRecord,)

Results:
  • record (ComposeRecord)

Compose record delete

Parameters:
  • * record ( ID, ComposeRecord,)

Report

Compose records report

Parameters:
  • * Module to set record type ( ID, Handle, ComposeModule,)

  • * namespace ( ID, Handle, ComposeNamespace,)

  • * Metrics for records report ( String,)

  • * Dimensons for records report ( String,)

  • * Filter for records report ( String,)

Results:
  • Complex structure holding complete records report (Any)

actionlog

Name Description I/O

Action log search

Parameters:
  • fromTimestamp ( DateTime,)

  • toTimestamp ( DateTime,)

  • beforeActionID ( ID,)

  • actorID ( ID,)

  • origin ( String,)

  • resource ( String,)

  • action ( String,)

  • limit ( UnsignedInteger,)

Results:
  • actions (Action)

Record action into action log

Parameters:
  • action ( String,)

  • resource ( String,)

  • error ( String,)

  • severity ( String,)

  • description ( String,)

  • meta ( Vars,)

rbac

Name Description I/O

RBAC: Allow operation on resource to a role

Parameters:
  • * resource ( RbacResource,)

  • * role ( ID, Handle, Role,)

  • * operation ( String,)

RBAC: Deny operation on resource to a role

Parameters:
  • * resource ( RbacResource,)

  • * role ( ID, Handle, Role,)

  • * operation ( String,)

RBAC: Remove allow/deny operation of a role from resource

Parameters:
  • * resource ( RbacResource,)

  • * role ( ID, Handle, Role,)

  • * operation ( String,)

RBAC: Can user perform an operation on a resource

Parameters:
  • * resource ( RbacResource,)

  • * operation ( String,)

  • user ( User,)

Results:
  • can (Boolean)

roles

Name Description I/O

Role lookup

Find specific role by ID or handle

Parameters:
  • * lookup ( ID, Handle, Role,)

Results:
  • role (Role)

Role members search

Find members for a specific roleby ID or handle

Parameters:
  • * lookup ( ID, Handle, Role,)

Results:
  • users (User)

  • total (UnsignedInteger)

Role membership add

Parameters:
  • * role ( ID, Handle, Role,)

  • * user ( ID, Handle, String, User,)

Role membership remove

Parameters:
  • * role ( ID, Handle, Role,)

  • * user ( ID, Handle, String, User,)

Roles search

Parameters:
  • query ( String,)

  • memberID ( ID,)

  • handle ( String,)

  • name ( String,)

  • labels ( KV,)

  • deleted ( UnsignedInteger,)

  • archived ( UnsignedInteger,)

  • sort ( String,)

  • limit ( UnsignedInteger,)

  • incTotal ( Boolean,)

  • incPageNavigation ( Boolean,)

  • pageCursor ( String,)

Results:
  • roles (Role)

  • total (UnsignedInteger)

Role creator

Parameters:
  • * role ( Role,)

Results:
  • role (Role)

Role update

Parameters:
  • * role ( Role,)

Results:
  • role (Role)

Role delete

Parameters:
  • * lookup ( ID, Handle, Role,)

Role recover

Parameters:
  • * lookup ( ID, Handle, Role,)

Role archive

Parameters:
  • * lookup ( ID, Handle, Role,)

Role unarchive

Parameters:
  • * lookup ( ID, Handle, Role,)

templates

Name Description I/O

Template lookup

Find specific template by ID or handle

Parameters:
  • * lookup ( ID, Handle, Template,)

Results:
  • template (Template)

Templates search

Parameters:
  • handle ( String,)

  • type ( String,)

  • ownerID ( ID,)

  • partial ( Boolean,)

  • labels ( KV,)

  • sort ( String,)

  • limit ( UnsignedInteger,)

  • incTotal ( Boolean,)

  • incPageNavigation ( Boolean,)

  • pageCursor ( String,)

Results:
  • templates (Template)

  • total (UnsignedInteger)

Template create

Parameters:
  • * template ( Template,)

Results:
  • template (Template)

Template update

Parameters:
  • * template ( Template,)

Results:
  • template (Template)

Template delete

Parameters:
  • * lookup ( ID, Handle, Template,)

Template recover

Parameters:
  • * lookup ( ID, Handle, Template,)

Template render

Parameters:
  • * lookup ( ID, Handle, Template,)

  • documentName ( String,)

  • documentType ( String,)

  • variables ( Vars,)

  • options ( RenderOptions,)

Results:
  • document (RenderedDocument)

users

Name Description I/O

User lookup

Find specific user by ID, handle or string

Parameters:
  • * lookup ( ID, Handle, String, User,)

Results:
  • user (User)

User role search

Search user role membership by ID, handle or string

Parameters:
  • * lookup ( ID, Handle, String, User,)

Results:
  • roles (Role)

  • total (UnsignedInteger)

User membership check

Find user role membership by ID, handle or string

Parameters:
  • * user ( ID, Handle, String, User,)

  • * role ( ID, Handle, Role,)

Results:
  • member (Boolean)

User search

Parameters:
  • query ( String,)

  • email ( String,)

  • handle ( String,)

  • labels ( KV,)

  • deleted ( UnsignedInteger,)

  • suspended ( UnsignedInteger,)

  • sort ( String,)

  • limit ( UnsignedInteger,)

  • incTotal ( Boolean,)

  • incPageNavigation ( Boolean,)

  • pageCursor ( String,)

Results:
  • users (User)

  • total (UnsignedInteger)

User create

Parameters:
  • * user ( User,)

Results:
  • user (User)

User update

Parameters:
  • * user ( User,)

Results:
  • user (User)

User delete

Parameters:
  • * lookup ( ID, Handle, String, User,)

User recover

Parameters:
  • * lookup ( ID, Handle, String, User,)

User suspend

Parameters:
  • * lookup ( ID, Handle, String, User,)

User unsuspend

Parameters:
  • * lookup ( ID, Handle, String, User,)