"Call Definition" Object

calldef.cmd
String

The name by which this API call will be invoked.

For consistency, the naming pattern is actionSubject, as in countOrganizations. The intent is for actions to be based on CRUD terminology rather than RESTful terminology.

Commonly used actions are 'activate, create, count, deactivate, delete, get, and update'.
calldef.call
String

The API-specific URL, which is derived by examining the API's RAML.

Does not include the API server segment, which is automatically prepended based on the value of the cui.api() serviceUrl.

Does include embedded URI parameters inside curly brackets '{}'. The name inside the curly brackets MUST match exactly the name of the parameter, as specified in the underlying RAML.
calldef.type
String

One of the following values:
"GET","DELETE","POST","PUT"
The type of restful action being performed by the API call, which is derived by examining the API's RAML.
calldef.accepts
String

Optional.
The value for the API call's Accept header.

The value is determined by examining the API's RAML.

If the API does not specify this header than it can be omitted by the call definition.
calldef.contentType
String

Optional.
The value for the API call's Content-type header.

The value is determined by examining the API's RAML.

If the API does not specify this header than it can be omitted by the call definition.
calldef.cmdType
String

Optional.
One of the following values:
"nonce","unsecured"
Determines how the cui.js will apply Authorization headers to the call.

If omitted, the currently cached bearer or JWT token will be used.
If nonce then the cached nonce will be used.
If unsecured then no token will be used.
calldef.delayForIndex
Boolean

Optional.
Post-processing behavior for create calls.

If true, then cui.js will delay resolving the call promise until the created subject is available via a standard GET call.

Allows App code to be certain that the underlying create transaction succeed AND that the created subject has been successfully indexed.

Note, if the delay is not desired it can be disabled by specifying options.delayForIndex: false on a call-by-call basis.