Qorus Integration Engine®  4.0.3.p1_git
Qorus Latest REST API

Table of Contents

/api/latest

This URI path always provides access to the latest REST API; in this case it is identical to /api/v3

To ensure that a specific REST API version is used; use the URI path prefix with a specific API version in it instead.

GET /api/latest

Description
Returns the top-level members of this version of the REST API

/api/latest/async-queues

This REST URI path provides actions and information about queues for asynchronous workflow steps

GET /api/latest/async-queues

Description
Returns informations about the asynchronous queues
Return Value
This API returns a list of hashes with the following keys:
  • queueid: the queue ID
  • name: the queue name
  • serviceid: optional: a related service id if present

/api/latest/async-queues/{queue}

This REST URI path provides actions and information about queues for asynchronous workflow steps

GET /api/latest/async-queues/{queue}

Description
Returns information about the current asynchronous queue
Return Value
This API returns a hash with the following keys:
  • queueid: the queue ID
  • name: the queue name
  • serviceid: optional: a related service id if present

POST /api/latest/async-queues/{queue}?action=cancel

Description
cancels a queue entry with status OMQ::QS_Waiting setting OMQ::QS_Used.
Arguments
  • key the key to the entry in the given queue to cancel
Exceptions
UNKNOWN-QUEUEinvalid queue name
INVALID-KEYno entry exists in the given queue with the given key value
INVALID-STATUSqueue entry does not have status OMQ::QS_Waiting
WORKFLOW-ACCESS-ERRORthis is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

GET /api/latest/async-queues/{queue}?action=info

Description
gets queue information for a queue entry from the queue name and key
Arguments
  • key the key to the entry
Return value
No value if no information is available, or a hash with the following keys:
  • workflow_instanceid: the workflow instance ID of the step and queue entry
  • stepid: the step ID of the step and queue entry
  • ind: the array index of the step and queue entry (0 for non-array steps)
  • queuekey: the queue key string
  • queue_data_status: the status of the queue entry: OMQ::QS_Waiting, OMQ::QS_Received, OMQ::QS_Used (Oracle only), or OMQ::QS_Error (rarely, in case of unparsable queue data)
  • corrected: if 1, then the queue entry has been corrected. meaning that the back-end function will not be executed and the step will automatically get a OMQ::StatComplete status.
  • data: the queue data, if any, set only when the queue data status is OMQ::QS_Received
Errors
  • 404 Not Found: the given key does not exist
  • 409 Conflict: UNKNOWN-QUEUE invalid queue name
  • 409 Conflict: WORKFLOW-ACCESS-ERROR this is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

PUT /api/latest/async-queues/{queue}?action=key

Description
changes the key for a pending entry in a system queue, only when the status is OMQ::QS_Waiting (args: queue name, old key, new key)
Arguments
  • oldkey the old key name
  • newkey the new key name
Exceptions
UNKNOWN-QUEUEinvalid queue name
UPDATE-KEY-ERRORempty string passed for oldkey or newkey
QUEUE-KEY-UPDATE-ERRORno queue entry; queue entry does not have status OMQ::QS_Waiting
WORKFLOW-ACCESS-ERRORthis is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

GET /api/latest/async-queues/{queue}?action=qinfo

Description
Returns a list of queue entries on a given queue from the queue ID and an optional status filter
Arguments
  • status: a single SQL status value; see OMQ::SQL_QS_ALL and OMQ::QS_ALL for valid values (takes both short and long status codes); default all statuses except "USED" are returned
  • user: the username to search for
  • user_interaction_locked: 1 or 0 for the user interaction locked status
  • limit: the maximum number of entries to return; default 100
  • offset: the offset to return; default 0
Return value
return either no value or a list of hashes having the following keys:
  • queuekey: (string) the key name
  • queue_data_status: (string) queue entry status:
  • OMQ::QS_Waiting
  • OMQ::QS_Received
  • OMQ::QS_Used
  • OMQ::QS_Error (rarely, in case of unparsable queue data)
  • workflow_instanceid: (int) the workflow instance ID of the queue record
  • stepid: (int) the step ID of the queue record
  • ind: (int) the step index of the queue record
  • user_interaction_locked: (bool) True if locked, False if not
  • user_interaction_user: (string) current user with owning the lock on the queue record, if set
  • user_interaction_modified: (date) the timestamp the user_interaction_user was last updated, if set
  • created: (date) created timestamp for the queue entry
  • modified: (date) modified timestamp for the queue entry
Exceptions
GET-QUEUE-INFO-ERRORqueueid is invalid
INVALID-STATUSstatus is invalid
Note
Queue entries with a "USED" status are only returned if the status argument is "USED" (OMQ::QS_Used) or "X" (OMQ::SQL_QS_Used)

GET /api/latest/async-queues/{queue}?action=status

Description
gives internal queue status (without parameters: for all queues)
Return Value
Hash with info. The top level key is the queue name, and the value is a queue summary hash.

The queue summary hash has the following structure. Key values are strings with the following format: "<workflow name>/<workflow version>" with queue status subkeys and with integer values corresponding to the number of workflows that have queue entries with the given statuses.

Exceptions
UNKNOWN-QUEUEinvalid queue name

POST /api/latest/async-queues/{queue}?action=update

Description
Updates a pending entry in a system queue with status OMQ::QS_Waiting, sets the status to OMQ::QS_Received (params: queue name, key, data). data is stored serialized in YAML format so that type information is preserved when passed to the asynchronous step back end function
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • key value of the key in the given queue
  • data data to post in the queue entry; this data will be passed to the back end function for evaluation
Errors
Exceptions
UNKNOWN-QUEUEinvalid queue name
INVALID-KEYno entry exists in the given queue with the given key value
INVALID-STATUSqueue entry does not have status OMQ::QS_Waiting
WORKFLOW-ACCESS-ERRORthis is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

/api/latest/classes

This REST API path provides actions and information about Qorus class objects

GET /api/latest/classes

Description
Returns a list of hashes of all classes
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of hashes with the following keys (if neither list nor short options are passed as above):
  • classid: the class ID
  • name: the name of the class
  • version: the version of the class
  • description: the description of the class object
  • author: the author of the class object
  • created: the date/time the class object was created
  • modified: the date/time the class object was modified
  • source: the source file that the class object was created from
  • line: the offset in the source file for the source of the class object

GET /api/latest/classes?action=list

Description
Identical to GET /api/classes
See also
GET /api/classes

/api/latest/classes/{id_or_name}

This REST API path provides actions and information about specific class objects

GET /api/latest/classes/{id_or_name}

Description
Returns a hash of information about the current class object
Return Value
This API returns a REST Class Hash

/api/latest/constants

This REST API path provides actions and information about Qorus constant objects

GET /api/latest/constants

Description
Returns a list of hashes of all constant objects
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of hashes with the following keys (if neither list nor short options are passed as above):
  • constantid: the constant ID
  • name: the name of the constant
  • version: the version of the constant
  • description: the description of the constant object
  • author: the author of the constant object
  • created: the date/time the constant object was created
  • modified: the date/time the constant object was modified
  • source: the source file that the constant object was created from
  • line: the offset in the source file for source of the constant object

/api/latest/constants/{id_or_name}

This REST API path provides actions and information about specific constant objects

GET /api/latest/constants/{id_or_name}

Description
Returns a hash of information about the current constant object
Return Value
This API returns a hash with the following keys:
  • name: the name of the constant object
  • version: the version of the constant object
  • constantid: the constant object ID
  • description: the description of the constant object
  • author: the author of the constant object
  • body: the source code for the class object
  • created: the date/time the constant object was created
  • modified: the date/time the constant object was modified
  • createdby: (deprecated) always "omq"
  • modifiedby: (deprecated) always "omq"
  • tags: any user-defined tags on the constant object
  • source: the source file that the constant object was created from
  • offset: the offset in the source file for the source of constant object
  • host: the hostname of the machine where the constant object was loaded from
  • user: the OS user who loaded the constant object

/api/latest/debug

This REST URI path provides actions and information related to Qorus system debugging

/api/latest/debug/development

This REST URI path provides information related to Qorus remote development data

/api/latest/debug/interface-serialization

This REST URI path provides information related to Qorus internal interface action serialization data

/api/latest/debug/order-stats

This REST URI path provides information related to the internal Qorus service cache

/api/latest/debug/order-stats-summary

This REST URI path provides summary information related to internal Qorus order statistics processing data

/api/latest/debug/sync-cache

This REST URI path provides information related to internal Qorus synchronization event cache data

/api/latest/debug/sync-summary

This REST URI path provides information related to internal Qorus synchronization event cache summary info

/api/latest/debug/threads

This REST URI path provides information related to Qorus threads

GET /api/latest/debug/threads

Description
Returns a hash keyed by thread ID where the values are lists describing the call stack for the thread
Return Value
This API returns a hash keyed by thread ID where the values are lists of REST Debug Callstack Hash elements showing the call stack for the thread sorted from most recent to oldest

/api/latest/debug/threads/{tid}

This REST URI path provides actions and information related to a single Qorus thread

GET /api/latest/debug/threads/{tid}

Description
Returns a hash describing the current thread
Return Value
This API returns a list of REST Debug Callstack Hash elements showing the call stack sorted from most recent to oldest

/api/latest/debug/workflow-control

This REST URI path provides information related to Qorus internal workflow control data

/api/latest/development

This URI path provides remote development for Qorus.

GET /api/latest/development

Description
Returns all API paths of development API path.
Return Value
If success 200 OK and list of the all API paths.

/api/latest/development/delete

This URI path provides API to delete interfaces from Qorus.

POST /api/latest/development/delete

Description
Asynchronously creates a delete request and returns id and resource location.
Arguments
This API takes the following argument as method body (all arguments are optional, but at least one must be presented otherwise 400 BAD-REQUEST error will be returned).
  • worklfow: optional; list of workflows to be deleted.
  • wfinstances: optional; list of workflow instances to be deleted.
  • step: optional; list of workflow steps to be deleted.
  • function: optional; list of functions to be deleted.
  • class: optional; list of classes to be deleted.
  • constant: optional; list of constants to be deleted.
  • service: optional; list of services to be deleted.

Each element of the above lists is a hash with the following keys:

  • name: required; name of the interface.
  • version: required; version of the interface. Also each interface can be deleted by providing only its id:
  • id: required; id of the interface.

method: optional; list of services to be deleted. Each element is a hash with the following keys:

  • name: required; name of the service.
  • version: required; version of the service.
  • method-name: required; name of the method. Also method can be deleted by providing only its id:
  • id: required; id of the method.

queue: optional; list of queues to be deleted.

  • job: optional; list of jobs to be deleted.
  • jobinstances: optional; list of job instances to be deleted.
  • event: optional; list of events to be deleted.
  • uconn: optional; list of user connections to be deleted.
  • datasource: optional; list of datasource connections to be deleted.
  • remote: optional; list of remote connections to be deleted.
  • mapper: optional; list of mappers to be deleted.
  • vmap: optional; list of value maps to be deleted.

Each element of the above lists is a hash with the following keys:

  • name: required; name of the value map. Also each interface from the above list (except for all connections) can be deleted by providing only its id:
  • id: required; id of the interface.

options: optional; hash of delete options. List of valid options:

  • reload: reload interfaces in the server
  • verbosity-level: sets verbosity level (greater value = more info)
Note
By default all options are set to False and verbosity level is set to 0.

Example of POST request:

{
"workflow":
[
{
"name" : "workflow1",
"version" : "1.0"
},
{
"id" : "4"
}
],
"method": [
{
"service-name": "service1",
"version": "1.0",
"method-name": "method1"
}
],
"options": {
"reload": true,
"verbosity-level": 2
}
}
Return Value
If success 202 Accepted, resource location and id of the created request is returned. In case of fail 400 bad request error is returned.

/api/latest/development/delete/{id}

This URI path implements delete request to Qorus.

DELETE /api/latest/development/delete/{id}

Description
Cancel a delete request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to be canceled.
Return Value
If success 200 OK, in case of fail one of the error codes: 410, 403, 404 and string of error description.

GET /api/latest/development/delete/{id}

Description
Returns status of a delete request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to obtain status.
Return Value
If success 200 OK and hash of the request status, in case of fail 404 not found error. The status hash has the following keys:
  • status: the status of the request:
    • QUEUED - the request is waiting in the queue
    • IN_PROGRESS - the request is in progress
    • CANCELED - the request has been canceled by the user
    • FAILED - the request has failed
    • FINISHED - the request is finished
  • exit_code: the exit code of the request
  • stderr: the standard error output
  • stdout: the standard output
  • created: the date/time the request was created

/api/latest/development/deploy

This URI path provides remote deployment for Qorus.

POST /api/latest/development/deploy

Description
Asynchronously creates a deployment request and returns id and resource location.
Arguments
This API takes the following argument as method body:
  • files: required; list of files to be deployed. Each element is a hash with in the following format:
    • file_name: string.
    • file_content: base64 encoded string.
  • options: optional; hash of deployment options. List of valid options:
    • allow-redef: allow dangerous workflow redefinitions
    • force: force schema verification/downgrade with user schemas
    • validate: validate all functions recursively
    • reload: reload interfaces in the server
    • verbosity-level: sets verbosity level (greater value = more info)
Note
By default all options are set to False and verbosity level is set to 0.

Example of POST request:

{
"files":
[
{
"file_name": "file1.txt",
"file_content": "dGV4dCBmcm9tIHRtcCAw"
},
{
"file_name": "path/file2.txt",
"file_content": "dGV4dCBmcm9tIHRtcCAx"
},
],
"options": {
"allow-redef": true,
"force": false,
"validate": true,
"reload": true,
"verbosity-level": 2
}
}

File content is base64 encoded. Options parameter is optional.

Return Value
If success 202 Accepted, resource location and id of the created request is returned. In case of fail 400 bad request error is returned.

/api/latest/development/deploy/{id}

This URI path implements deployment request to Qorus.

DELETE /api/latest/development/deploy/{id}

Description
Cancel a deployment request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to be canceled.
Return Value
If success 200 OK, in case of fail one of the error codes: 410, 403, 404 and string of error description.

GET /api/latest/development/deploy/{id}

Description
Returns status of a deployment request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to obtain status.
Return Value
If success 200 OK and hash of the request status, in case of fail 404 not found error. The status hash has the following keys:
  • status: the status of the request:
    • QUEUED - the request is waiting in the queue
    • UPLOADING - the files are uploading
    • UPLOADED - all files are uploaded to the server
    • IN_PROGRESS - the request is in progress
    • CANCELED - the request has been canceled by the user
    • FAILED - the request has failed
    • FINISHED - the request is finished
  • exit_code: the exit code of the request
  • stderr: the standard error output
  • stdout: the standard output
  • created: the date/time the request was created

/api/latest/development/release

This URI path provides remote release for Qorus.

POST /api/latest/development/release

Description
Asynchronously creates a release request and returns id and resource location.
Arguments
This API takes the following argument as method body:
  • files: required; list of files to be released. Files should be archived in tar.bz2 format. Element is a hash with in the following format:
    • file_name: string file name of the archive.
    • file_content: base64 encoded string content of the archive. Archive should contain a .qrf file.
  • options: optional; hash of deployment options. List of valid options:
    • allow-redef: allow dangerous workflow redefinitions
    • force: force schema verification/downgrade with user schemas
    • validate: validate all functions recursively
    • reload: reload interfaces in the server
    • verbosity-level: sets verbosity level (greater value = more info)
Note
By default all options are set to False and verbosity level is set to 0.

Example of POST request:

{
"files":
[{
"file_name": "arch.tar.bz2",
"file_content": "dGV4dCBmcm9tIHRtcCAw"
}],
],
"options": {
"verbosity-level": 2
}
}

File content is base64 encoded. Options parameter is optional.

Return Value
If success 202 Accepted, resource location and id of the created request is returned. In case of fail 400 bad request error is returned.

/api/latest/development/release/{id}

This URI path implements release request to Qorus.

DELETE /api/latest/development/release/{id}

Description
Cancel a release request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to be canceled.
Return Value
If success 200 OK, in case of fail one of the error codes: 410, 403, 404 and string of error description.

GET /api/latest/development/release/{id}

Description
Returns status of a release request with given request id.
Arguments
This API takes the following argument as URI arguments:
  • id: required; id of the request to obtain status.
Return Value
If success 200 OK and hash of the request status, in case of fail 404 not found error. The status hash has the following keys:
  • status: the status of the request:
    • QUEUED - the request is waiting in the queue
    • UPLOADING - the files are uploading
    • UPLOADED - all files are uploaded to the server
    • IN_PROGRESS - the request is in progress
    • CANCELED - the request has been canceled by the user
    • FAILED - the request has failed
    • FINISHED - the request is finished
  • exit_code: the exit code of the request
  • stderr: the standard error output
  • stdout: the standard output
  • created: the date/time the request was created

/api/latest/errors

This URI path provides actions and information related to workflow errors

GET /api/latest/errors

Description
Returns a list of information of workflow errors corresponding to the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • errors: optional; a comma-separated string will be split into a list; the workflow errors
  • filter: optional; if "global" then only global errors will be listed; other values for this argument key are ignored; takes precendence over wf
  • list: optional; parsed with Qore::parse_boolean(); if True then a list of error names is returned
  • short: optional; parsed with Qore::parse_boolean(); if True then a list of short strings with error names and brief info is returned
  • wf: optional; a workflow ID or name to use to filter the results with; ignored if filter = "global"
Return Value
If neither list nor short are used, then this API returns a list of REST Workflow Error Description Hash elements corresponding to the arguments

POST /api/latest/errors

Description
Creates a workflow error
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (optional bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (required string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • forceworkflow: (optional bool) parsed with Qore::parse_boolean(); if True then the workflow error will be created as a workflow-specific error even if no global error exists; default if not present False; only used if workflowid also present
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
  • workflowid: (optional string) an optional workflow ID for potentially creating a workflow-specific workflow error definition
Return Value
This API returns a string giving the result of the operation; one of:
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created
  • "CREATED-GLOBAL": a new global error was created (only possible if forceworkflow is omitted or False) est)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 409 Conflict: ERROR-EXISTS: this exception is thrown if the workflow-specific error definition already exists
Note
  • requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
  • the default behavior of this API is to create a global error if no global error with the error name exists; in this case a workflow-specific error can be forced to be created by using the workflowid and forceworkflow options as described above

POST /api/latest/errors?action=createOrUpdate

Description
Creates or updates a workflow error
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (optional bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (required string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • forceworkflow: (optional bool) parsed with Qore::parse_boolean(); if True then the workflow error will be created as a workflow-specific error even if no global error exists; default if not present False; only used if workflowid also present
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
  • workflowid: (optional string) an optional workflow ID for potentially creating a workflow-specific workflow error definition
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-WORKFLOW": the existing workflow-specific error was updated
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created
  • "UNCHANGED-WORKFLOW": the new workflow-specific definition is identical to the old definition
  • "CREATED-GLOBAL": a new global error was created (only possible if forceworkflow is omitted or False)
  • "UNCHANGED-GLOBAL": the new global definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
  • requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
  • the default behavior of this API is to create a global error if no global error with the error name exists; in this case a workflow-specific error can be forced to be created by using the workflowid and forceworkflow options as described above

PUT /api/latest/errors?action=reload

Description
Reloads all workflow error definitions from the DB
Return Value
This API returns a hash with the following keys:
  • global: gives the number of global error definitions loaded
  • workflow: gives the number of all workflow-specific error definitions loaded
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
See also

GET /api/latest/errors?action=search

Description
Returns a list of information of workflow errors corresponding to the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • errors: a comma-separated string will be split into a list; the workflow errors to search for
Return Value
This API returns a list of REST Workflow Error Description Hash elements corresponding to the arguments

/api/latest/errors/global

This REST URI path provides actions and information related to global workflow errors

GET /api/latest/errors/global

Description
Returns a list of information of global workflow errors
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Workflow Error Description Hash elements for the global workflow errors corresponding to the arguments

POST /api/latest/errors/global

Description
Creates a global workflow error
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (optional bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (required string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a the following string: "CREATED-GLOBAL" indicating that a new global workflow error was created
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ERROR-EXISTS: this exception is thrown if the global workflow error already exists
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL

POST /api/latest/errors/global?action=createOrUpdate

Description
Creates or updates a global workflow error
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-GLOBAL": the existing global error was updated
  • "CREATED-GLOBAL": a new global error was created
  • "UNCHANGED-GLOBAL": the new global definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL

/api/latest/errors/global/{error}

This URI path provides actions and information related to a specific global workflow error

DELETE /api/latest/errors/global/{error}

Description
Permanently deletes the current workflow error
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL

GET /api/latest/errors/global/{error}

Description
Returns a hash of information about the current workflow error
Return Value
Returns a REST Workflow Error Description Hash (REST API v1 and v2)

PUT /api/latest/errors/global/{error}

Description
Updates the current global workflow error with the new definition given as arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (string) the new description of the error
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-GLOBAL": the existing global error was updated
  • "CREATED-GLOBAL": a new global error was created (only possible in case of a race condition where the current error was deleted during this request)
  • "UNCHANGED-GLOBAL": the new global definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
See also

PUT /api/latest/errors/global/{error}?action=update

Description
Updates the current global workflow error with the new definition given as arguments
See also
This API is equivalent to PUT /api/errors/global/{error}; see that documentation for details.

/api/latest/errors/workflow

This URI path provides actions and information related to workflow-specific workflow-specific workflow errors across all workflows

GET /api/latest/errors/workflow

Description
Returns a list of information of workflow-specific workflow errors for all workflows
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Workflow Error Description Hash elements for the workflow errors for the current workflow corresponding to the arguments

/api/latest/errors/workflow/{id_or_name}

This URI path provides actions and information related to workflow-specific workflow errors for a particular workflow

GET /api/latest/errors/workflow/{id_or_name}

Description
Returns a list of information of workflow-specific workflow errors for the current workflow
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Workflow Error Description Hash elements for the workflow errors for the current workflow corresponding to the arguments

POST /api/latest/errors/workflow/{id_or_name}

Description
Creates a workflow-specific workflow error for the current workflow
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (optional bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (required string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a string giving the result of the operation; one of:
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created
  • "CREATED-GLOBAL": a new global error was created (only possible if forceworkflow is omitted or False)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 409 Conflict: ERROR-EXISTS: this exception is thrown if the workflow-specific error definition already exists
Note

POST /api/latest/errors/workflow/{id_or_name}?action=createOrUpdate

Description
Creates or updates a workflow-specific workflow error for the current workflow
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (optional bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (required string) the new description of the error
  • error: (required string) the error string (ex: "SOCKET-SSL-ERROR")
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-WORKFLOW": the existing workflow-specific error was updated
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created
  • "UNCHANGED-WORKFLOW": the new workflow-specific definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note

/api/latest/errors/workflow/{id_or_name}/{error}

This URI path provides actions and information related to a workflow-specific workflow error

DELETE /api/latest/errors/workflow/{id_or_name}/{error}

Description
Permanently deletes the current workflow error
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL

GET /api/latest/errors/workflow/{id_or_name}/{error}

Description
Returns a hash of information about the current workflow error
Return Value
Returns a REST Workflow Error Description Hash

PUT /api/latest/errors/workflow/{id_or_name}/{error}

Description
Updates the current workflow-specific workflow error with the new definition given as arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • business_flag: (bool) parsed with Qore::parse_boolean(); a boolean business flag value (if not present then False is assumed)
  • description: (string) the new description of the error
  • retry_delay_secs: (optional int) an optional retry value in seconds (only accepted if status is set to OMQ::StatRetry)
  • severity: (optional string) a severity code for the error (if not present OMQ::ES_Major is assumed); for possible values see Error Severity Codes
  • status: (optional string) must be one of the following values:
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-WORKFLOW": the existing workflow-specific error was updated
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created (only possible in case of a race condition where the current error was deleted during this request)
  • "UNCHANGED-WORKFLOW": the new workflow-specific definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
See also

PUT /api/latest/errors/workflow/{id_or_name}/{error}?action=update

Description
Updates the current workflow-specific workflow error with the new definition given as arguments
See also
This API is equivalent to PUT /api/v3/errors/workflow/{id_or_name}/{error}; see that documentation for details.

/api/latest/errors/{error}

This URI path provides actions and information related to a specific workflow error

DELETE /api/latest/errors/{error}

Description
Permanently deletes the current workflow error
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL

GET /api/latest/errors/{error}

Description
Returns a hash of information about the current workflow error
Return Value
Returns a REST Workflow Error Description Hash

PUT /api/latest/errors/{error}

Description
Updates the current workflow error with the new definition given as arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a string giving the result of the operation; one of:
  • "UPDATED-WORKFLOW": the existing workflow-specific error was updated
  • "CREATED-WORKFLOW": a new workflow-specific error definition was created (only possible in case of a race condition where the current error was deleted during this request)
  • "UNCHANGED-WORKFLOW": the new workflow-specific definition is identical to the old definition
  • "UPDATED-GLOBAL": the existing global error was updated
  • "CREATED-GLOBAL": a new global error was created (only possible in case of a race condition where the current error was deleted during this request)
  • "UNCHANGED-GLOBAL": the new global definition is identical to the old definition
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ERROR-UPDATE-ERROR: invalid keys or key values provided in the error description hash
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ERROR_CONTROL
See also

PUT /api/latest/errors/{error}?action=update

Description
Updates the current workflow error
See also
This API is equivalent to PUT /api/errors/{error}; see that documentation for details.

/api/latest/exec

This URI path provides actions and information regarding workflow execution instances.

GET /api/latest/exec

Return Value
This API returns a list of hashes with the keys of REST Execution Instance Hash v3, plus the following keys:
  • groups: list of interface groups that the workflow belongs to; each list element is a REST Interface Group Hash (may be empty)
  • alerts: a list of alerts raised against the workflow; each list element is a REST Alert Hash (may be empty)
  • log_url: a complete URL to the websocket source for the workflow log

GET /api/latest/exec?action=list

Description
Returns information about workflow execution instances.
See also
This API is equivalent to GET /api/exec; see that documentation for details.

PUT /api/latest/exec?action=stopAll

Description
Stops all workflow execution instances.
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances stopped
  • workflows: a hash keyed by workflow description where the values are the lists of all execution instance IDs stopped for that workflow
  • msg: a descriptive message about the workflows stopped
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows?action=enable and PUT /api/workflows?action=disable instead of starting and stopping workflow execution instances
Note

PUT /api/latest/exec?action=stopMany

Description
Manually stops one or more workflow execution instances.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • args: (required) one or more workflow names or IDs to stop
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances stopped
  • workflows: a hash keyed by workflow description where the values are the lists of all execution instance IDs stopped for that workflow
  • msg: a descriptive message describing the workflow execution instances that were stopped
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows?action=enable and PUT /api/workflows?action=disable instead of starting and stopping workflow execution instances
Note

/api/latest/exec/{id}

This URI path provides actions and information regarding a particular workflow execution instance.

GET /api/latest/exec/{id}

Return Value
This API returns a hash with the keys of REST Execution Instance Hash v3, plus the following keys:
  • groups: list of interface groups that the workflow belongs to; each list element is a REST Interface Group Hash (may be empty)
  • alerts: a list of alerts raised against the workflow; each list element is a REST Alert Hash (may be empty)
  • log_url: a complete URL to the websocket source for the workflow log

PUT /api/latest/exec/{id}?action=setOptions

Description
Sets workflow options; workflow options are now actually global for the given workflow; this API will set global options against the workflow and not just on the current execution instance level. If the workflow has an option list and any of the options are not valid for that workflow, an exception will be thrown, however, even if an exception is thrown due to an option error, all other options will still be set.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: a hash of options to set against the workflow; if the value of this key is a string, then it is first parsed with Util::parse_to_qore_value(), which should then return a hash
Return Value
This API returns a string confirming that the options have been set.
Errors
  • 400 Bad Request: missing "options" argument or "options" is not a hash (or string parsed to a hash with Util::parse_to_qore_value())
  • 409 Conflict: WORKFLOW-OPTION-ERROR: invalid option for workflow or option cannot be overridden at the workflow level
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
Deprecated:
use PUT /api/workflows/{id_or_name}?action=setOptions instead

PUT /api/latest/exec/{id}?action=stop

Description
Manually stops the workflow execution instance.
Return Value
This API returns "OK" if successful.
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows/{id_or_name}?action=enable and PUT /api/workflows/{id_or_name}?action=disable instead of starting and stopping workflow execution instances
Note

/api/latest/exec/{workflowname}

This URI path provides actions and information about workflow execution instances for a particular workflow.

GET /api/latest/exec/{workflowname}

Return Value
This API returns a list of hashes with the keys of REST Execution Instance Hash v3, plus the following keys:
  • groups: list of interface groups that the workflow belongs to; each list element is a REST Interface Group Hash (may be empty)
  • alerts: a list of alerts raised against the workflow; each list element is a REST Alert Hash (may be empty)
  • log_url: a complete URL to the websocket source for the workflow log

GET /api/latest/exec/{workflowname}?action=desc

Return Value
Returns a string describing the workflow.

PUT /api/latest/exec/{workflowname}?action=setOptions

Description
Sets workflow options; workflow options are now actually global for the given workflow; this API will set global options against the workflow and not on the execution instances. If the workflow has an option list and any of the options are not valid for that workflow, an exception will be thrown, however, even if an exception is thrown due to an option error, all other options will still be set.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: a hash of options to set against the workflow; if the value of this key is a string, then it is first parsed with Util::parse_to_qore_value(), which should then return a hash
Return Value
This API returns a hash keyed by execution instance ID of option set.
Errors
  • 400 Bad Request: missing "options" argument or "options" is not a hash (or string parsed to a hash with Util::parse_to_qore_value())
  • 409 Conflict: WORKFLOW-OPTION-ERROR: invalid option for workflow or option cannot be overridden at the workflow level
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
Deprecated:
use PUT /api/workflows/{id_or_name}?action=setOptions instead

PUT /api/latest/exec/{workflowname}?action=stop

Description
Manually stops the workflow execution instances.
Return Value
This API returns a hash with the following key if there are execution instances:
  • stopped: the value is a descriptive string for the workflow
otherwise it returns a string "no instances to stop".
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows/{id_or_name}?action=enable and PUT /api/workflows/{id_or_name}?action=disable instead of starting and stopping workflow execution instances
Note

/api/latest/functions

This REST API path provides actions and information about Qorus functions

GET /api/latest/functions

Description
Returns a list of hashes of all functions
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of hashes with the following keys (if neither list nor short options are passed as above):
  • name: the name of the function
  • version: the version of the function
  • function_instanceid: the function ID
  • function_type: the type of function object; see Step Function Types for possible values
  • description: the description of the function
  • author: the author of the function
  • created: the date/time the function was created
  • modified: the date/time the function was modified
  • source: the source file that the function object was created from
  • line: the offset in the source file for the source of the function object

GET /api/latest/functions?action=list

Description
Identical to GET /api/functions
See also
GET /api/functions

/api/latest/functions/{id_or_name}

This REST API path provides actions and information about specific functions

GET /api/latest/functions/{id_or_name}

Description
Returns a hash of information about the current function
Return Value
This API returns a REST Function Hash

/api/latest/groups

This URI path provides actions and information related to interface groups

DELETE /api/latest/groups

Description
Permanently deletes one or more interface groups. Changes are committed to the database before the call returns.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • groups: (required) list of strings or a single string; a comma-separated string will be split into a list; the names of the groups to delete
Return Value
This API returns a list of string messages giving the result of each delete operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: GROUPS-DELETE-ERROR: missing groups argument
Note
requires permission OMQ::QR_GROUP_CONTROL or OMQ::QR_DELETE_GROUP
See also

GET /api/latest/groups

Description
Returns a list of hashes of information about interface groups
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); at least one of the following keys must be present:
Return Value
Unless list or short are present, this API returns a list of REST Interface Group Detail Hash elements according to the arguments.
See also

POST /api/latest/groups

Description
Creates a new interface group. If a new group is created with the enabled flag set to False, then workflows, services, and jobs members of the group are stopped immediately if loaded/running. Changes are committed to the database before the call returns.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • group: (string) required; the name of the group
  • desc: (string) required; the description of the group
  • workflows: (list of strings or a single string) optional; a comma-separated string will be split into a list; the list of workflow names or IDs to include in the group
  • services: (list of strings or a single string) optional; a comma-separated string will be split into a list; the list of user service names or IDs to include in the group
  • jobs: (list of strings or a single string) optional; a comma-separated string will be split into a list; the list of job names or IDs to include in the group
  • mappers: (list of strings or a single string) optional; a comma-separated string will be split into a list; the list of mapper names or IDs to include in the group
  • vmaps: (list of strings or a single string) optional; a comma-separated string will be split into a list the list of value map names or IDs to include in the group
  • enabled: (string) this value will be processed by parse_boolean(); the initial enabled flag for the group; if not present defaults to True
Return Value
This API returns a REST Interface Group Detail Hash for the new group
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: WORKFLOW-ERROR: invalid or unknown workflow
  • 409 Conflict: SERVICE-ERROR: invalid or unknown service
  • 409 Conflict: JOB-ERROR: invalid or unknown job
  • 409 Conflict: MAPPER-ERROR: invalid or unknown mapper
  • 409 Conflict: VALUE-MAP-ERROR: invalid or unknown value map
  • 409 Conflict: GROUP-ERROR: missing group or desc arguments
Note
requires permission OMQ::QR_GROUP_CONTROL or OMQ::QR_ADD_GROUP
See also

GET /api/latest/groups?action=list

Description
Returns a list of hashes of information about interface groups
See also
This API is equivalent to GET /api/groups; see that documentation for details.

PUT /api/latest/groups?action=setStatus

Description
Changes the enabled status of one or more interface groups; changes are committed to the database before the call returns
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • groups: (required) one or more group names to modify; a comma-separated string will be split into a list
  • enabled: (required) parsed with Qore::parse_boolean(); the new enabled status for the group(s)
Return Value
This API returns list of descriptive strings for the operations performed
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: GROUPS-SETSTATUS-ERROR: missing groups or enabled arguments
Note
requires permission OMQ::QR_GROUP_CONTROL, OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

/api/latest/groups/{name}

This URI path provides actions and information related to a specific interface group

DELETE /api/latest/groups/{name}

Description
Permanently deletes an interface group; changes are committed to the database before the call returns. When a disabled group is deleted, then any workflows with a positive autostart value, any services with the autostart flag set, and any active jobs are immediately started if the group was previously disabled and the workflow, service, or job is not a member of any other disabled group.
Return Value
This API returns a hash with the following key:
  • info: a string describing the group deletion action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: cannot update group "DEFAULT"
Note
requires permission OMQ::QR_GROUP_CONTROL or OMQ::QR_DELETE_GROUP
See also

GET /api/latest/groups/{name}

Description
Returns a hash of information about the current interface group
Return Value
This API returns a REST Interface Group Detail Hash

PUT /api/latest/groups/{name}

Description
Modifies an existing interface group; changes are committed to the database before the call returns. Changes to groups are effected immediately; for example, if a workflow, service, or job is added to a disabled group, the any corresponding running objects are immediately stopped; or if a job is removed from a disabled group, then it is immediately started, etc
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); at least one of the following keys must be present:
  • desc: (string) the new description of the group
  • workflows: (list of strings or a single string) the list of workflow names to include in the group; the new list will replace the current list unless the workflow names are preceded by "+" or "-", meaning add or remove a workflow, respectively (in which case all workflow names must be preceded by a "+" or "-")
  • services: (list of strings or a single string) the list of user service names to include in the group; the new list will replace the current list unless the user service names are preceded by "+" or "-", meaning add or remove a service, respectively (in which case all service names must be preceded by a "+" or "-")
  • jobs: (list of strings or a single string) the list of job names to include in the group; the new list will replace the current list unless the job names are preceded by "+" or "-", meaning add or remove a job, respectively (in which case all job names must be preceded by a "+" or "-")
  • mappers: (list of strings or a single string) the list of mapper names to include in the group; the new list will replace the current list unless the mapper names are preceded by "+" or "-", meaning add or remove a mapper, respectively (in which case all mapper names must be preceded by a "+" or "-")
  • vmaps: (list of strings or a single string) the list of value map names to include in the group; the new list will replace the current list unless the value map names are preceded by "+" or "-", meaning add or remove a value map, respectively (in which case all value map names must be preceded by a "+" or "-")
  • enabled: (string) this value will be processed by parse_boolean(); enables or disables the group
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Conflict: RBAC-UPDATE-GROUP-ERROR: at least one of desc, services, workflows, jobs, mappers, vmaps, or enabled keys must be passed in the second argument hash to update the group
  • 403 Forbidden: cannot update group "DEFAULT"
Note
requires permission OMQ::QR_GROUP_CONTROL, OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

PUT /api/latest/groups/{name}?action=disable

Description
Disables an interace group; changes are committed to the database before the call returns
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: cannot update group "DEFAULT"
Note
requires permission OMQ::QR_GROUP_CONTROL, OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

PUT /api/latest/groups/{name}?action=enable

Description
Enables an interface group; changes are committed to the database before the call returns
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: cannot update group "DEFAULT"
Note
requires permission OMQ::QR_GROUP_CONTROL, OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

PUT /api/latest/groups/{name}?action=setStatus

Description
Changes the enabled status of an interface group; changes are committed to the database before the call returns
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a hash with the following key:
  • info: a string describing the group enabled status change
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: GROUP-SETSTATUS-ERROR: missing enabled argument
Note
requires permission OMQ::QR_GROUP_CONTROL, OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

PUT /api/latest/groups/{name}?action=update

Description
Modifies an existing interface group; changes are committed to the database before the call returns. Changes to groups are effected immediately; for example, if a workflow, service, or job is added to a disabled group, the any corresponding running objects are immediately stopped; or if a job is removed from a disabled group, then it is immediately started, etc
See also
This API is equivalent to PUT /api/groups/{name}; see that documentation for details.

/api/latest/jobresults

This REST API path provides actions and information about job results (job instances).

GET /api/latest/jobresults

Description
Returns a list of hashes of job result (job instance) information corresponding to the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: optional (parsed as a date); the past cutoff date for the search; only orders with a modified date equal or after this date will be considered; if not present, then defaults to the last 24 hours
  • desc: optional (parsed with Qore::parse_boolean(); determines the sort order; if False then results are sorted in ascending order, if True (the default), results are sorted in descending order (newest first)
  • full: optional (parsed with Qore::parse_boolean(); if True then additional keys are included in each result record; see below for details
  • ids: optional; one or more job IDs to filter the result list; a comma-separated string will be split into a list
  • limit: optional; limits the number of results returned
  • offset: optional; the starting result to return (use when paging for example)
  • sort: optional; a list of columns to sort the output by
  • statuses: optional; job result (job instance) status value(s); a comma-separated string will be split into a list (see Job Data Status Descriptions for possible values)
Return Value
This API returns a list of REST Job Result Hash elements corresponding to the arguments; if the full option is set, then the following additional keys are included in each hash:
  • errors: a list of hashes of errors and warnings raised by the job; each list element has the following keys:
    • job_errorid: the unique ID for the error instance
    • severity: an error severity code (see Error Severity Codes for possible values)
    • error: the error code string
    • description: description for the error (if any)
    • info: additional information about the error (if any)
    • business_error: a boolean flag indicating of the error is a business error
    • created: the date and time the error was raised
  • audit: a list of one or more REST Audit Info Hash elements (can be empty)

GET /api/latest/jobresults?action=overview

Description
Returns aggregate job result information corresponding to the arguments.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: optional (parsed as a date); the past cutoff date for the search; only orders with a modified date equal or after this date will be considered; if not present, then defaults to the last 24 hours
  • sqlcache: optional (parsed with Qore::parse_boolean()); if False then no SQL cache will be used for historical info; default True
  • combined: if True then all results are combined into one global hash for all queried jobs
  • jobs: one or more job names or IDs to filter the result list; a comma-separated string will be split into a list
Return Value
This API returns a hash keyed by job name; values are hashes keyed by job status value (see Job Data Status Descriptions for possible values) and the values are integer job result (job instance) counts having the given status (unless combined is set, described above)
Example Return Value
myjob_1 : hash: (2 members)
  ERROR : 1
  COMPLETE : 3
myjob_2 : hash: (2 members)
  IN-PROGRESS : 1
  COMPLETE : 8

/api/latest/jobresults/{id}

This REST API path provides actions and information about specific job results (job instances).

GET /api/latest/jobresults/{id}

Description
Returns a hash of job result (job instance) information
Return Value
This API returns a REST Job Result Hash with the following additional keys:
  • errors: a list of hashes of errors and warnings raised by the job; each list element has the following keys:
    • job_errorid: the unique ID for the error instance
    • severity: an error severity code (see Error Severity Codes for possible values)
    • error: the error code string
    • description: description for the error (if any)
    • info: additional information about the error (if any)
    • business_error: a boolean flag indicating of the error is a business error
    • created: the date and time the error was raised
  • audit: a list of one or more REST Audit Info Hash elements (can be empty)

/api/latest/jobs

This REST API path provides actions and information related to Qorus jobs.

GET /api/latest/jobs

Description
Returns information about Qorus jobs according to the arguments; only jobs accessible to the calling user are returned
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • defonly: optional (parsed with Qore::parse_boolean()); if True then no job result information will be included in the return value; default False
  • date: optional (parsed as a date); the past cutoff date for job result (job instances) for the return value; if not present, then defaults to the last 24 hours
  • jobs: one or more job names or IDs to filter the result list; a comma-separated string will be split into a list
  • lib_source: optional; parsed with Qore::parse_boolean(); if True then the source code for each library object is returned in the REST Job Description Hash
  • list: optional; parsed with Qore::parse_boolean(); if True then a list of job names is returned
  • short: optional; parsed with Qore::parse_boolean(); if True then a list of short strings of job names and descriptions is returned
  • sqlcache: optional (parsed with Qore::parse_boolean()); if False then no SQL cache will be used for historical info; default True (only used if defonly is omitted or False)
  • status: options; either "active" or "inactive" to filter jobs based on their active status
Return Value
If neither list nor short are used, then this API returns a list of REST Job Description Hash v2 elements; if defonly is not True, then any jobs with job result data within the given time period (as defined by the date option) will be reflected in the following extra keys:
  • IN-PROGRESS: the number of job instances currently in progress
  • COMPLETE: the number of job instances with a OMQ::StatComplete status during the given time period
  • ERROR: the number of job instances with a OMQ::StatError status during the given time period

DELETE /api/latest/jobs?action=defaultLogger

Description
Delete logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/jobs?action=defaultLogger

Description
Returns default logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) interface table name (jobs/workflows/services). If set means default logger

POST /api/latest/jobs?action=defaultLogger

Description
Create default Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/jobs?action=defaultLogger

Description
Set logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/jobs?action=defaultLoggerAppenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/jobs?action=defaultLoggerAppenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/jobs?action=defaultLoggerAppenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/jobs?action=defaultLoggerAppenders

Description
Return all logger appenders
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

PUT /api/latest/jobs?action=disable

Description
Disables one or more jobs.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more job names or IDs to disable; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • arg: the job ID or name (the argument passed as input)
  • disabled: True means the job was disabled, False means it was not
  • info: an informative string giving a description of the result or an error message
  • [jobid]: the job ID
  • [name]: the name of the job
  • [version]: the version of the job
Errors
  • 409 Conflict: JOB-DISABLE-ERROR: missing ids argument
See also

PUT /api/latest/jobs?action=enable

Description
Enables one or more disabled jobs.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more job names or IDs to enable; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • arg: the job ID or name (the argument passed as input)
  • enabled: True means the job was enabled, False means it was not
  • info: an informative string giving a description of the result or an error message
  • [jobid]: the job ID
  • [name]: the name of the job
  • [version]: the version of the job
Errors
  • 409 Conflict: JOB-ENABLE-ERROR: missing ids argument
Note
requires permission OMQ::QR_JOB_CONTROL, OMQ::QR_GROUP_CONTROL, or OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

GET /api/latest/jobs?action=list

Description
Returns information about Qorus jobs according to the arguments; only jobs accessible to the calling user are returned
See also
This API is equivalent to GET /api/jobs; see that documentation for details.

PUT /api/latest/jobs?action=reset

Description
Reloads one or more jobs from the database; if the job is currently running it is stopped and reloaded. This API works on all jobs regardless of state; the job does not have to be running or active to be reset.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more job names or IDs to reset; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes with the following keys:
  • arg: the job ID or name (the argument passed as input)
  • reset: True means the job was reset, False means it was not
  • info: an informative string giving a description of the result or an error message
  • [jobid]: the job ID
  • [name]: the name of the job
  • [version]: the version of the job
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_RESET_JOB
See also

PUT /api/latest/jobs?action=run

Description
Runs one or more jobs and returns the results of job execution
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more job names or IDs to run; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes with the following keys:
  • arg: the job ID or name (the argument passed as input)
  • run: True means the job was run, False means it was not
  • info: an informative string giving a description of the result or an error message
  • [jobid]: the job ID
  • [name]: the name of the job
  • [version]: the version of the job
  • [job_instanceid]: the job_instanceid of the job executed
  • [status]: the status of the execution of the job; see Job Data Status Descriptions for possible values
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_RUN_JOB
See also

/api/latest/jobs/{id_or_name}

This REST API path provides actions and information related to specific jobs; the name can also be provided in the format name:version.

GET /api/latest/jobs/{id_or_name}

Description
Returns a hash of job information
Return Value
Returns a REST Job Description Hash v2 for the current job, plus the following key:
  • state: a hash of job state data (if any)
Errors
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)

PUT /api/latest/jobs/{id_or_name}?action=disable

Description
Disables the current job.
Return Value
This API returns a hash with the following keys:
  • name: the job name
  • version: the job version
  • jobid: the job ID
  • info: info about the job disable action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
Note

PUT /api/latest/jobs/{id_or_name}?action=enable

Description
Enables the current job if it is disabled.
Return Value
This API returns a hash with the following keys:
  • name: the job name
  • version: the job version
  • jobid: the job ID
  • info: info about the job enable action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
Note

POST /api/latest/jobs/{id_or_name}?action=kill

Description
Kills a remote job cluster process
Return Value
This API returns a hash with the following keys:
  • status: "OK", "ERR" if not
  • code: the return code of the kill() command: 0 if successful, non-zero if not
Errors
  • 404 Not Found: this response is returned if no process is running for the current workflow
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

PUT /api/latest/jobs/{id_or_name}?action=reset

Description
Reloads a job from the database; if it is currently running it is stopped and reloaded. This API works on all jobs regardless of state; the job does not have to be running or active to be reset.
Return Value
This API returns a descriptive string; ex: started jobid 7 "myjob1" after reset
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
  • 409 Conflict: API-CALL-ERROR: cannot reset a disabled job
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_RESET_JOB
See also
omq.system.job.reset()

PUT /api/latest/jobs/{id_or_name}?action=run

Description
Runs a job and returns the results of job execution
Return Value
This API returns a hash with the following keys:
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_RUN_JOB
See also
omq.system.job.run()

PUT /api/latest/jobs/{id_or_name}?action=schedule

Description
Updates the schedule for the current job from the arguments. This API works on all jobs regardless of state; the job does not have to be running or active to be updated.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • schedule: a cron-like string giving the job schedule, see Job Cron Schedule for information about the format; either this parameter or duration must be present, but not both
  • duration: a duration in seconds for triggering the job; either this parameter or schedule must be present, but not both; the duration must be less than 10^7.
Return Value
This API returns a hash with the following keys:
  • jobid: the job ID
  • name: the job name
  • [schedule]: (if used as the argument) the new job schedule
  • [duration]: (if used as the argument) the new job duration
  • info: a string giving a description of the result of the operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
  • 409 Conflict: JOB-SCHEDULE-ERROR: neither schedule nor duration parameters given
  • 409 Conflict: CRON-ERROR: cron schedule cannot be parsed or 0 second (or non-integer) duration given
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_RESCHEDULE_JOB
See also
omq.system.job.schedule()

PUT /api/latest/jobs/{id_or_name}?action=setActive

Description
Updates the "active" status of a job; if any errors occur an exception is thrown. This API works on all jobs regardless of state; the job does not have to be running or active to be updated.

Updating a job to active will start the job immediately unless the expiry date is past or the job is a member of a disabled group. Changing a currently-active job to inactive will stop the job immediately
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a hash with the following keys:
  • jobid: the job ID
  • name: the job name
  • active: the new active state of the job
  • info: a descriptive string; ex: jobid 7 "myjob1" is already active and running
  • db_active: the active state in the DB (can differ from active if the job cannot be started for example)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
  • 409 Conflict: JOB-ERROR: cannot set expired jobs to active
See also
omq.system.job.set-active()

PUT /api/latest/jobs/{id_or_name}?action=setExpire

Description
Identical to PUT /api/jobs/{id_or_name}?action=setExpiry

PUT /api/latest/jobs/{id_or_name}?action=setExpiry

Description
Updates the expiry date of a job; if any errors occur an exception is thrown. This API works on all jobs regardless of state; the job does not have to be running or active to be updated.

Removing the expiry date or setting a future expiry date from a job that is not started because it has expired will result in the job starting immediately (unless the job is inactive or a member of a disabled group. Setting a past expiry date on a currently-active job will stop the job immediately.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: (optional) parsed as a date; the expiry date of the job; if not present any expiry date will be removed
Return Value
This API returns a hash with the following keys:
  • jobid: the job ID
  • name: the job name
  • expiry_date: the new expiry date for the job
  • info: a descriptive string; ex: jobid 7 "myjob1", expiry date: null, updated expiry date for running job
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_MODIFY_JOB_EXPIRY
See also
omq.system.job.set-expiry()

PUT /api/latest/jobs/{id_or_name}?action=setOptions

Description
Sets the options given in the hash on the current job; the job must be active or an exception is raised. Options set override the system options of the same name. Only system options valid for jobs may be set. If an exception is thrown due to an option error, all other options will still be set.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: a hash of options to set on the job; if the value of this key is a string, then it is first parsed with Util::parse_to_qore_value(), which should then return a hash
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "options" argument or "options" is not a hash (or string parsed to a hash with Util::parse_to_qore_value())
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
  • 409 Conflict: JOB-ERROR: the current job is not active
  • 409 Conflict: JOB-OPTION-ERROR invalid option
Note
requires permission OMQ::QR_JOB_CONTROL or OMQ::QR_SET_JOB_OPTIONS
See also
omq.system.job.set-options()

PUT /api/latest/jobs/{id_or_name}?action=setRemote

Description
Sets the remote value for the current job.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • remote: (required) parsed with Qore::parse_boolean(); a boolean value giving the new remote value for the job
Return Value
This API returns a hash with the following keys:
  • updated: True or False
  • remote: the new remote value
  • info: info about the job update action
Errors
  • 403 Forbidden: JOB-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given job (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
  • requires permission OMQ::QR_JOB_CONTROL
  • jobs that have their remote value changed are temporarily disabled and then reenabled after the change

PUT /api/latest/jobs/{id_or_name}?action=setStateData

Description
Provides an API for externally updating job state data
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • data: a hash of new job state data or NOTHING which will clear any data
Return Value
This API returns the new data or NOTHING if the data is cleared
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: the user does not have the right to access the given job (for more information, see Interface Groups)
Note
requires permission OMQ::QR_JOB_CONTROL
See also

/api/latest/jobs/{id_or_name}/config

This REST URI path provides actions and information related to Qorus job configuration items

GET /api/latest/jobs/{id_or_name}/config

Description
Returns a list of job configuration items for the job
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "value": the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "level": the level from where the value is obtained (interface level (e.g. "job:1", "job:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: JOB-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given job (for more information, see Interface Groups)

GET /api/latest/jobs/{id_or_name}/config?action=yaml

Description
Returns a list of job configuration items for the job as a YAML-serialized string
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (YAML-serialized string) the default value of the configuration item
  • "value": (YAML-serialized string) the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string)
  • "level": the level from where the value is obtained (interface level (e.g. "job:1", "job:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded

/api/latest/jobs/{id_or_name}/config/{name}

This REST URI path provides actions and information related to a particular Qorus job job configuration item

DELETE /api/latest/jobs/{id_or_name}/config/{name}

Description
Permanently deletes the current value for the configuration item on this job level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value: deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

GET /api/latest/jobs/{id_or_name}/config/{name}

Description
Returns a hash for the current job configuration item
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "value": the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "level": the level from where the value is obtained (interface level (e.g. "job:1", "job:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)

PUT /api/latest/jobs/{id_or_name}/config/{name}

Description
Sets the value for the given job configuration item
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value: the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 404 Bad Request: returned if the request has no value key
Note

PUT /api/latest/jobs/{id_or_name}/config/{name}?action=yaml

Description
Sets the value for the given job configuration item using a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: (YAML-serialized string) the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value (YAML-serialized string): the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: JOB-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 404 Bad Request: returned if the request has no value key
Note

GET /api/latest/jobs/{id_or_name}/config/{name}?action=yaml

Description
Returns a hash for the current job configuration item as a serialized YAML string
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (YAML-serialized string) the default value of the configuration item
  • "value": (YAML-serialized string) the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string)
  • "level": the level from where the value is obtained (interface level (e.g. "job:1", "job:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)

DELETE /api/latest/jobs/{id_or_name}/config/{name}?action=yaml

Description
Permanently deletes the current value for the configuration item on this job level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value (YAML-serialized string): deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

/api/latest/jobs/{id_or_name}/results

This REST API path provides actions and information related to the results of specific jobs.

GET /api/latest/jobs/{id_or_name}/results

Description
Returns a list of hashes of job result (job instance) information for the current job corresponding to the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: optional (parsed as a date); the past cutoff date for the search; only orders with a modified date equal or after this date will be considered; if not present, then defaults to the last 24 hours
  • desc: optional (parsed with Qore::parse_boolean(); determines the sort order; if False then results are sorted in ascending order, if True (the default), results are sorted in descending order (newest first)
  • full: optional (parsed with Qore::parse_boolean(); if True then additional keys are included in each result record; see below for details
  • ids: optional; one or more job instance IDs to filter the result list; a comma-separated string will be split into a list
  • limit: optional; limits the number of results returned
  • offset: optional; the starting result to return (use when paging for example)
  • sort: optional; a list of columns to sort the output by
  • statuses: optional; job result (job instance) status value(s); a comma-separated string will be split into a list (see Job Data Status Descriptions for possible values)
Return Value
This API returns a list of REST Job Result Hash elements corresponding to the arguments; if the full option is set, then the following additional keys are included in each hash:
  • errors: a list of hashes of errors and warnings raised by the job; each list element has the following keys:
    • job_errorid: the unique ID for the error instance
    • severity: an error severity code (see Error Severity Codes for possible values)
    • error: the error code string
    • description: description for the error (if any)
    • info: additional information about the error (if any)
    • business_error: a boolean flag indicating of the error is a business error
    • created: the date and time the error was raised
  • audit: a list of one or more REST Audit Info Hash elements (can be empty)

GET /api/latest/jobs/{id_or_name}/results?action=overview

Description
Returns aggregate job result information for the current job corresponding to the arguments.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: optional (parsed as a date); the past cutoff date for the search; only orders with a modified date equal or after this date will be considered; if not present, then defaults to the last 24 hours
  • sqlcache: optional (parsed with Qore::parse_boolean()); if False then no SQL cache will be used for historical info; default True
  • combined: if True then all results are combined into one global hash for all queried jobs
Return Value
This API returns a hash keyed by job name; values are hashes keyed by job status value (see Job Data Status Descriptions for possible values) and the values are integer job result (job instance) counts having the given status (unless combined is set, described above)
Example Return Value
myjob_1 : hash: (2 members)
  ERROR : 1
  COMPLETE : 3
myjob_2 : hash: (2 members)
  IN-PROGRESS : 1
  COMPLETE : 8

/api/latest/logout

This REST API path provides the logout action

POST /api/latest/logout

Description
Removes the token of the current session.
Arguments
None
Return Value
None

/api/latest/logs

This REST URI path provides actions and information related to Qorus system logs and websocket log sources

GET /api/latest/logs

Description
Returns a list of hashes of system log file and websocket URL information
Return Value
This API returns a list of hashes with the following keys:
  • type: one of the following values:
    • "system": the main system log file
    • "audit": the system audit log file
    • "http": the HTTP log file
    • "mon": the system monitoring log file
    • "alert": the system alert log file
    • "workflow": a workflow log file
    • "service": a service log file
    • "job": a job log file
    • "qdsp": a qdsp process log file
  • log: the log file path on the host filesystem
  • log_url: the websocket log URL for the log file
  • [name]: (for workflows, services, and jobs) the name of the interface
  • [version]: (for workflows, services, and jobs) the version of the interface
  • [workflowid]: (for workflows) the ID of the workflow
  • [serviceid]: (for services) the ID of the service
  • [jobid]: (for jobs) the ID of the job
  • [servicetype]: (for services) the type of the service ("system" or "user")

GET /api/latest/logs?action=list

Description
Returns a list of hashes of system log file and websocket URL information
See also
This API is equivalent to GET /api/logs; see that documentation for details.

/api/latest/mappers

This URI path provides actions and information related to system mappers

GET /api/latest/mappers

Description
Returns a list of hashes describing all accessible system mappers
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Mapper Description Hash elements; if the full option is used, then each hash has the following additional keys:
  • option_source: a hash of the source for the "opts" key
  • field_source: a hash of the source for the actual mapper logic itself; keys are output field names

PUT /api/latest/mappers?action=reload

Description
Reloads the mappers given in the ids argument from the DB
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) a comma-separated string will be split into a list; the mapper names or IDs to reset
Return Value
This API returns a list of the mapper IDs reset
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: MAPPER-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given mapper (for more information, see Interface Groups)
  • 409 Conflict: MAPPER-ERROR: invalid or unknown mapper
Note
requires permission OMQ::QR_MAPPER_CONTROL or OMQ::QR_RELOAD_MAPPER
See also
PUT /api/mappers?action=reloadAll

PUT /api/latest/mappers?action=reloadAll

Description
Reloads all accessible system mappers
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: MAPPER-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given mapper (for more information, see Interface Groups)
Note
requires permission OMQ::QR_MAPPER_CONTROL or OMQ::QR_RELOAD_MAPPER
See also
PUT /api/mappers?action=reload

/api/latest/mappers/{id_or_name}

This URI path provides actions and information related to a specific system mapper

GET /api/latest/mappers/{id_or_name}

Description
Returns a hash describing the current system mapper
Return Value
This API returns a REST Mapper Description Hash with the following additional keys:
  • option_source: a hash of the source for the "opts" key
  • field_source: a hash of the source for the actual mapper logic itself; keys are output field names
Errors
  • 409 Conflict: MAPPER-ERROR: invalid or unknown mapper
  • 403 Forbidden: MAPPER-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given mapper (for more information, see Interface Groups)

PUT /api/latest/mappers/{id_or_name}?action=reload

Description
Reloads the current mapper from the DB
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: MAPPER-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given mapper (for more information, see Interface Groups)
Note
requires permission OMQ::QR_MAPPER_CONTROL or OMQ::QR_RELOAD_MAPPER

/api/latest/mappertypes

This REST URI path provides actions and information related to all mapper types

See also
qorus.mapper-modules

GET /api/latest/mappertypes

Description
Returns a list of hashes describing the system mapper types
Return Value
This API returns a list of REST Mapper Type Description Hash elements

/api/latest/mappertypes/{name}

This REST URI path provides actions and information related to a specific mapper type

See also
qorus.mapper-modules

GET /api/latest/mappertypes/{name}

Description
Returns a hash describing the current system mapper type
Return Value
This API returns a REST Mapper Type Description Hash

/api/latest/orders

This URI path provides information and actions related to workflow order data.

GET /api/latest/orders

Description
Returns a list of hashes for orders for the current workflow matching the search criteria
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: an alternate key for modified
  • desc: return in descending order
  • ids: an alternate key for workflow_instanceid
  • key: an alternate key for keyname
  • keyname: the name of a search key to be used with the keyvalue value(s)
  • keyvalue: the value(s) of workflow order search key(s) to use (optionally used in conjunction with keyname)
  • limit: max number of rows to return, if not given, then the value of the "row-limit" option is used (default: 100)
  • maxmodified: maximum modified date
  • maxstarted: maximum start date
  • minstarted: minimum start date
  • modified: minimum modified date; if this key is not sent with the request, and no keyvaue, keyname or workflow_instanceid keys are sent, then a value one week before the time of the request is assumed
  • offset: row offset
  • sort: columns for sorting the results
  • status: status value(s) (see Workflow, Segment, and Step Status Descriptions for possible values)
  • statuses: an alternate key for status
  • wfid: an alternate key for workflowid
  • workflowid: one or more workflow IDs
  • workflow_instanceid: workflow_instanceid values(s)
Return Value
This API returns NOTHING if no orders match or a list of hashes with the following keys for all data matched according to the search arguments:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow order instance ID
  • workflowid: the workflow ID
  • workflowstatus: the status of the workflow order instance (see Workflow, Segment, and Step Status Descriptions for possible values)
  • status_sessionid: the application session ID that owns the workflow order instance data or 0 if the data is now owned by any application session
  • started: the start date/time of the workflow order instance
  • completed: the completed date/time for the workflow order instance
  • modified: the last modified date/time of the workflow order instance
  • parent_workflow_instanceid: the parent workflow order ID if present
  • synchronous: if 1, indicates that the order is being executed synchronously
  • business_error: a boolean flag indicating if the workflow order has an error status due to a business error
  • operator_lock: a string giving the username of the user with an operator lock on the order
  • note_count: the number of notes stored against the order
  • warning_count: the number of warnings raised against the order
  • error_count: the number of errors raised against the order
  • custom_status: a custom status for the order
  • priority: the priority of the workflow order
  • scheduled: the future scheduled date for the workflow order (if any)
  • custom_status_desc: a description for the custom status (if any)
  • actions: a list of possible actions on the workflow

PUT /api/latest/orders?action=block

Description
Blocks a list of workflow order data instances. The operation will fail on workflow orders with status OMQ::StatInProgress. No further processing can be done on workflow order data instances with a OMQ::StatBlocked status (unless the workflow instance is recovered back from OMQ::StatBlocked or the status is first updated to OMQ::StatError and then to OMQ::StatRetry).
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow instance IDs to block; a comma-separated string will be split into a list
Return Value
This API returns a hash where the top-level key is the workflow_instanceid, and each value is either an exception string (indicating that the operation for that workflow_instanceid failed) or a hash with the following key:
  • workflow_status: the status of the workflow order
Failure reasons include:
  • "BLOCK-WORKFLOW-ERROR": invalid status, foreign session id, missing original status, unblock operation already in progress
  • "WORKFLOW-ACCESS-ERROR": the user does not have the right to access the given workflow (for more information, see Interface Groups)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_BLOCK_WORKFLOW_ORDER
See also

PUT /api/latest/orders?action=cancel

Description
Cancels one or more workflow order data instances by changing the status for the workflow order data instances to OMQ::StatCanceled. The operation will fail if the workflow order status is OMQ::StatInProgress. No further processing can be done on workflow order data instances with a OMQ::StatCanceled status (unless the workflow instance is recovered back from OMQ::StatCanceled or th e status is first updated to OMQ::StatError and then to OMQ::StatRetry).
Return Value
This API returns a hash where the top-level key is the workflow_instanceid, and each value is either an exception string (indicating that the operation for that workflow_instanceid failed) or a hash with the following key:
  • workflow_status: the status of the workflow order
Errors
  • 409 Conflict: CANCEL-WORKFLOW-ERROR: invalid status, foreign session id, missing original status, uncancel operation already in progress
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_CANCEL_WORKFLOW_ORDER
See also

GET /api/latest/orders?action=listErrors

Description
Returns information about workflow order errors corresponding to the search arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • orderby: one or more field names for sorting the output
  • error: the error text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • description: the description text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • info: the info text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given
  • stepid: limit the search to one or more stepids
  • severity: limit the search to one or more severity values
  • name: limit the search to one or more step names
  • version: limit the search to one or more step versions
  • retry: limit the search to errors with or without the retry flag
  • business_error: limit the search to errors with or without the business_error flag
  • workflow_instanceid: limit the search to one or more workflow_instanceids
  • error_instanceid: limit the search to one or more error_instanceids
  • mindate: give the lower date range for the error search
  • maxdate: give the upper date range for the error search
  • workflowid: limit the search to one or more workflowids
  • workflowstatus: limit the search to workflow instances with the given status value(s)
  • limit: the maximum number of errors to return
  • offset: the starting error to return (use when paging for example)
Return Value
This API returns a list of hashes with the following keys for all data matched according to the search arguments:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow instance ID
  • workflowid: the workflow ID
  • stepid: the step ID where the error occurred
  • stepname: the name of the step where the error occurred
  • stepversion: the version of the step where the error occurred
  • ind: the array step index number where the error occurred
  • workflowstatus: current status of the workflow (see Workflow, Segment, and Step Status Descriptions for possible values)
  • started: the date and time when the workflow order started processing
  • completed: the date and time when the workflow order was completed
  • parent_workflow_instanceid: any parent workflow instance ID
  • custom_status: the custom status of the workflow order, if any
  • priority: the priority of the workflow order
  • scheduled: any scheduled date for the workflow order
  • error_instanceid: the error instance ID
  • error: the error code string
  • description: a description for the error (if any)
  • info: additional information about the error (if any)
  • severity: an error severity code (see Error Severity Codes for possible values)
  • created: the date and time the error was raised
  • retry: the retry count of the error
  • business_error: a boolean flag indicating of the error is a business error
  • custom_status_desc: a descriptive string for the custom status (if any)

GET /api/latest/orders?action=processingSummary

Description
Returns information about workflow processing.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • mindate: (required) minimum date
  • maxdate: maximum date
  • wfids: optional workflow IDs
  • seconds: if True then the performance values will be returned as arbitrary-precision numeric values representing seconds, otherwise they will be returned as relative date/time values
  • global: if True then all workflows will be combined into an overall processing report, if False then each workflow gets a separate line in the output
  • grouping: (optional) possible values for reporting performance statistics:
    • "hourly": hourly grouping
    • "daily": daily grouping
    • "monthly": monthly grouping
    • "yearly": yearly grouping
Return Value
This API returns a list of hashes with the following keys for all data matched according to the search arguments:
  • workflowid: the workflow ID
  • name: the workflow name
  • version: the workflow version
  • count: the number of workflow orders in the period
  • minstarted: the minimum workflow order start date
  • maxcompleted: the maximum workflow order completion date (if any)
  • minduration: the minimum total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • avgduration: the average total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • maxduration: the maximum total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • minprocessing: the minimum order processing time for workflow orders in the period (starting from when then order was first processed)
  • avgprocessing: the average order processing time for workflow orders in the period (starting from when then order was first processed)
  • maxprocessing: the maximum order processing time for workflow orders in the period (starting from when then order was first processed)
Errors
  • 409 Conflict: ARGUMENT-ERROR: missing mindate

DELETE /api/latest/orders?action=purgeSensitiveData

Description
Deletes sensitive data according to the arguments given
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • skey: (optional) the sensitive data key type; if passed, then svalue must be included
  • svalue: (optional) the sensitive data key value; if passed then skey must be included
  • force: (optional) allows sensitive data to be deleted for workflow orders with statuses other than OMQ::StatComplete or OMQ::StatCanceled
  • maxmodified: (optional) maximum modified date of the workflow order
  • maxstarted: (optional) maximum start date of the workflow order
  • minstarted: (optional) minimum start date of the workflow order
  • modified: (optional) minimum modified date of the workflow order
  • status: (optional) workflow order status value(s)
  • workflow_instanceid: (optional) workflow_instanceid values(s)
  • workflowid: (optional) workflowid values(s)
  • workflowname: (optional) all accessible versions of the given workflow name
Return Value
A list of hashes for matched workflow orders that correspond to the arguments; each hash element has keys as follows:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow order instance ID
  • workflowid: the workflow ID
  • workflowstatus: the status of the workflow order instance
  • status_sessionid: the application session ID that owns the workflow order instance data or 0 if the data is now owned by any application session
  • started: the start date/time of the workflow order instance
  • completed: the completed date/time for the workflow order instance
  • modified: the last modified date/time of the workflow order instance
  • parent_workflow_instanceid: the parent workflow_instanceid if the workflow is a child workflow order
  • synchronous: the synchronous flag for the workflow order instance
  • business_error: the business error flag for the workflow order instance
  • archive: the archive flag for the workflow order instance (presented only if it goes from archive datasource)
  • operator_lock: the username of the user owning the lock on the workflow order instance data
  • note_count: the number of notes attached to the workflow order instance
  • warning_count: the warning count of the workflow order instance
  • error_count: the error count of the workflow order instance
  • custom_status: any custom status for the workflow order instance
  • priority: the priority of the workflow order instance
  • scheduled: the scheduled date for the workflow order instance
  • archive: if retrieved from the archive datasource
  • skey: the sensitive data key type
  • svalue: the sensitive data value; if the svalue key is given in the request, then it's returned decoded, otherwise the encoded version is returned'
  • sensitive_data: the sensitive data hash for the given key and value
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: the request to search for sensitive data arrived over a non-encrypted network connection or skey included without svalue or svalue included without skey
  • 409 Conflict: INVALID-WORKFLOW: the name given in the workflowname parameter does not correspond to a known workflow
  • 409 Conflict: ORDER-STATUS-ERROR: a status other than OMQ::StatComplete or OMQ::StatCanceled was passed and the force option was not given and the workflow_instanceid option was used
Note
  • requires permission OMQ::QR_DELETE_SENSITIVE_DATA or OMQ::QR_SENSITIVE_DATA_CONTROL
  • sensitive data can only be queried over a secure connection
  • the ORDER-STATUS-ERROR is only thrown if the force option is not True and the workflow_instanceid option is used, otherwise ineligible orders are ignored
  • this method operates on the system schema and any archiving schema, treating both as a single unified schema transparently
  • this method is not implemented in the system.info service to avoid inadvertent logging of sensitive data
See also

PUT /api/latest/orders?action=retry

Description
Retries the given workflow order instances. In order to make a retry; the workflow order status for each order must be OMQ::StatError, OMQ::StatAsyncWaiting, or OMQ::StatRetry.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow instance IDs to retry; a comma-separated string will be split into a list
Return Value
This API returns a hash where the top level key is the workflow_instanceid, and the value is either an exception string (indicating that the operation failed) or a hash with the following keys:
  • steps_updated: (deprecated) always 0 in this version of Qorus
  • segments_updated: the number of segments updated
  • workflow_updated: always True in this version of Qorus
  • workflow_status: always OMQ::StatRetry in this version of Qorus
  • cached: True if the workflow data is currently cached
Failure reasons include:
  • "STATUS-ERROR": workflow data does not have OMQ::StatError, OMQ::StatAsyncWaiting, or OMQ::StatRetry status
  • "SESSION-ERROR": cannot change status for workflow data managed by another Qorus instance (foreign session ID)
  • "RETRY-ERROR": invalid workflow instance ID
  • "WORKFLOW-ACCESS-ERROR": the user does not have the right to access the given workflow (for more information, see Interface Groups)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_RETRY_WORKFLOW_ORDER

GET /api/latest/orders?action=searchSensitiveData

Description
Searches for sensitive data according to the arguments given
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • skey: (required) the sensitive data key type
  • svalue: (required) the sensitive data key value
  • desc: (optional) return in descending order
  • maxmodified: (optional) maximum modified date of the workflow order
  • maxstarted: (optional) maximum start date of the workflow order
  • minstarted: (optional) minimum start date of the workflow order
  • modified: (optional) minimum modified date of the workflow order
  • limit: (optional) max number of rows to return, if not given, then the value of the "row-limit" option is used (default: 100)
  • offset: (optional) row offset
  • sort: (optional) columns for sorting the results
  • status: (optional) workflow order status value(s)
  • workflow_instanceid: (optional) workflow_instanceid values(s)
  • workflowid: (optional) workflowid values(s)
  • workflowname: (optional) all accessible versions of the given workflow name
Return Value
A list of hashes for matched workflow orders that correspond to the arguments; each hash element has keys as follows:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow order instance ID
  • workflowid: the workflow ID
  • workflowstatus: the status of the workflow order instance
  • status_sessionid: the application session ID that owns the workflow order instance data or 0 if the data is now owned by any application session
  • started: the start date/time of the workflow order instance
  • completed: the completed date/time for the workflow order instance
  • modified: the last modified date/time of the workflow order instance
  • parent_workflow_instanceid: the parent workflow_instanceid if the workflow is a child workflow order
  • synchronous: the synchronous flag for the workflow order instance
  • business_error: the business error flag for the workflow order instance
  • archive: the archive flag for the workflow order instance (presented only if it goes from archive datasource)
  • operator_lock: the username of the user owning the lock on the workflow order instance data
  • note_count: the number of notes attached to the workflow order instance
  • warning_count: the warning count of the workflow order instance
  • error_count: the error count of the workflow order instance
  • custom_status: any custom status for the workflow order instance
  • priority: the priority of the workflow order instance
  • scheduled: the scheduled date for the workflow order instance
  • archive: if retrieved from the archive datasource
  • skey: the sensitive data key type
  • svalue: the sensitive data value
  • sensitive_data: the sensitive data hash for the given key and value
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: the request to search for sensitive data arrived over a non-encrypted network connection
  • 409 Conflict: INVALID-WORKFLOW: the name given in the workflowname parameter does not correspond to a known workflow
Note
See also

PUT /api/latest/orders?action=unblock

Description
Resets the statuses of one or more blocked workflow order data instances to their original statuses before blocking.
Return Value
This API returns a hash where the top-level key is the workflow_instanceid, and each value is either an exception string (indicating that the operation for that workflow_instanceid failed) or a hash with the following key:
  • workflow_status: the status of the workflow order
Failure reasons include:
  • "BLOCK-WORKFLOW-ERROR": invalid status, foreign session id, missing original status, block operation already in progress
  • "WORKFLOW-ACCESS-ERROR": Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_BLOCK_WORKFLOW_ORDER
See also

PUT /api/latest/orders?action=uncancel

Description
Resets one or more canceled workflow order data instance statuses to their original statuses before canceling.
Return Value
This API returns a hash where the top-level key is the workflow_instanceid, and each value is either an exception string (indicating that the operation for that workflow_instanceid failed) or a hash with the following key:
  • workflow_status: the status of the workflow order
Failure reasons include:
  • "CANCEL-WORKFLOW-ERROR": invalid status, foreign session id, missing original status, cancel operation already in progress
  • "WORKFLOW-ACCESS-ERROR": Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Errors
  • 400 Bad Request: all uncancel operations failed
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
See also

/api/latest/orders/{id}

This REST URI path provides actions and information about specific workflow orders.

GET /api/latest/orders/{id}

Description
Returns a hash of information about the current workflow order data instance.
Return Value
This API returns a hash with the following keys:
  • name: the name of the workflow
  • version: the version of the workflow
  • author: the author of the workflow
  • workflow_instanceid: the workflow order instance ID
  • workflowid: the ID of the workflow
  • workflowstatus: the status of the workflow order (see Workflow, Segment, and Step Status Descriptions for possible values)
  • status_sessionid: the ID of the Qorus application session managing the workflow order data or 0 if none
  • parent_workflow_instanceid: the workflow order instance ID of the parent order for this workflow or NULL if none
  • subworkflow: if 1, indicates that the parent_workflow_instanceid is the parent workflow order in a subworkflow relationship
  • synchronous: if 1, indicates that the order is being executed synchronously
  • errors: the number of errors raised against the order
  • business_error: a boolean flag indicating if the workflow order has an error status due to a business error
  • workflowstatus_orig: if the order status is OMQ::StatBlocked or OMQ::StatCanceled, this value will reflect the original status of the workflow order (see Workflow, Segment, and Step Status Descriptions for possible values)
  • custom_status: a custom status for the order
  • scheduled: the scheduled date
  • priority: the priority of the workflow order
  • started: the date/time the order was created
  • completed: the date/time order processing completed
  • modified: the last modified date/time for the order
  • operator_lock: a string giving the username of the user with an operator lock on the order
  • note_count: the number of notes stored against the order
  • deprecated: a boolean value indicating if the workflow is deprecated or not; deprecated workflows are by default not displayed in the UI
  • autostart: the integer autostart value for the workflow
  • manual_autostart: a booelan flag set if the autostart value has been changed manually, in which case the manual setting takes precendence over any new definitions loaded with oload
  • max_instances: a value limiting the maximum number of execution instances that can run at once
  • external_order_instanceid: a unique external key for the order
  • staticdata: a hash of workflow order static data
  • dynamicdata: a hash of workflow order dynamic data (if any)
  • stepdata: a list of step data information with the following keys:
    • name: the step name
    • version: the step version
    • stepid: the step ID
    • steptype: the step type
    • arraytype: the step array type
    • data: list of hashes of the dynamic step data per step index
  • keys: a hash of workflow order keys and values
  • warning_count: the number of warnings raised against the order
  • error_count: the number of errors raised against the order
  • retry_count: the number of times the order was subject to a RETRY status due to a technical error
  • StepInstances: a list of step hashes giving information about the execution status of workflow steps; each element is a hash with the following keys:
    • workflow_instanceid:
    • stepid: the ID of the step
    • ind: the step array index starting with 0
    • stepname: the name of the step
    • stepversion: the version of the step
    • steptype: type of the step
    • stepstatus: the current execution status of the step (see Workflow, Segment, and Step Status Descriptions for possible values)
    • retries: the number of retries executed on the step
    • skip: a boolean value indicating if the step logic was skipped
    • custom_status: a custom status for the step
    • started: the date/time the step was first executed
    • completed: the date/time step processing completed
    • function_instanceid: the function ID of the primary step function
    • subworkflow_instanceid: the workflow order ID of any subworkflow order instance (for bound subworkflow steps only)
    • business_error: a boolean flag indicating if the step has an error status due to a business error
  • ErrorInstances: a list of hashes giving information about errors and warnings raised against the order; each element is a hash with the following keys:
    • error_instanceid: a unique ID for the error
    • workflow_instanceid: the workflow order instance ID
    • stepid: the stepid where the error was raised
    • ind: the step array index starting with 0 where the error was raised
    • severity: the severity of the error (see Error Severity Codes for possible values)
    • retry: 1 if the error caused a retry
    • error: the string error code for the error
    • description: an optional description of the error
    • info: an optional string providing additional information about the error
    • business_error: a boolean flag indicating if the error is a business error
    • created: the date/time the error was created
  • HierarchyInfo: a hash of workflow order information; the keys are workflow order instance IDs for all workflow orders linked to each other through parent-child relationships in the hierarchy of the current workflow order; the values are order information hashes similar to the top-level of the return value of this API
  • AuditEvents: a list of audit information hashes
  • LastModified: the last modified date/time of the workflow order
  • actions: a list of possible actions on the workflow
  • notes: a list of notes saved against the order; each element is a REST Order Note Hash

PUT /api/latest/orders/{id}?action=block

Description
Blocks the current workflow order data instance by changing the status to OMQ::StatBlocked. An exception will be thrown if the status is OMQ::StatInProgress. No further processing can be done on workflow order data instances with a OMQ::StatBlocked status (unless the workflow instance is recovered back from OMQ::StatBlocked or the status is first updated to OMQ::StatError and then to OMQ::StatRetry).
Return Value
This API returns a hash with the following keys:
  • workflow_status: the status of the workflow order
Errors
  • 409 Conflict: BLOCK-WORKFLOW-ERROR: invalid status, foreign session id, missing original status, unblock operation already in progress
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_BLOCK_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=breakLock

Description
Breaks the current workflow order lock so that it can be updated by any authorized user.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • note: (required) a string note that gives the reason for breaking the operator lock
Return Value
This API returns "OK" upon successful execution
Note
See also

PUT /api/latest/orders/{id}?action=breakUserInteractionStepLock

Description
Forcibly releases a lock owned by any user on a step supporting user interaction
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
  • note: (string) required: a note to be added to the order on why the lock was broken
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: invalid arguments passed to the call
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: if the step is locked by another user
  • 404 Not Found: the given stepid does not correspond to an asynchronous step with the user-interaction API enabled or does not exist
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_BREAK_WORKFLOW_ORDER_LOCK
Since
Qorus 4.0.1

PUT /api/latest/orders/{id}?action=cancel

Description
Cancels the current workflow order data instance by changing its status to OMQ::StatCanceled. An exception will be thrown if the status is OMQ::StatInProgress. No further processing can be done on workflow order data instances with a OMQ::StatCanceled status (unless the workflow instance is recovered back from OMQ::StatCanceled or the status is first updated to OMQ::StatError and then to OMQ::StatRetry).
Return Value
This API returns a hash with the following keys:
  • workflow_status: the status of the workflow order
Errors
  • 409 Conflict: CANCEL-WORKFLOW-ERROR: invalid status, foreign session id, missing original status, uncancel operation already in progress
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_CANCEL_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=dynamicData

Description
Replaces the dynamic data for an existing order.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • newdata: (hash) the new dynamic data for the current workflow order; can also be NOTHING which will remove all dynamic data from the order
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA

POST /api/latest/orders/{id}?action=execSynchronous

Description
Executes a workflow in synchronous mode against the current order, which must have status OMQ::StatReady or OMQ::StatScheduled; it is not possible to process workflow data with other statuses synchronously.
The call will normally return only after the workflow reaches a OMQ::StatComplete or OMQ::StatError state, unless the system or the workflow order data instance are manually stopped while the workflow order data instance is being processed, in which case other statuses can be returned.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: (hash) an optional hash of option names and values; if any options are not valid for the workflow, then an exception is raised and the synchronous workflow execution instance is not started
Return Value
This API returns a hash with the following keys:
  • workflow_instanceid: the workflow instance ID of the order
  • status: the status of the workflow
  • dynamicdata: the dynamic data of the workflow order instance
Errors
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: cannot start new workflows because the system is shutting down
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires at least one of the following permissions: OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_EXEC_SYNC_WORKFLOW
See also

GET /api/latest/orders/{id}?action=listErrors

Description
Returns information about workflow order errors for the given workflow order instance
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • orderby: one or more field names for sorting the output
  • error: the error text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • description: the description text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • info: the info text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given
  • stepid: limit the search to one or more stepids
  • severity: limit the search to one or more severity values
  • name: limit the search to one or more step names
  • version: limit the search to one or more step versions
  • retry: limit the search to errors with or without the retry flag
  • business_error: limit the search to errors with or without the business_error flag
  • error_instanceid: mit the search to one or more error_instanceids
  • mindate: give the lower date range for the error search
  • maxdate: give the upper date range for the error search
  • limit: the maximum number of errors to return
  • offset: the starting error to return (use when paging for example)
Return Value
This API returns a list of hashes with the following keys for all data matched according to the search arguments:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow instance ID
  • workflowid: the workflow ID
  • stepid: the step ID where the error occurred
  • stepname: the name of the step where the error occurred
  • stepversion: the version of the step where the error occurred
  • ind: the array step index number where the error occurred
  • workflowstatus: current status of the workflow (see Workflow, Segment, and Step Status Descriptions for possible values)
  • started: the date and time when the workflow order started processing
  • completed: the date and time when the workflow order was completed
  • parent_workflow_instanceid: any parent workflow instance ID
  • custom_status: the custom status of the workflow order, if any
  • priority: the priority of the workflow order
  • scheduled: any scheduled date for the workflow order
  • error_instanceid: the error instance ID
  • error: the error code string
  • description: a description for the error (if any)
  • info: additional information about the error (if any)
  • severity: an error severity code (see Error Severity Codes for possible values)
  • created: the date and time the error was raised
  • retry: the retry count of the error
  • business_error: a boolean flag indicating of the error is a business error
  • custom_status_desc: a descriptive string for the custom status (if any)

PUT /api/latest/orders/{id}?action=lock

Description
Locks the current workflow order so that it can only be updated by the current user.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • note: (required) a string note that gives the reason for setting the operator lock
Return Value
This API returns "OK" upon successful execution
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_LOCK_WORKFLOW_ORDER
See also

POST /api/latest/orders/{id}?action=lockUserInteractionStep

Description
Locks the next available queue entry eligible for user interaction for the named step for the current workflow order instance ID, locks the step for dynamic step data editing to the given user and returns the step information or a 404 Not Found error if no such data is available
Arguments
This API takes one of the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) the ID of the step to acquire user interaction data from
  • stepname: (string) the name of the step to acquire user interaction data from
Return Value
This API returns a hash with the following keys:
  • stepid (int): the step ID of the step
  • ind (int): the step instance index number
  • queueid (int): the ID of the async queue
  • queuename (string): the name of the async queue
  • data (*hash): any step data already present
Errors
  • 400 Bad Request: returned if there is an error with the arguments to the call
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Not Found: this response is returned if no data is available to lock on the queue
Since
Qorus 4.0.1

GET /api/latest/orders/{id}?action=notes

Description
Returns a list of notes saved against the order; each element is a REST Order Note Hash.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • limit: the maximum number of notes to return; if omitted then all notes are returned
Return Value
This API returns a list of hashes of notes saved against the order; each element is a REST Order Note Hash.
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)

POST /api/latest/orders/{id}?action=notes

Description
Creates an order note on the current workflow order.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • note: the note to create on the order
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_SET_ORDER_INFO

PUT /api/latest/orders/{id}?action=releaseUserInteractionStepLock

Description
Releases a lock owned by the calling user on a step supporting user interaction
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: invalid arguments passed to the call
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: if the step is locked by another user
  • 404 Not Found: the given stepid does not correspond to an asynchronous step with the user-interaction API enabled or does not exist
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA
Since
Qorus 4.0.1

PUT /api/latest/orders/{id}?action=reschedule

Description
Sets or removes the scheduled date for the current workflow order data instance. Setting the scheduled date for a workflow order means that the workflow order data will not be processed before the scheduled date and time. The workflow order data must normally have status OMQ::StatReady or OMQ::StatScheduled to be rescheduled, however also workflows with OMQ::StatCanceled and OMQ::StatBlocked statuses can be rescheduled if their original status is OMQ::StatReady or OMQ::StatScheduled.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • date: (optional) parsed as a date; this is the new scheduled date to set; if not present, then any scheduled date will be removed
Return Value
This API returns "OK" upon successful execution
Errors
  • 409 Conflict: SESSION-ERROR: cannot reschedule workflow data owned by a foreign session
  • 409 Conflict: WORKFLOW-STATUS-ERROR: only workflows with status OMQ::StatReady or OMQ::StatScheduled or blocked or canceled workflows with original status OMQ::StatReady or OMQ::StatScheduled can be rescheduled
  • 409 Conflict: RESCHEDULE-ERROR: reschedule failed because workflow order data started processing while the request was being processed
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_RESCHEDULE_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=retry

Description
Retries the current workflow order instance; in order to make a retry; the workflow order status must be OMQ::StatError, OMQ::StatAsyncWaiting, or OMQ::StatRetry.
Return Value
This API returns a hash with the following keys:
  • steps_updated: (deprecated) always 0 in this version of Qorus
  • segments_updated: the number of segments updated
  • workflow_updated: always True in this version of Qorus
  • workflow_status: always OMQ::StatRetry in this version of Qorus
  • cached: True if the workflow data is currently cached
Errors
  • 409 Conflict: STATUS-ERROR: workflow data does not have either OMQ::StatError, OMQ::StatAsyncWaiting, or OMQ::StatRetry status
  • 409 Conflict: SESSION-ERROR: cannot change status for workflow data managed by another Qorus instance (foreign session ID)
  • 409 Conflict: RETRY-ERROR: invalid workflow instance ID
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_RETRY_WORKFLOW_ORDER
See also
omq.system.retry-workflow-instances()

PUT /api/latest/orders/{id}?action=sensitiveData

Description
Replaces the sensitive data for an existing order given the sensitive data key and value
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data key value
  • data: (hash) the new sensitive data for the current workflow order; can also be NOTHING which will remove all sensitive data from the order for the given sensitive data key and value
  • aliases: (string or list of strings; optional) zero or more aliases for the sensitive data corresponding to the given sensitive data key and value
  • meta: (hash; optional) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
    • [PURPOSE]: free-form information about the purpose of the sensitive data
    • [CATEGORIES]: free-form information about the categories of sensitive data
    • [RECIPIENTS]: free-form information about the recipients or recipient catories of sensitive data
    • [STORAGE]: free-form information about the storage time or rules for sensitive data
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: invalid arguments; cannot update sensitive data over a non-encrypted network connection
Note

PUT /api/latest/orders/{id}?action=setError

Description
Changes the status of a workflow order data instance to OMQ::StatError, as long as the starting status is OMQ::StatRetry, OMQ::StatCanceled, OMQ::StatBlocked, or OMQ::StatAsyncWaiting. If the status is any other status, an exception will be thrown.

To set a workflow order data instance with a OMQ::StatWaiting status to OMQ::StatError, set the child workflows to OMQ::StatError first and the status of the parent workflow order will be updated automatically.

When setting a workflow order from OMQ::StatCanceled to OMQ::StatError, outstanding events will be queued and the associated queued event keys will be present in the return value.
Return Value
This API returns a hash with the following keys:
  • steps_updated: number of steps updated
  • segments_updated: number of segments updated
  • workflow_status: always OMQ::StatError
  • old_status: the old workflow data status
  • queued_detached_segments: number of detached segment events queued
  • queued_subworkflows: number of subworkflow events queued
  • queued_async_messages: number of async events queued
  • queued_sync_events: number of workflow synchronization events queued
  • queued_async_retries: number of async events queued
  • queued_retries: number of retry events queued
  • queued_fixed_retries: number of retry events with a fixed retry time queued
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_SET_WORKFLOW_ORDER_ERROR
See also

PUT /api/latest/orders/{id}?action=setPriority

Description
Changes the priority for an existing workflow order data instance. The workflow order data must not have status OMQ::StatComplete.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • priority: the new order priority from 0 - 999; priority 0 is the highest; 999 is the lowest
Return Value
This API returns "OK" upon successful execution
Errors
  • 409 Conflict: SESSION-ERROR: cannot reschedule workflow data owned by a foreign session
  • 409 Conflict: WORKFLOW-STATUS-ERROR workflows with status OMQ::StatComplete cannot have their priority changed
  • 403 Forbidden: AUTHORIZATION-ERROR this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_REPRIORITIZE_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=skipStep

Description
Skips execution of a step in the current workflow order. Sometimes execution for a given step must be skipped, but the rest of the workflow logic should be executed. This API call allows Qorus to continue executing a workflow order data instance after skipping the given step. Only steps with OMQ::StatError, OMQ::StatRetry, OMQ::StatEventWaiting, or OMQ::StatAsyncWaiting can be skipped. Subworkflow steps with any status cannot be skipped; the child workflow must be corrected instead.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (required) the step ID to skip
  • ind: (optional) one or more step array index values to skip (ranges accepted; ex: "1,3,5-7"); if not present defaults to 0
  • noretry: (optional) parsed with Qore::parse_boolean(); if True then no retry will be executed
Errors
  • 409 Conflict: SKIP-STEP-ERROR: step is a subworkflow step; step has not been executed in the given workflow order instance; the given workflow instance ID does not exist
  • 409 Conflict: STEP-STATUS-ERROR: step status does not allow it to be skipped (ex: IN-PROGRESS, COMPLETE)
  • 409 Conflict: SESSION-ERROR: workflow order instance belongs to another Qorus session
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note

PUT /api/latest/orders/{id}?action=staticData

Description
Replaces the static data for an existing order.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • newdata: the new static data for the current workflow order; must be a non-empty hash
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ORDER-STATIC-DATA-ERROR: the new static data hash cannot be empty
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA

PUT /api/latest/orders/{id}?action=stepData

Description
Replaces the dynamic step data for an existing order step; if the step's queue data is locked by another user, the call will fail with a 409 Conflict error
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
  • newdata: (hash) required: the new dynamic step data for the current workflow order and step; can also be NOTHING which will remove all step data from the current step
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: invalid arguments passed to the call
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Not Found: the given stepid and ind do not exist in the current workflow order
  • 409 Conflict: REPLACE-STEP-DATA-ERROR: if the workflow order is owned by another Qorus instance, the step data is locked by another user, or the order is COMPLETE
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA
Since
Qorus 4.0.1

GET /api/latest/orders/{id}?action=stepData

Description
Returns dynamic step data for the order and step instance
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
Return Value
This API returns the workflow order dynamic step data for the given step instance
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown if Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 404 Not Found: the given stepid and ind values do not exist in the workflow order
Since
Qorus 4.0.1

PUT /api/latest/orders/{id}?action=unblock

Description
Resets the status of a blocked workflow order data instance to its original status before blocking.
Return Value
This API returns a hash with the following keys:
  • workflow_status: the status of the workflow order
Errors
  • 409 Conflict: BLOCK-WORKFLOW-ERROR: invalid status, foreign session id, missing original status, unblock operation already in progress
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_BLOCK_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=uncancel

Description
Resets the status of a canceled workflow order data instance to its original status before canceling.
Return Value
This API returns a hash with the following keys:
  • workflow_status: the status of the workflow order
Errors
  • 409 Conflict: CANCEL-WORKFLOW-ERROR: invalid status, foreign session id, missing original status, uncancel operation already in progress
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_CANCEL_WORKFLOW_ORDER
See also

PUT /api/latest/orders/{id}?action=unlock

Description
Unlocks the current workflow order so that it can be updated by any authorized user.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • note: (optional) a string note that gives the reason for removing the operator lock; if not passed, a default note will be added
Return Value
This API returns "OK" upon successful execution
Note
See also

PUT /api/latest/orders/{id}?action=updateKeys

Description
Sets order keys for the current workflow order; any keys given here will replace existing order keys.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • orderkeys: (hash) the order keys to replace for the current workflow order
Return Value
This API returns a hash of all order keys for the order after updating
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ORDER-KEYS-ERROR: the orderkeys argument was missing or not a hash
  • 409 Conflict: INVALID-WORKFLOW-KEY: an order key was given that is not valid for the workflow
  • 409 Conflict: DUPLICATE-KEY-VALUE: the same value may not appear more than once for any given key
Note
requires permission OMQ::QR_WORKFLOW_CONTROL or OMQ::QR_WORKFLOW_ORDER_CONTROL

GET /api/latest/orders/{id}?action=yamlDynamicData

Description
Returns dynamic data for the order as a serialized YAML string for potential editing
Return Value
This API returns a YAML-serialized string of workflow order dynamic data; if no dynamic data is in place; then YAML-serialized string will be deserialized to a hash or to no value (i.e. in Qore NOTHING) if there is no dynamic data for the workflow order
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
  • this method operates on the system schema and any archiving schema transparently
Since
Qorus 3.1.1.p1

PUT /api/latest/orders/{id}?action=yamlDynamicData

Description
Replaces the dynamic data for an existing order using a YAML-serialized string for the new dynamic data
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • newdata: (YAML-serialized string) the new dynamic data for the current workflow order as a YAML-serialized string; can also be deserialized to NOTHING which will remove all dynamic data from the order
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: DYNAMIC-DATA-ERROR: this error is returned if the newdata argument is not a string
  • 409 Conflict: YAML-PARSER-ERROR: this error is returned if the YAML string cannot be deserialized
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA
Since
Qorus 3.1.1.p1

PUT /api/latest/orders/{id}?action=yamlSensitiveData

Description
Replaces the sensitive data for an existing order given the sensitive data key and value; the actual sensitive data must be given as a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data key value
  • data: (YAML-serialized string) the new sensitive data for the current workflow order; can also be NOTHING which will remove all sensitive data from the order for the given sensitive data key and value
  • aliases: (string or list of strings; optional) zero or more aliases for the sensitive data corresponding to the given sensitive data key and value
  • meta: (hash; optional) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
    • [PURPOSE]: free-form information about the purpose of the sensitive data
    • [CATEGORIES]: free-form information about the categories of sensitive data
    • [RECIPIENTS]: free-form information about the recipients or recipient catories of sensitive data
    • [STORAGE]: free-form information about the storage time or rules for sensitive data
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: invalid arguments; cannot update sensitive data over a non-encrypted network connection
  • 409 Conflict: YAML-PARSER-ERROR: this error is returned if the YAML string cannot be deserialized
Note
Since
Qorus 3.1.1.p1

GET /api/latest/orders/{id}?action=yamlSensitiveData

Description
Returns the sensitive data for an existing order given the sensitive data key and value; the sensitive data itself is returned as a YAML-serialized string
Arguments
This API takes the following required hash arguments (either as URI arguments or in the message body):
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data key value
Return Value
This API returns either NOTHING (if the order doesn't have the request sensitive data key and value) or a hash with the following keys:
  • [aliases]: (list of strings) zero or more string aliases for the sensitive data
  • data: (YAML-serialized string) the sensitive data hash itself serialized as a YAML string for potential editing
  • [meta]: (hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
    • [PURPOSE]: free-form information about the purpose of the sensitive data
    • [CATEGORIES]: free-form information about the categories of sensitive data
    • [RECIPIENTS]: free-form information about the recipients or recipient catories of sensitive data
    • [STORAGE]: free-form information about the storage time or rules for sensitive data
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: invalid arguments; cannot retrieve sensitive data over a non-encrypted network connection
Note
Since
Qorus 3.1.1.p1

PUT /api/latest/orders/{id}?action=yamlStaticData

Description
Replaces the static data for an existing order using a YAML-serialized string for the new static data
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • newdata: (YAML-serialized string) the new static data for the current workflow order as a YAML-serialized string; must be deserialized to a non-empty hash
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: STATIC-DATA-ERROR: this error is returned if the newdata argument is not a string
  • 409 Conflict: YAML-PARSER-ERROR: this error is returned if the YAML string cannot be deserialized
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA
Since
Qorus 3.1.1.p1

GET /api/latest/orders/{id}?action=yamlStaticData

/**

Description
Returns static data for the order as a serialized YAML string for potential editing
Return Value
This API returns a YAML-serialized string of workflow order static data; if no static data is in place; then YAML-serialized string will be deserialized to a hash or to no value (i.e. in Qore NOTHING) if there is no static data for the workflow order
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note
  • this method operates on the system schema and any archiving schema transparently
Since
Qorus 3.1.1.p1

PUT /api/latest/orders/{id}?action=yamlStepData

Description
Replaces the dynamic step data for an existing order using a YAML-serialized string for the new dynamic step data
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
  • newdata: (YAML-serialized string) required: the new dynamic step data for the current workflow order and step; can also be deserialized to NOTHING which will remove all step data from the current step
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 400 Bad Request: returned if the newdata argument is not a string or cannot be parsed as valid YAML
  • 404 Not Found: the given stepid and ind values do not exist in the workflow order
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_EDIT_WORKFLOW_DATA
Since
Qorus 4.0.1

GET /api/latest/orders/{id}?action=yamlStepData

Description
Returns dynamic step data for the order as a serialized YAML string for potential editing
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stepid: (int) required: the step ID of the step
  • ind: (int) required: the step instance index value; use 0 for non-array steps
Return Value
This API returns a YAML-serialized string of workflow order dynamic step data; if no dynamic step data is in place; then a YAML-serialized string representing no value (i.e. "null") will be returned.
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown if Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 404 Not Found: the given stepid and ind values do not exist in the workflow order
Since
Qorus 4.0.1

/api/latest/orders/{id}/async-queue

This REST URI path provides actions and information about specific workflow orders' Queue Definitions

GET /api/latest/orders/{id}/async-queue

Description
Gets queue information for a particular workflow and step
Arguments
  • stepid the stepid to query. Optional, defaults to 0
  • int the array index offset of the step to query (0 for non-array steps). Optional.
Return Value
A list of hashes or an ampty list is returned.

The queue info hash has the following keys:

  • workflow_instanceid: the workflow instance ID of the step and queue entry
  • stepid: the step ID of the step and queue entry
  • ind: the array index of the step and queue entry (0 for non-array steps)
  • queuekey: the queue key string
  • queue_data_status: the status of the queue entry: OMQ::QS_Waiting, OMQ::QS_Received, OMQ::QS_Used (Oracle only), or OMQ::QS_Error (rarely, in case of unparsable queue data)
  • corrected: if 1, then the queue entry has been corrected. meaning that the back-end function will not be executed and the step will automatically get a OMQ::StatComplete status.
  • data: the queue data, if any, set only when the queue data status is OMQ::QS_Received
Exceptions
GET-INFO-ERRORinvalid workflow_instanceid
WORKFLOW-ACCESS-ERRORthis is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

POST /api/latest/orders/{id}/async-queue?action=correct

Description
corrects a queue entry with status OMQ::QS_Waiting, sets the status to OMQ::QS_Received and sets the corrected attribute to True

This will effective cause an asynchronous step to be skipped without the back end function being run at all; the step will be processed to OMQ::StatComplete as soon as the corrected queue entry is delivered to workflow execution instance processing this order. See Queue Definitions

Arguments
  • stepid the stepid to update
  • ind the array index offset of the step to update (0 for non-array steps)
Exceptions
QUEUE-CORRECT-DATA-ERRORinvalid workflow_instanceid or stepid
INVALID-WORKFLOW-DATAno queue data for the given step
INVALID-STATUSqueue entry does not have status OMQ::QS_Waiting
ALREADY-CORRECTEDqueue entry has already been corrected
WORKFLOW-ACCESS-ERRORthis is exeption is thrown when RBAC is enabled, and the call is made externally, and the user does not have the right to access the given workflow

/api/latest/perms

This REST URI path provides actions and information related to RBAC permissions

GET /api/latest/perms

Description
Returns a list of information about permissions
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
Returns a list of REST Permission Hash elements

POST /api/latest/perms

Description
Creates a new user permission
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name: (required string) the name of the new user permission
  • desc: (required string) the description for the new user permission
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_ADD_PERMISSION

/api/latest/perms/{perm}

This REST URI path provides actions and information related to a specific RBAC permission

DELETE /api/latest/perms/{perm}

Description
Permanently deletes the current permission
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_DELETE_PERMISSION

GET /api/latest/perms/{perm}

Description
Returns information about the current permission
Return Value
Returns a REST Permission Hash for the current permission

PUT /api/latest/perms/{perm}

Description
Updates the current permission
Arguments
This API takes the following hash argument (either as URI arguments or in the message body):
  • desc: (required string) the new description for the current permission
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_MODIFY_PERMISSION

PUT /api/latest/perms/{perm}?action=update

Description
Updates the current permission
See also
This API is equivalent to PUT /api/perms/{perm}; see that documentation for details.

/api/latest/public/info

This URI path implements token-based user authentication.

GET /api/latest/public/info

Description
Returns system information that is publicly available (without authentication).
Arguments
None
Return Value
This API returns a hash with the following keys:
  • instance-key: Qorus instance identifier
  • omq-version: Qorus executable version
  • omq-build: Qorus executable git hash
  • qore-version: Qore library version
  • omq-schema: Qorus system schema info
Since
Qorus 3.1.0.p10 includes the omq-schema key

/api/latest/public/login

This URI path implements token-based user authentication.

POST /api/latest/public/login

Description
Takes the user's credentials as arguments and returns the token for token-based authentication.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • user: the username
  • pass: the user's password
Remarks
Currently the username and password are sent in plain text format. Please consider using HTTPS instead of HTTP to protect the users' privacy.
Return Value
This API returns a hash with the following key:
  • token: the token to be used for the session

/api/latest/releases

This REST URI path provides actions and information about Qorus releases

GET /api/latest/releases

Description
Returns a list of hashes of information about release that match the search arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • component: the component name to search for (implies with_files = True and with_components = True)
  • component_maxdate: the upper date range for the release search for component (implies with_files = True and with_components = True)
  • component_mindate: the lower date range for the release search for component (implies with_files = True and with_components = True)
  • file_maxdate: give the upper date range for the release search for files (implies with_files = True)
  • file_mindate: give the lower date range for the release search for files (implies with_files = True)
  • file_name: the file name to search for; note that this is used with the SQL like operator (implies with_files = True)
  • limit: the maximum number of releases to return
  • maxdate: give the upper date range for the release search
  • mindate: give the lower date range for the release search
  • offset: the starting release to return (use when paging for example)
  • with_components: if True then file components are in
Return Value
This API returns a list of hashes matching the arguments; each hash element has the following keys:
  • name: the name of the release
  • description: the description of the release
  • created: the date/time the release was created
  • modified: the date/time the release was last modified

/api/latest/releases/{release}

This REST URI path provides actions and information about a specific Qorus release

GET /api/latest/releases/{release}

Description
Returns a hash of information about the current release
Return Value
This API returns a hash with the following keys:
  • name: the name of the release
  • description: the description of the release
  • created: the date/time the release was created
  • modified: the date/time the release was last modified
  • files: a list of file components of the release; each list element is a hash with the following keys:
    • name: the full file path
    • type: the type of file
    • hash_type: the type of cryptographic hash for the file
    • hash: the cryptographic hash value of the file
    • created: the date/time the file entry was created with the release
    • modified: the last modified date/time of the file entry
    • components: a list of object components created from the file; each list element is a hash with the following keys:
      • component: the name of the component
      • version: the version of the component
      • id: the ID of the component (ex: if type = "FUNCTION", then id is a function ID)
      • content_id: the component content ID
      • hash_type: the type of cryptographic hash for the file
      • hash: the cryptographic hash value of the file
      • created: the date/time the file entry was created with the release
      • modified: the last modified date/time of the file entry

/api/latest/remote

This REST URI path provides actions and information about remote Qorus, user and datasource connections

GET /api/latest/remote

Description
Returns a list of child URI path components
Return Value
Returns a list of child URI path components as follows:

GET /api/latest/remote?action=all

Description
Returns a list of all remote connections (remote connections under "qorus", user connections under "user", and datasource connections under "datasources")
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
Returns a list of hashes; the "conntype" value determines the hash format as follows:
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
See also

GET /api/latest/remote?action=list

Description
Returns a list of child URI path components
See also
This API is equivalent to GET /api/remote; see that documentation for details.

/api/latest/remote/datasources

This REST URI path provides actions and information related to Qorus system datasources

GET /api/latest/remote/datasources

Description
Returns a list of hashes providing information for all Qorus system datasources
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of REST Datasource Connection Hash elements
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
the use of the with_passwords argument requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_READ_DATASOURCE
See also

POST /api/latest/remote/datasources

Description
Creates a new datasource connection in memory
Arguments
This API takes a hash argument (either as URI arguments or in the message body):
  • name: (required string) the name of the datasource connection
  • desc: (required string) the description for the new connection
  • url: (required string) the connection string for the new connection. See Qore::SQL::parse_datasource()
  • options: (optional hash) a hash of options for the connection; also accepts "opts" as an alias for this option
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: DATASOURCE-CONNECTION-ERROR: missing or invalid name, desc, url, options arguments - or name and Datasource Hash members
  • 409 Conflict: CONNECTION-ERROR: connection already exists; unknown scheme in URL
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_ADD_DATASOURCE

PUT /api/latest/remote/datasources?action=defaultLogger

Description
Set logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/remote/datasources?action=defaultLogger

Description
Create default Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/remote/datasources?action=defaultLogger

Description
Delete logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/remote/datasources?action=defaultLogger

Description
Returns default logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) interface table name (jobs/workflows/services/qdsp). If set means default logger

PUT /api/latest/remote/datasources?action=defaultLoggerAppenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/remote/datasources?action=defaultLoggerAppenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/remote/datasources?action=defaultLoggerAppenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/remote/datasources?action=defaultLoggerAppenders

Description
Return all logger appenders
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

PUT /api/latest/remote/datasources?action=flush

Description
removed since Qorus 4.0
Return Value
This API returns a hash with the following key:
  • info: a string indicating that no action was taken; this API no longer has any function
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_FLUSH_DATASOURCE
See also

GET /api/latest/remote/datasources?action=list

Description
Returns a list of hashes providing information for all Qorus system datasources
See also
This API is equivalent to GET /api/remote/datasources; see that documentation for details.

PUT /api/latest/remote/datasources?action=reload

Description
Reloads all datasources from the system database
Return Value
This API returns a hash with the following key:
  • info: a string confirming the reload operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_RELOAD_DATASOURCE

/api/latest/remote/datasources/{name}

This REST URI path provides actions and information related to a specific Qorus system datasource

DELETE /api/latest/remote/datasources/{name}

Description
Deletes the given datasource from the server's internal cache
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: DATASOURCE-ERROR: this exception is thrown if the given datasource does not exist or is a system datasource
Note

GET /api/latest/remote/datasources/{name}

Description
Returns a hash information for the current datasource
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a REST Datasource Connection Hash
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
the use of the with_password argument requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_READ_DATASOURCE

PUT /api/latest/remote/datasources/{name}

Description
Updates the current datasource in the server's internal cache
Arguments
This API takes a hash argument (either as URI arguments or in the message body):
  • desc: (required string) the description for the new connection
  • url: (required string) the connection string for the new connection. See Qore::SQL::parse_datasource()
  • options: (optional hash) a hash of options for the connection; also accepts "opts" as an alias for this option
Return Value
This API returns a hash with the following key:
  • info: a string confirming the update operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: DATASOURCE-ERROR: this exception is thrown if the call tries to modify a locked system datasource or invalid options are passed
Note
See also

PUT /api/latest/remote/datasources/{name}?action=disable

Description
Disables current datasource
Return Value
This API returns a hash with the following key:
  • info: a string confirming the disable operation
Errors
  • 409 Conflict: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_MODIFY_DATASOURCE

PUT /api/latest/remote/datasources/{name}?action=enable

Description
Enables current datasource
Return Value
This API returns a hash with the following key:
  • info: a string confirming the enable operation
Errors
  • 409 Conflict: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_MODIFY_DATASOURCE

PUT /api/latest/remote/datasources/{name}?action=ping

Description
Checks connectivity to the current datasource; if the datasource connection was up and is monitored to be down, then any dependent interfaces will be disabled. If the connection was down and is monitored to be up, then any eligible interfaces will be reenabled.
Return Value
This API returns a hash with the following keys:
  • ok: the status of the ping
  • name: the name of the connection
  • desc: the description of the connection
  • url: the URL for the connection
  • opts: a hash of options for the connection (if any)
  • time: the elapsed time for the ping
  • info: "OK" if the ping was successful or an error message if not
  • result: a string representation of the time in seconds (ex: "0.25s")
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_READ_DATASOURCE

PUT /api/latest/remote/datasources/{name}?action=reset

Description
Resets the current datasource; after this call, any new requests for instances of this datasource will result in a new datasource or datasource pool being opened
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
See also
qdsp Datasource Resets
Note
requires permission OMQ::QR_DATASOURCE_CONTROL or OMQ::QR_RESET_DATASOURCE

PUT /api/latest/remote/datasources/{name}?action=update

Description
Temporarily updates the current datasource
See also
This API is equivalent to PUT /api/remote/datasources/{name}; see that documentation for details.

/api/latest/remote/qorus

This REST URI path provides actions and information related to Qorus remote connections

GET /api/latest/remote/qorus

Description
Returns a list of hashes providing information for all remote connections
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of REST User and Remote Connection Hash elements
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_READ_SERVER_CONNECTION
See also

POST /api/latest/remote/qorus

Description
Creates a new remote connection from the arguments supplied
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name: (required string) the name of the connection
  • desc: (required string) the description for the new connection
  • url: (required string) the URL for the new connection
  • options: (optional hash) a hash of options for the connection; also accepts "opts" as an alias for this option
Return Value
This API returns a hash with the following key:
  • info: a string confirming the connection creation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: REMOTE-CONNECTION-ERROR: missing or invalid name, desc, url, or options arguments
  • 409 Conflict: CONNECTION-ERROR: connection already exists; unknown scheme in URL
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_ADD_SERVER_CONNECTION

GET /api/latest/remote/qorus?action=list

Description
Returns a list of hashes providing information for all remote connections
See also
This API is equivalent to GET /api/remote/qorus; see that documentation for details.

PUT /api/latest/remote/qorus?action=reload

Description
Reloads all remote connections from the database
Return Value
This API returns a hash with the following key:
  • info: a string confirming the reload operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_RELOAD_SERVER_CONNECTION

/api/latest/remote/qorus/{name}

This REST URI path provides actions and information related to a specific remote connection

DELETE /api/latest/remote/qorus/{name}

Description
Permanently deletes the current remote connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
Errors
  • 409 Conflict: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_DELETE_SERVER_CONNECTION

GET /api/latest/remote/qorus/{name}

Description
Returns a hash information for the current remote connection
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • with_password: (optional bool) include the password in the "url" and "url_hash" keys
Return Value
This API returns a REST User and Remote Connection Hash
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_READ_SERVER_CONNECTION

PUT /api/latest/remote/qorus/{name}

Description
Modifies the current remote Qorus connection
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: (optional string) a new description for the connection
  • url: (optional string) a new URL for the connection
  • options: (optional hash) new options for the connection; also accepts "opts" as an alias for this option
Return Value
This API returns a hash with the following key:
  • info: a string describing the connection update
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: REMOTE-CONNECTION-ERROR: invalid or unparsable "options" key
Note

PUT /api/latest/remote/qorus/{name}?action=disable

Description
Disables current remote connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the enable operation
Errors
  • 409 Conflict: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL

PUT /api/latest/remote/qorus/{name}?action=enable

Description
Enables current remote connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the enable operation
Errors
  • 409 Conflict: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL

PUT /api/latest/remote/qorus/{name}?action=ping

Description
Checks connectivity to the current remote connection; if the connection was up and is monitored to be down, then any dependent interfaces will be disabled. If the connection was down and is monitored to be up, then any eligible interfaces will be reenabled.
Return Value
This API returns a hash with the following keys:
  • ok: the status of the ping
  • name: the name of the connection
  • desc: the description of the connection
  • url: the URL for the connection
  • opts: a hash of options for the connection (if any)
  • time: the elapsed time for the ping
  • info: "OK" if the ping was successful or an error message if not
  • result: a string representation of the time in seconds (ex: "0.25s")
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONNECTION_CONTROL or OMQ::QR_READ_SERVER_CONNECTION

/api/latest/remote/user

This REST URI path provides actions and information related to Qorus user connections

GET /api/latest/remote/user

Description
Returns a list of hashes providing information for all user connections
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of REST User and Remote Connection Hash elements
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_READ_USER_CONNECTION
See also

POST /api/latest/remote/user

Description
Creates a new user connection from the arguments supplied
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name: (required string) the name of the user connection
  • desc: (required string) the description for the new user connection
  • url: (required string) the URL for the new user connection
  • options: (optional hash) a hash of options for the user connection (also "opts" is accepted as an alias for "options")
Return Value
This API returns a hash with the following key:
  • info: a string confirming the user connection creation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: USER-CONNECTION-ERROR: missing or invalid name, desc, url, or options arguments
  • 409 Conflict: CONNECTION-ERROR: connection already exists; unknown scheme in URL
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_ADD_USER_CONNECTION
See also

GET /api/latest/remote/user?action=list

Description
Returns a list of hashes providing information for all user connections
See also
This API is equivalent to GET /api/remote/user; see that documentation for details.

PUT /api/latest/remote/user?action=reload

Description
Reloads all user connections from the database
Return Value
This API returns a hash with the following key:
  • info: a string confirming the reload operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_RELOAD_USER_CONNECTION

/api/latest/remote/user/{name}

This REST URI path provides actions and information related to a specific user connection

DELETE /api/latest/remote/user/{name}

Description
Permanently deletes the current user connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_DELETE_USER_CONNECTION

GET /api/latest/remote/user/{name}

Description
Returns a hash information for the current user connection
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • with_password: (optional bool) include the password in the "url" and "url_hash" keys
Return Value
This API returns a REST User and Remote Connection Hash
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_READ_USER_CONNECTION

PUT /api/latest/remote/user/{name}

Description
Modifies the current user connection
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: (optional string) a new description for the connection
  • url: (optional string) a new URL for the connection
  • options: (optional hash) new options for the connection; also accepts "opts" as an alias for this option
Return Value
This API returns a hash with the following key:
  • info: a string describing the connection update
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: USER-CONNECTION-ERROR: invalid or unparsable "options" key
Note

PUT /api/latest/remote/user/{name}?action=disable

Description
Disables current user connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the enable operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_MODIFY_USER_CONNECTION

PUT /api/latest/remote/user/{name}?action=enable

Description
Enables current user connection
Return Value
This API returns a hash with the following key:
  • info: a string confirming the enable operation
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_MODIFY_USER_CONNECTION

PUT /api/latest/remote/user/{name}?action=ping

Description
Checks connectivity to the current user connection; if the connection was up and is monitored to be down, then any dependent interfaces will be disabled. If the connection was down and is monitored to be up, then any eligible interfaces will be reenabled.
Return Value
This API returns a hash with the following keys:
  • ok: the status of the ping
  • name: the name of the connection
  • desc: the description of the connection
  • url: the URL for the connection
  • opts: a hash of options for the connection (if any)
  • time: the elapsed time for the ping
  • info: "OK" if the ping was successful or an error message if not
  • result: a string representation of the time in seconds (ex: "0.25s")
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONNECTION_CONTROL or OMQ::QR_READ_USER_CONNECTION

PUT /api/latest/remote/user/{name}?action=update

Description
Modifies the current user connection
See also
This API is equivalent to PUT /api/remote/user/{name}; see that documentation for details.

/api/latest/roles

This REST URI path provides actions and information related to Qorus roles

GET /api/latest/roles

Description
Returns a list of hashes describing system roles
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Role Hash elements
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL

POST /api/latest/roles

Description
Permanently add a new role to the system
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • role: (required) the name of the role to add
  • desc: (required) the description of the role
  • perms: (optional) a comma-separated string will be split into a list; a single permission or a list of permissions to add to the role; note that users must have at least the OMQ::QR_LOGIN permission to connect to the server
  • groups: (optional) a comma-separated string will be split into a list; a single group or a list of groups to add to the role
Return Value
This API returns a hash with the following key:
  • info: a string describing the role clone action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ROLE-ERROR: missing or invalid role or desc arguments
  • 409 Conflict: RBAC-ADD-ROLE-ERROR: invalid role (role already exists)
Note
See also

GET /api/latest/roles?action=list

Description
Returns a list of hashes describing system roles
See also
This API is equivalent to GET /api/roles; see that documentation for details.

/api/latest/roles/{role}

This REST URI path provides actions and information related to a specific role

Note
Roles can only be accessed if the calling user has the OMQ::QR_USER_CONTROL permission

DELETE /api/latest/roles/{role}

Description
Deletes the current role
Return Value
This API returns a hash with the following key:
  • info: a string describing the role deletion action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_DELETE_ROLE
See also

GET /api/latest/roles/{role}

Description
Returns a hash describing the current role
Return Value
This API returns a REST Role Hash
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL

PUT /api/latest/roles/{role}

Description
Modifies the current role
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: (string) role description
  • perms: (list of strings) a comma-separated string will be split into a list; the new list will replace the current list unless the permission names are preceded by "+" or "-", meaning add or remove a permission, respectively (in which case all permissions must be preceded by a "+" or "-")
  • groups: (list of strings) a comma-separated string will be split into a list; the new list will replace the current list unless the group names are preceded by "+" or "-", meaning add or remove a group, respectively (in which case all group names must be preceded by a "+" or "-")
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: RBAC-UPDATE-ROLE-ERROR: no valid keys in hash, invalid permission, invalid group
Return Value
Returns a hash of the role attributes updated
Note
See also

POST /api/latest/roles/{role}?action=clone

Description
Clones the current role to a copy with a new name and description
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • target: (required) the name of the new cloned role
  • desc: (required) the description of the new cloned role
Return Value
This API returns a hash with the following key:
  • info: a string describing the role clone action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: ROLE-ERROR: missing or invalid target or desc arguments
  • 409 Conflict: RBAC-ADD-ROLE-ERROR: invalid role (target already exists)
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_ADD_ROLE
See also

PUT /api/latest/roles/{role}?action=update

Description
Modifies the current role
See also
This API is equivalent to PUT /api/roles/{role}; see that documentation for details.

/api/latest/services

This REST URI path provides actions and information related to Qorus services; the name can also be provided in the format name:version.

GET /api/latest/services

Description
Returns a list of services hashes according to the arguments passed.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • status: one of:
    • "running": for only running services (loaded with at least one active thread)
    • "loaded": all loaded services (also running services)
    • "unloaded": only services not loaded
  • list: optional; parsed with Qore::parse_boolean(); if True then a list of service names is returned
  • short: optional; parsed with Qore::parse_boolean(); if True then a list of short strings with service names and descriptions is returned
Return Value
If neither list nor short are used, then a list of hashes is returned, one element for each accessible service (depending on the calling users accessible interface groups); each hash in the returned list has the following keys:
  • type: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • name: the service name
  • version: the service version
  • patch: the service patch string (if any)
  • desc: the service description
  • author: the author of the service (if any)
  • serviceid: the service ID
  • parse_options: a list of symbolic parse options for the service program container (if any)
  • status: the status of the service; one of:
    • "loaded": loaded but not running
    • "running": loaded and running with at least one service thread
    • "unloaded": not loaded
  • log: the complete path to the service log file
  • threads: the number of active threads in the service
  • autostart: boolean value indicating if the service should be autostarted or not
  • manual_autostart: a booelan flag set if the autostart value has been changed manually, in which case the manual setting takes precendence over any new definitions loaded with oload
  • remote: a boolean value indicating if the service is run as an external process or not
  • loaded: date/time the service was loaded
  • methods: a list of hashes for each service method; each hash element has the following keys:
    • name: the name of the method
    • desc: a description of the method
    • sla: the name of the associated SLA for this call (if any)
  • resources: a REST Service Resource Hash (if any)
  • resource_files: a list of hashes giving service resource file information (if any); each list element has the following keys:
    • type: the type code for the service resource
    • name: the name of the service resource
  • options: a hash of options set on the service
  • groups: a list of interface groups that the service belongs to; each list element is a REST Interface Group Hash (may be empty)
  • alerts: a list of alerts raised against the service; each list element is a REST Alert Hash (may be empty)
  • lib: a REST Library Object Hash
  • log_url: a complete URL to the websocket source for the service log
  • enabled: a boolean flag indicating if the service is enabled or not; disabled services cannot be loaded
  • connections: a list of connection objects that this service depends on; each list element is a REST Connection Dependency Hash (may be empty)

POST /api/latest/services?action=defaultLogger

Description
Create default Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/services?action=defaultLogger

Description
Returns default logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) interface table name (jobs/workflows/services). If set means default logger

DELETE /api/latest/services?action=defaultLogger

Description
Delete logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/services?action=defaultLogger

Description
Set logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/services?action=defaultLoggerAppenders

Description
Return all logger appenders
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

DELETE /api/latest/services?action=defaultLoggerAppenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/services?action=defaultLoggerAppenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/services?action=defaultLoggerAppenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/services?action=disable

Description
Disables one or more services.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more service names or IDs to disable; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes; each hash has the following keys:
  • arg: the service ID or name
  • disabled: True or False
  • [serviceid]: the service ID
  • [type]: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • [name]: the service name
  • [version]: the service version
  • info: info about the service enable action or a reason why the request failed; possible failure reasons:
    • "SERVICE-ERROR": unknown service, service not accessible
Errors
  • 409 Conflict: SERVICE-DISABLE-ERROR: missing ids argument
Note
requires permission OMQ::QR_SERVICE_CONTROL, OMQ::QR_GROUP_CONTROL, or OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

PUT /api/latest/services?action=enable

Description
Enables one or more disabled services.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more service names or IDs to enable; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes; each hash has the following keys:
  • arg: the service ID or name
  • enabled: True or False
  • [serviceid]: the service ID
  • [type]: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • [name]: the service name
  • [version]: the service version
  • info: info about the service enable action or a reason why the request failed; possible failure reasons:
    • "SERVICE-ERROR": unknown service, service not accessible
Errors
  • 409 Conflict: SERVICE-ENABLE-ERROR: missing ids argument
Note
requires permission OMQ::QR_SERVICE_CONTROL, OMQ::QR_GROUP_CONTROL, or OMQ::QR_MODIFY_GROUP, or OMQ::QR_MODIFY_GROUP_STATUS
See also

GET /api/latest/services?action=list

Description
Returns a list of services hashes according to the arguments passed.
See also
This API is equivalent to GET /api/services/{id_or_name}; see that documentation for details.

PUT /api/latest/services?action=load

Description
Loads and initializes one or more services if not already loaded.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more service names or IDs to start; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes giving the result of each load request; each hash has the following keys:
  • arg: the service ID or name (argument for the load operation)
  • loaded: a boolean giving the result of the operation
  • [already_loaded]: (only present if loaded is True) True if the service was already loaded before this call, False if loaded with this call
  • [serviceid]: the service ID
  • [type]: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • [name]: the name of the service
  • [version]: the version of the service
  • info: information abouit the operation; if the operation failed, a formatted error string will appear here; possible failure reasons:
    • "SERVICE-ERROR": the given service cannot be loaded (does not exist, error initializing the service)
    • "SERVICE-ACCESS-ERROR": the user does not have the right to access the given service (for more information, see Interface Groups, only possible if Role Based Access Control is enabled)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note
requires permission OMQ::QR_CALL_SYSTEM_SERVICES_RW or OMQ::QR_CALL_SYSTEM_SERVICES_RO for system services, OMQ::QR_CALL_USER_SERVICES_RW or OMQ::QR_CALL_USER_SERVICES_RO for user services
See also

PUT /api/latest/services?action=reset

Description
Resets one or more services and reloads them from the database.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more service names or IDs to reload; a comma-separated string will be split into a list
  • load: (optional) will be evaluated with Qore::parse_boolean(); if True then services not already loaded will be loaded with this call; default @ref False, meaning that services not already loaded will not be loaded by this call
Return Value
This API returns a list of hashes giving the result of each reset request; each hash has the following keys:
  • arg: the service ID or name (argument for the load operation)
  • [loaded]: True if the service was already loaded before this call, False if loaded with this call
  • [reset]: True if the service was (re)loaded
  • [serviceid]: the service ID
  • [type]: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • [name]: the name of the service
  • [version]: the version of the service
  • info: information abouit the operation; if the operation failed, a formatted error string will appear here; possible failure reasons:
    • "SERVICE-ERROR": the given service cannot be loaded (does not exist, error initializing the service)
    • "SERVICE-ACCESS-ERROR": the user does not have the right to access the given service (for more information, see Interface Groups, only possible if Role Based Access Control is enabled)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SERVICE-RESET-ERROR: missing ids argument
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_RESET_SERVICE
See also

PUT /api/latest/services?action=resetAll

Description
Unloads all accessible services currently loaded in memory and reloads them from the database. If the calling user has restricted access to user services, only services visible by the current user are reset
Return Value
This API returns a list of hashes listing all services reset; each hash has the following keys:
  • type: the type of service reset; one of:
    • "system": for system services
    • "user": for user services
  • name: name of the service
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_RESET_SERVICE
See also

PUT /api/latest/services?action=resetSystem

Description
Unloads all system services currently loaded in memory and reloads them from the database.
Return Value
This API returns a list of hashes listing all services reset; each hash has the following keys:
  • type: the type of service reset; always "system" for this call
  • name: name of the service
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_RESET_SERVICE
See also

PUT /api/latest/services?action=resetUser

Description
Unloads all accessible user services currently loaded in memory and reloads them from the database. If the calling user has restricted access to user services, only services visible by the current user are reset
Return Value
This API returns a list of hashes listing all services reset; each hash has the following keys:
  • type: the type of service reset; always "user" for this call
  • name: name of the service
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_RESET_SERVICE
See also

PUT /api/latest/services?action=unload

Description
Unloads one or more services from the system. If the service is running, then it is first stopped. Additionally, for each service to be unloaded, any outstanding method calls must return before the service can be unloaded.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more service names or IDs to unload; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes giving the result of each unload request; each hash has the following keys:
  • arg: the service ID or name (argument for the unload operation)
  • [loaded]: True if the service was already loaded, False if not
  • [unloaded]: True if the service was unloaded, False if not
  • [serviceid]: the service ID
  • [type]: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • [name]: the name of the service
  • [version]: the version of the service
  • info: information abouit the operation; if the operation failed, a formatted error string will appear here; possible failure reasons:
    • "SERVICE-ERROR": the given service cannot be loaded (does not exist, error initializing the service)
    • "SERVICE-ACCESS-ERROR": the user does not have the right to access the given service (for more information, see Interface Groups, only possible if Role Based Access Control is enabled)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SERVICE-UNLOAD-ERROR: missing ids argument
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_UNLOAD_SERVICE
See also

/api/latest/services/{id_or_name}

This REST URI path provides actions and information related to Qorus services.

GET /api/latest/services/{id_or_name}

Description
Returns information about the current service
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a hash describing the service with the following keys:
  • serviceid: the service ID
  • type: the type of the service; one of:
    • "system": for system services
    • "user": for user services
  • name: the name of the service
  • version: the version of the service
  • description: the description of the service (if any)
  • author: the author of the service (if any)
  • parse_options: a list of symbolic parse options for the service program container
  • autostart: a boolean value indicating if the service should be autostarted or not
  • manual_autostart: a booelan flag set if the autostart value has been changed manually, in which case the manual setting takes precendence over any new definitions loaded with oload
  • remote: a boolean value indicating if the service is run as an external process or not
  • enabled: a boolean flag indicating if the service is enabled or not; disabled services cannot be loaded
  • created: the date/time the service was created
  • modified: the date/time the service was last modified
  • mappers: a list of mappers associated with the service (can be NOTHING); each mapper element is a REST Mapper Hash
  • vmaps: a list of value maps associated with the service (can be NOTHING); each value map element is a REST Value Map Hash
  • latest: a boolean flag indicating if the current contextual service is the latest service of its type and name
  • methods: a list of REST Service Method Hash elements
  • groups: a list of interface groups that the service belongs to; each list element is a REST Interface Group Hash (may be empty)
  • resource_files: a list of resource file hashes (if any); each list element is a hash with the following keys:
    • name: the name of the resource
    • type: the type code for the resource
  • status: the status of the service; one of:
    • "loaded": loaded but not running
    • "running": loaded and running with at least one service thread
    • "unloaded": not loaded
  • threads: the number of threads running in the service
  • resources: a REST Service Resource Hash
  • log_url: a complete URL to the websocket source for the service log
  • options: a hash of options set on the service
  • connections: a list of connection objects that this service depends on; each list element is a REST Connection Dependency Hash (may be empty)
  • alerts: a list of alerts raised against the service; each list element is a REST Alert Hash (may be empty)
  • state: a hash of saved service state data (if any); see svc_save_state_data() for more info

PUT /api/latest/services/{id_or_name}

Description
Performs a single update of the service and returns the value for that update.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body): Note that if multiple arguments are passed, only the first recognized argument is processed in the order listed above.
Return Value
This API returns return values depending on the arguments; see the links above for more information
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
permissions are required depending on the arugments used; see links in the argument section for more information

PUT /api/latest/services/{id_or_name}?action=disable

Description
Disables the current service.
Return Value
This API returns a hash with the following keys:
  • type: the service type one of:
    • "system": for system services
    • "user": for user services
  • name: the service name
  • version: the service version
  • serviceid: the service ID
  • info: info about the service disable action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note

PUT /api/latest/services/{id_or_name}?action=enable

Description
Enables the current service if it is disabled.
Return Value
This API returns a hash with the following keys:
  • type: the service type one of:
    • "system": for system services
    • "user": for user services
  • name: the service name
  • version: the service version
  • serviceid: the service ID
  • info: info about the service enable action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note

PUT /api/latest/services/{id_or_name}?action=init

Description
Loads and initializes the current service if it is not already loaded.
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-ERROR: the given service cannot be loaded (error initializing the service)
Note

POST /api/latest/services/{id_or_name}?action=kill

Description
Kills a remote service cluster process
Return Value
This API returns a hash with the following keys:
  • status: "OK", "ERR" if not
  • code: the return code of the kill() command: 0 if successful, non-zero if not
Errors
  • 404 Not Found: this response is returned if no process is running for the current service
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

PUT /api/latest/services/{id_or_name}?action=load

Description
Loads and initializes the current service if it is not already loaded.
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-ERROR: the given service cannot be loaded (error initializing the service)
Note

PUT /api/latest/services/{id_or_name}?action=reset

Description
Unloads the current service (if loaded) and reloads it from the database.
Return Value
This API returns True if the service was already loaded before this call, False if not
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_RESET_SERVICE

PUT /api/latest/services/{id_or_name}?action=setAutostart

Description
Sets the autostart status of the current service
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • autostart: (required) the autostart status for the service (parsed with parse_boolean())
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "autostart" hash argument
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_SET_SERVICE_AUTOSTART

PUT /api/latest/services/{id_or_name}?action=setOptions

Description
Sets the options given in the hash on the current service, which is loaded and initialized if not already loaded. Options set override the system options of the same name. Only system options valid for services may be set. If an exception is thrown due to an option error, all other options will still be set.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: a hash of options to set against the service; if the value of this key is a string, then it is first parsed with Util::parse_to_qore_value(), which should then return a hash
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "options" argument or "options" is not a hash (or string parsed to a hash with Util::parse_to_qore_value())
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-ERROR: the given service cannot be loaded (error initializing the service)
  • 409 Conflict: SERVICE-OPTION-ERROR: invalid option
Note
requires permission OMQ::QR_SERVICE_CONTROL or OMQ::QR_SET_SERVICE_OPTIONS

PUT /api/latest/services/{id_or_name}?action=setRemote

Description
Sets the remote value for the current service.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • remote: (required) parsed with Qore::parse_boolean(); a boolean value giving the new remote value for the service
Return Value
This API returns a hash with the following keys:
  • updated: True or False
  • remote: the new remote value
  • info: info about the service update action
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SERVICE-SETREMOTE-ERROR: missing remote argument; cannot update the remote value to True on system services
Note
  • requires permission OMQ::QR_SERVICE_CONTROL
  • services that have their remote value changed are temporarily disabled and then reenabled after the change

PUT /api/latest/services/{id_or_name}?action=setStateData

Description
Provides an API for externally updating service state data
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • data: a hash of new service state data or NOTHING which will clear any data
Return Value
This API returns the new data or NOTHING if the data is cleared
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
Note
requires permission OMQ::QR_SERVICE_CONTROL
See also

PUT /api/latest/services/{id_or_name}?action=start

Description
Loads and initializes the current service if it is not already loaded.
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-ERROR: the given service cannot be loaded (error initializing the service)
Note

PUT /api/latest/services/{id_or_name}?action=stop

Unloads the current service from the system. If the service is running, it is first stopped. Additionally, any outstanding method calls must return before the service can be unloaded.

Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-NOT-LOADED: this exception is thrown when the service is not loaded
Note

PUT /api/latest/services/{id_or_name}?action=stream

Description
Opens a PUT stream for the named stream if the service implements that stream.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stream: (required) the name of the stream to open
Return Value
See documentation for the stream implemented by the service.

POST /api/latest/services/{id_or_name}?action=stream

Description
Opens a POST stream for the named stream if the service implements that stream.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stream: (required) the name of the stream to open
Return Value
See documentation for the stream implemented by the service.

DELETE /api/latest/services/{id_or_name}?action=stream

Description
Opens a DELETE stream for the named stream if the service implements that stream.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stream: (required) the name of the stream to open
Return Value
See documentation for the stream implemented by the service.

GET /api/latest/services/{id_or_name}?action=stream

Description
Opens a GET stream for the named stream if the service implements that stream.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • stream: (required) the name of the stream to open
Return Value
See documentation for the stream implemented by the service.

PUT /api/latest/services/{id_or_name}?action=unload

Unloads the current service from the system. If the service is running, it is first stopped. Additionally, any outstanding method calls must return before the service can be unloaded.

Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 409 Conflict: SERVICE-NOT-LOADED: this exception is thrown when the service is not loaded
Note

/api/latest/services/{id_or_name}/authlabels

This REST URI path provides actions and information for system functionality

GET /api/latest/services/{id_or_name}/authlabels

Description
Gets list of authentication labels associated wth the service
Return Value
Returns hash of labels and their values

PUT /api/latest/services/{id_or_name}/authlabels

Description

Updates authentication labels associated wth the service

Input Value
Hash with label names and their values where keys are authentication labels and values have one of the following two values:
  • "default": default Qorus authentication is used
  • "permissive": all requests are accepted with no authentication necessary
Return Value
String "OK" representing the authentication labels were updated successfully
Errors
In case of any error, HTTP status 409 is returned and standard Qorus error hash is retuned in response body

/api/latest/services/{id_or_name}/config

This REST URI path provides actions and information related to Qorus service configuration items

GET /api/latest/services/{id_or_name}/config

Description
Returns a list of service configuration items for the service
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "value": the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "level": the level from where the value is obtained (interface level (e.g. "step:1", "workflow:1") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)

GET /api/latest/services/{id_or_name}/config?action=yaml

Description
Returns a list of service configuration items for the service as a YAML-serialized string
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (YAML-serialized string) the default value of the configuration item
  • "value": (YAML-serialized string) the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string)
  • "level": the level from where the value is obtained (interface level (e.g. "step:1", "workflow:1") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded

/api/latest/services/{id_or_name}/config/{name}

This REST URI path provides actions and information related to a particular Qorus service configuration item

DELETE /api/latest/services/{id_or_name}/config/{name}

Description
Permanently deletes the current value for the configuration item on this service level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value: deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

GET /api/latest/services/{id_or_name}/config/{name}

Description
Returns a hash for the current service configuration item
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "value": the value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "level": the level from where the value is obtained (interface level (e.g. "service:1", "service:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)

PUT /api/latest/services/{id_or_name}/config/{name}

Description
Sets the value for the given service configuration item
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value: the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 404 Bad Request: returned if the request has no value key
Note

PUT /api/latest/services/{id_or_name}/config/{name}?action=yaml

Description
Sets the value for the given service configuration item using a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: (YAML-serialized string) the value of the configuration item
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value (YAML-serialized string): the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)
  • 404 Bad Request: returned if the request has no value key
Note

GET /api/latest/services/{id_or_name}/config/{name}?action=yaml

Description
Returns a hash for the current service configuration item as a serialized YAML string
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (serialized YAML string) the default value of the configuration item
  • "value": (serialized YAML string) the current value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "is_set": True if the value is set otherwise False
  • "config_group": the group of the configuration item
  • "allowed_values": (serialized YAML string) the list of allowed values for the configuration item if defined
  • "level": the level from where the value is obtained (interface level (e.g. "service:1", "service:2") or "global" or "default")
  • "is_templated_string": True if the value is a templated string that can be later expanded
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)

DELETE /api/latest/services/{id_or_name}/config/{name}?action=yaml

Description
Permanently deletes the current value for the configuration item on this service level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value (YAML-serialized string): deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

/api/latest/services/{id_or_name}/methods

This REST URI path provides actions and information related to Qorus service methods for a given service.

GET /api/latest/services/{id_or_name}/methods

Description
Returns information about service methods for the given service
Return Value
This API returns a list of REST Service Method Hash elements
Errors
  • 403 Forbidden: SERVICE-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given service (for more information, see Interface Groups)

/api/latest/services/{id_or_name}/resource_files

This REST URI path provides information about service resource files.

GET /api/latest/services/{id_or_name}/resource_files

Return Value
Returns a hash of service resource information; the keys are the resource name, the values hashes with the following keys:
  • type: the type code for the service resource

/api/latest/services/{id_or_name}/resource_files/{name}

This REST URI path provides information about a particular service resource file.

GET /api/latest/services/{id_or_name}/resource_files/{name}

Return Value
Returns a hash of service resource file information with the following keys:
  • type: the type code for the service resource
  • data: the data of the service resource

/api/latest/services/{id_or_name}/{method}

This REST path provides actions and information about service methods

GET /api/latest/services/{id_or_name}/{method}

Return Value
This API returns a REST Service Method Hash describing the service method with the addition of the following keys describing the service:
  • service_status: the status of the service; one of:
    • "loaded": loaded but not running
    • "running": loaded and running with at least one service thread
    • "unloaded": not loaded
  • serviceid: the ID of the service
  • service_name: the name of the service
  • service_type: the type of the service; one of:
    • "system": for system services
    • "user": for user services

PUT /api/latest/services/{id_or_name}/{method}?action=call

Description
Calls the current service method with any argument given and returns the result; the service is loaded and started if necessary.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the method arguments; parse_args takes precedence over args
  • [args]: any arguments passed here will be used directly as the method arguments
Return Value
This API returns result of calling the current service method
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SERVICE-ERROR: invalid method call; missing method name
Note
requires permission OMQ::QR_CALL_SYSTEM_SERVICES_RW (for methods with the write flag set) or OMQ::QR_CALL_SYSTEM_SERVICES_RO for system services, OMQ::QR_CALL_USER_SERVICES_RW (for methods with the write flag set) or OMQ::QR_CALL_USER_SERVICES_RO for user services

/api/latest/slas

This REST URI path provides actions and information about Qorus SLAs

GET /api/latest/slas

Description
Returns information about SLAs to the calling user.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then a list of hashes is returned, one element for each SLA; each hash in the returned list represents an SLA as a OMQ::SlaInfo hash

POST /api/latest/slas

Description
Creates a system SLA according to the arguments.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name (string; required): the unique name of the SLA
  • units (string; required): describes the meaning of SLA event values (allowed values: "seconds" and "other"; default: "seconds")
  • description (string; required): the description of the SLA
Return Value
A OMQ::SlaInfo hash of the SLA created or of the existing SLA if all arguments match an existing SLA exactly
Errors
  • 409 Conflict: SLA-ERROR: missing required argument; the given SLA name already exists
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_CREATE_SLA or OMQ::QR_SLA_CONTROL

GET /api/latest/slas?action=events

Description
Returns a list of SLA events matching the search arguments; the archive schema is also searched if fewer than the maximum number of results is found in the main schema.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: return the results in descending order
  • err: the error string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • errdesc: the error description string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • name: the name of the SLA; can be a list of names or a string with "%" characters for SQL like matching
  • limit: max number of rows to return, if not given, then the value of the "row-limit" option is used (default: 100)
  • mindate: minimum SLA event timestamp (inclusive, meaning ">=" comparisons used)
  • maxdate: maximum SLA event timestamp (exclusive, meaning "<" comparisons used)
  • offset: row offset
  • producer: the producer string of SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • slaid: the SLA ID, can be a list of IDs
  • sort: columns for sorting the results
  • success: filter for sucessful calls (1) or errored calls (0)
Return Value
A list of hashes is returned, one element for each matching SLA event; each element in the returned list is an OMQ::SlaEventInfo hash

GET /api/latest/slas?action=performance

Description
Returns a list of SLA events matching the search arguments; the archive schema is also searched if fewer than the maximum number of results is found in the main schema.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • err: the error string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • errdesc: the error description string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • grouping: (optional) possible values for reporting performance statistics:
    • "hourly": hourly grouping
    • "daily": daily grouping
    • "monthly": monthly grouping
    • "yearly": yearly grouping
  • name: the name of the SLA; can be a list of names or a string with "%" characters for SQL like matching
  • maxdate: maximum SLA event timestamp (exclusive, meaning "<" comparisons used)
  • mindate: minimum SLA event timestamp (inclusive, meaning ">=" comparisons used)
  • producer: the producer string of SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • slaid: the SLA ID, can be a list of IDs
  • success: filter for sucessful calls (1) or errored calls (0)
Returns
an empty list if no events are matched, otherwise a list of OMQ::SlaPerformanceInfo hashes

/api/latest/slas/{sla}

This REST URI path provides actions and information about a particular Qorus SLA

DELETE /api/latest/slas/{sla}

Description
Deletes the SLA from the system.
Return Value
A OMQ::SlaInfo hash of the SLA deleted
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_DELETE_SLA or OMQ::QR_SLA_CONTROL

GET /api/latest/slas/{sla}

Description
Returns information about the SLA to the calling user.
Return Value
A OMQ::SlaInfo hash of the SLA

GET /api/latest/slas/{sla}?action=events

Description
Returns a list of SLA events matching the search arguments; the archive schema is also searched if fewer than the maximum number of results is found in the main schema.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: return the results in descending order
  • err: the error string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • errdesc: the error description string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • limit: max number of rows to return, if not given, then the value of the "row-limit" option is used (default: 100)
  • mindate: minimum SLA event timestamp (inclusive, meaning ">=" comparisons used)
  • maxdate: maximum SLA event timestamp (exclusive, meaning "<" comparisons used)
  • offset: row offset
  • producer: the producer string of SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • sort: columns for sorting the results
Return Value
A list of hashes is returned, one element for each matching SLA event; each element in the returned list is an OMQ::SlaEventInfo hash

GET /api/latest/slas/{sla}?action=performance

Description
Returns a list of SLA events matching the search arguments; the archive schema is also searched if fewer than the maximum number of results is found in the main schema.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • err: the error string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • errdesc: the error description string of unsucessful SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • grouping: (optional) possible values for reporting performance statistics:
    • "hourly": hourly grouping
    • "daily": daily grouping
    • "monthly": monthly grouping
    • "yearly": yearly grouping
  • maxdate: maximum SLA event timestamp (exclusive, meaning "<" comparisons used)
  • mindate: minimum SLA event timestamp (inclusive, meaning ">=" comparisons used)
  • producer: the producer string of SLA events; can be a list of strings or a string with "%" characters for SQL like matching
  • success: filter for sucessful calls (1) or errored calls (0)
Returns
an empty list if no events are matched, otherwise a list of OMQ::SlaPerformanceInfo hashes

PUT /api/latest/slas/{sla}?action=removeJob

Description
Removes the current SLA from the job specified with the required arguments (if associated).
Arguments
This API takes the following required hash argument (either as a URI argument or in the message body):
  • job (string): the name of the job
Return Value
A hash with the following keys is returned:
  • job (string): the name of the job
  • slaid (int): the SLA ID set on the given job
  • removed (bool): True if removed, False if not (not associated)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_MODIFY_SLA or OMQ::QR_SLA_CONTROL

PUT /api/latest/slas/{sla}?action=removeMethod

Description
Removes the current SLA from the user service method specified with the required arguments (if associated).
Arguments
This API takes the following required hash arguments (either as URI arguments or in the message body):
  • service (string): the name of the user service
  • method (string): the name of the service method
Return Value
A hash with the following keys is returned:
  • service (string): the name of the user service
  • method (string): the name of the service method
  • slaid (int): the current SLA ID
  • removed (bool): True if removed, False if not (not associated)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_MODIFY_SLA or OMQ::QR_SLA_CONTROL

PUT /api/latest/slas/{sla}?action=setJob

Description
Sets the current SLA against the job specified with the required arguments; after this call, job instance execution will be tracked with success and failure and call times.
Arguments
This API takes the following required hash argument (either as a URI argument or in the message body):
  • job (string): the name of the job
Return Value
A hash with the following keys is returned:
  • job (string): the name of the job
  • slaid (int): the SLA ID set on the given job
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_MODIFY_SLA or OMQ::QR_SLA_CONTROL

PUT /api/latest/slas/{sla}?action=setMethod

Description
Sets the current SLA against the user service method specified with the required arguments; after this call, user service calls to the specified method will be tracked with success and failure and call times.
Arguments
This API takes the following required hash arguments (either as URI arguments or in the message body):
  • service (string): the name of the user service
  • method (string): the name of the service method
Return Value
A hash with the following keys is returned:
  • service (string): the name of the user service
  • method (string): the name of the service method
  • slaid (int): the SLA ID set on the given user service method
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_MODIFY_SLA or OMQ::QR_SLA_CONTROL

/api/latest/steps

This REST API path provides actions and information about specific workflow steps

GET /api/latest/steps

Description
Returns a list of hashes of all steps
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a list of REST Step Hash V3 elements (if neither list nor short options are passed as above).

GET /api/latest/steps?action=list

Description
Identical to GET /api/steps
See also
GET /api/steps

/api/latest/steps/{id_or_name}

This REST API path provides actions and information about specific workflow steps

GET /api/latest/steps/{id_or_name}

Description

Returns a hash of information about the current step.

Return Value
This API returns a REST Step Hash providing about the current step plus additional keys as follows:
  • functions: if the step is a class step with step functions, this element is returned as a list of REST Function Hash elements with the following additional key:
    • type: a string specifying the role the function fulfils for the step; one of:
      • "primary": the primary step function
      • "validation": the validation function
      • "array": the ref arrayfunc "array function"
      • "async-end": the ref asyncbackendfunc "back end function"
  • class: if the step is a new-style step implemented by a single class, then this element is returned as a REST Class Hash
  • desc: the step description
  • config: a hash of step configuration item information keyed by configuration item and with hash values with the followin keys:
    • "name": the name of the configuration item
    • "type": the type of the configuration item
    • "desc": the description of the configuration item
    • "default_value": the default value of the configuration item
    • "strictly_local": if the configuration item is defined strictly on local level
    • "config_group": the group of the configuration item
    • "allowed_values": the list of allowed values for the configuration item if defined

/api/latest/steps/{id_or_name}/config

This REST URI path provides actions and information related to Qorus step configuration items

GET /api/latest/steps/{id_or_name}/config

Description
Returns a list of step configuration items for the step
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined Note: to obtain values the workflows/{id_or_name}/stepinfo/{id_or_name}/config REST API should be used

GET /api/latest/steps/{id_or_name}/config?action=yaml

Description
Returns a list of step configuration items for the step as a YAML-serialized string
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (YAML-serialized string) the default value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string) Note: to obtain value the workflows/{id_or_name}/stepinfo/{id_or_name}/config REST API should be used

/api/latest/steps/{id_or_name}/config/{name}

This REST URI path provides actions and information related to a particular Qorus step configuration item

DELETE /api/latest/steps/{id_or_name}/config/{name}

Description
Permanently deletes the current value for the configuration item on this step level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value: deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

GET /api/latest/steps/{id_or_name}/config/{name}

Description
Returns a hash for the current step configuration item
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": the default value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined Note: to obtain value the workflows/{id_or_name}/stepinfo/{id_or_name}/config REST API should be used

PUT /api/latest/steps/{id_or_name}/config/{name}

Description
Sets the value for the given step configuration item
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value: the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Bad Request: returned if the request has no value key
Note

PUT /api/latest/steps/{id_or_name}/config/{name}?action=yaml

Description
Sets the value for the given step configuration item using a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value (YAML-serialized string): the value of the configuration item
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value (YAML-serialized string): the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Bad Request: returned if the request has no value key
Note

GET /api/latest/steps/{id_or_name}/config/{name}?action=yaml

Description
Returns a hash for the current step configuration item as a YAML-serialized string
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "desc": the description of the configuration item
  • "default_value": (YAML-serialized string) the default value of the configuration item
  • "strictly_local": if the configuration item is defined strictly on local level
  • "config_group": the group of the configuration item
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string) Note: to obtain value the workflows/{id_or_name}/stepinfo/{id_or_name}/config REST API should be used

DELETE /api/latest/steps/{id_or_name}/config/{name}?action=yaml

Description
Permanently deletes the current value for the configuration item on this step level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value (YAML-serialized string): deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

/api/latest/sync-events

This REST URI path provides actions and information about workflow synchronization events

GET /api/latest/sync-events

Description
Returns a list of hashes of information about workflow synchronization event types
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • list: optional; parsed with Qore::parse_boolean(); if True then a list of workflow synchronization event names is returned
  • short: optional; parsed with Qore::parse_boolean(); if True then a list of short strings with workflow synchronization event names and brief info is returned
Return Value
If neither list nor short are used, then this API returns a list of REST Workflow Synchronization Event Type Hash elements

GET /api/latest/sync-events?action=events

Description
Returns a hash of information about the current workflow synchronization event type
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: parsed with Qore::parse_boolean(); if True, return in descending order
  • eventkey: the event key value
  • eventname: the event type name
  • id: one or more event type IDs
  • limit: max number of rows to return
  • maxmodified: if present, parsed as a date; maximum modified date
  • modified: if present, parsed as a date; minimum modified date
  • offset: row offset
  • posted: the event posted status (True or False)
  • sort: a comma-separated string will be split into a list;columns for sorting the results
Return Value
This API returns a list of REST Workflow Synchronization Event Type Hash elements
See also

/api/latest/sync-events/{type}

This REST URI path provides actions and information about workflow synchronization event types

GET /api/latest/sync-events/{type}

Description
Returns a hash of information about the current workflow synchronization event type
Return Value
This API returns a REST Workflow Synchronization Event Type Hash

GET /api/latest/sync-events/{type}?action=events

Description
Returns a hash of information about the current workflow synchronization event type
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • desc: parsed with Qore::parse_boolean(); if True, return in descending order
  • eventkey: the event key value
  • eventname: the event type name
  • limit: max number of rows to return
  • maxmodified: if present, parsed as a date; maximum modified date
  • modified: if present, parsed as a date; minimum modified date
  • offset: row offset
  • posted: the event posted status (True or False)
  • sort: a comma-separated string will be split into a list;columns for sorting the results
Return Value
This API returns a list of REST Workflow Synchronization Event Type Hash elements
See also

PUT /api/latest/sync-events/{type}?action=post

Description
Posts a workflow synchronization event, allowing all workflow steps blocked on that event to continue processing.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • eventkey: (required) the workflow synchronization event key
Return Value
This API returns a boolean value as follows:
  • True: the event was posted for the first time with this call
  • False: the event was already posted before this call
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: POST-ERROR: missing eventkey argument
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_POST_WORKFLOW_EVENT
See also

/api/latest/sync-events/{type}/{key}

This REST URI path provides actions and information about a particular workflow synchronization event key

GET /api/latest/sync-events/{type}/{key}

Description
Returns a hash of information about the current workflow synchronization event
Return Value
This API returns a REST Workflow Synchronization Event Hash

PUT /api/latest/sync-events/{type}/{key}?action=post

Description
Posts a workflow synchronization event, allowing all workflow steps blocked on that event to continue processing.
Return Value
This API returns a boolean value as follows:
  • True: the event was posted for the first time with this call
  • False: the event was already posted before this call
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_WORKFLOW_CONTROL, OMQ::QR_WORKFLOW_ORDER_CONTROL, or OMQ::QR_POST_WORKFLOW_EVENT
See also

/api/latest/system

This REST URI path provides actions and information for system functionality

GET /api/latest/system

Description
Returns a hash of system information
Return Value
This API returns a hash with the following keys:
  • instance-key: (string) the system instance key
  • session-id: (int) the application session id
  • omq-version: (string) the version of the server
  • qore-version: (string) the version of the underlying qore library used
  • modules: (hash) a hash of module info as returned by Qore::get_module_hash()
  • datamodel-version: (string) the version of the datamodel expected by the server
  • omq-schema: (string) "user@dbname" string for the system "omq" datasource
  • omq-driver: (string) driver name for the system "omq" datasource
  • omq-db-version: (string) database server version for the system "omq" datasource
  • omquser-schema: (string) "user@dbname" string for the "omquser" datasource
  • omquser-driver: (string) driver name for the "omquser" datasource
  • omquser-db-version: (string) database server version for the "omquser" datasource
  • starttime: (date) date and time the server was started
  • hostname: (string) hostname where the server is running
  • pid: (int) PID of the server process
  • threads: (int) count of currently active threads
  • schema-properties: (hash) hash of actual schema properties (identical to system property domain "omq")
  • omq_dir: (string) the application directory or "LSB" for Linux Standard Base filesystem integration
  • cluster_info: a hash keyed by node name with values as hashes as follows:
    • node_priv: (int) total private memory user by the cluster per node
    • node_priv_str: (string) total private memory user by the cluster per node as a string
    • node_ram: (int) total RAM on the node
    • node_ram_str: (string) total RAM on the node as a string
    • node_ram_in_use: (int) in use RAM on the node
    • node_ram_str: (string) in use RAM on the node as a string
    • node_cpu_count: (int) the number of CPUs on the node
    • node_load_pct: (float) the average load on the machine over the last minute
    • mem_history: a list of hashes giving up to 10 historical memory changes on the node with the following keys in each hash:
      • timestamp: the timestamp of the change
      • age: (float) the age in fractional seconds of the timestamp
      • node_priv: (int) total RAM user by the cluster per node
      • node_priv_str: (string) total RAM user by the cluster per node as a string
      • node_ram_in_use: (int) in use RAM on the node
      • node_ram_str: (string) in use RAM on the node as a string
      • node_cpu_count: (int) the number of CPUs on the node
      • node_load_pct: (float) the average load on the machine over the last minute
    • proc_count: (int) the number of processes running on the node
    • proc_history: a list of hashes giving up to 10 historical process count changes on the node with the following keys in each hash:
      • timestamp: (date) the timestamp of the change
      • age: (float) the age in fractional seconds of the timestamp
      • count: (int) the number of processes at that time
  • processes: (hash) a hash keyed by cluster process name where values are process info hashes
  • order_stats: (list) a list of workflow order processing statistics; list values are OrderSummaryOutputInfo hashes with combined statistics for all workflows
  • auth_label_values: (list<string>) a list of supported values for service auth labels
  • logfile: (string) path to system log file
  • http_logfile: (string) path to system HTTP server log file
  • monitoring_logfile: (string) path to system monitoring log file
  • alert_logfile: (string) path to system alert log file
  • cache_size: (int) the current size of the workflow order data cache
  • shutting_down: (bool) a flag if the system is shutting down
  • build-type: (string) the type of build of the server ("Production" or "Debug")
  • runtime-properties: (hash) a hash of runtime properties
  • alert-summary: (hash) a hash with the following keys:
    • transient: (int) number of transient alerts
    • ongoing: (int) number of ongoing alerts
  • debug: system debugging flag (when True then more information is provided with exceptions)
  • health: a string color code for the health of the system with the following values:
    • "GREEN": good health
    • "YELLOW": warning
    • "RED": problems
  • system_log_url: a URL to the websocket source for the main system log
  • audit_log_url: a URL to the websocket source for the audit log
  • http_log_url: a URL to the websocket source for the HTTP server log
  • mon_log_url: a URL to the websocket source for the monitoring log
  • alert_log_url: a URL to the websocket source for the alert log
  • limits: a hash of system limit information with the following keys:
    • nofile: the maximum number of descriptors available to qorus processes
    • nproc: the maximum number of threads in a single Qorus process

POST /api/latest/system?action=defaultLogger

Description
Create system Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/system?action=defaultLogger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system?action=defaultLogger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system?action=defaultLogger

Description
Returns system default logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type.

POST /api/latest/system?action=defaultLoggerAppenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/system?action=defaultLoggerAppenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system?action=defaultLoggerAppenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system?action=defaultLoggerAppenders

Description
Return system logger appenders
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

GET /api/latest/system?action=echo

Description
Returns the arguments passed
Return Value
The arguments passed

GET /api/latest/system?action=ping

Description
Returns "OK"
Return Value
This API returns "OK" upon successful execution

PUT /api/latest/system?action=reloadRbac

Description
Reloads the all Role Based Access Control information (users, permissions, roles, groups) from the system schema
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_RELOAD_RBAC

PUT /api/latest/system?action=restart

Description
Shuts down and restarts the system; this call starts the process and returns immediately
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • timeout: (optional) a timeout in seconds; the currently running system will be killed if it does not shut down within this time period; if not given, the default timeout is 2 minutes (120 seconds)
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SHUTDOWN
See also

PUT /api/latest/system?action=rotateLogFiles

Description
Rotates all system log files. The number of old log files kept is controlled by system option qorus.max-log-files
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_ROTATE_LOG_FILES or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system?action=setDebug

Description
Turns system debugging on or off; when system debugging is enabled, additional information is logged when exceptions are thrown
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns a hash with the following key:
  • system-debugging: the system debugging setting as a boolean value

PUT /api/latest/system?action=shutdown

Description
This API will start the asynchronous shutdown process in the Qorus system. The response indicates only that the shutdown process has begun, and not that the system has been fully shut down. Check the log file or the process list to verify that the system has completely stopped.
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SHUTDOWN-ALREADY-IN-PROGRESS: system shutdown is already in progress
Note
requires permission OMQ::QR_SHUTDOWN
See also

PUT /api/latest/system?action=shutdownWait

Description
Shuts down the system and returns when the system shutdown process is complete.
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SHUTDOWN
See also

PUT /api/latest/system?action=stream

Description
Returns a test stream depending on the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); all keys are optional:
  • stream: (optional) the name of the stream to return; can be:
    • "DataStream": returns a short output DataStream of lists of hashes
    • "EchoDataStream": returns an input/output DataStream where the input is immediately returned as output
    • any other value: returns a short test stream of string data
Return Value
Returns a stream depending on the arguments; see above for details

POST /api/latest/system?action=stream

Description
Returns a test stream depending on the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); all keys are optional:
  • stream: (optional) the name of the stream to return; can be:
    • "DataStream": returns a short output DataStream of lists of hashes
    • "EchoDataStream": returns an input/output DataStream where the input is immediately returned as output
    • any other value: returns a short test stream of string data
Return Value
Returns a stream depending on the arguments; see above for details

GET /api/latest/system?action=stream

Description
Returns a test stream depending on the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); all keys are optional:
  • stream: (optional) the name of the stream to return; can be:
    • "DataStream": returns a short output DataStream of lists of hashes
    • any other value: returns a short test stream of string data
Return Value
Returns a stream depending on the arguments; see above for details

GET /api/latest/system?action=validateWsToken

Description
Returns the username associated with the given token or NOTHING if the token is not valid
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • token: (required) the token string
Return Value
The username corresponding to the token if the token is valid otherwise NOTHING
Deprecated:
this function is kept only for backward compatibility with the old UI.

GET /api/latest/system?action=wstoken

Description
Returns a token for web socket communication
Return Value
A string token to be used for websocket communication
Deprecated:
this function is kept only for backward compatibility with the old UI.

/api/latest/system/alert/logger

This URI path provides ability to customize the Qorus alert logger

DELETE /api/latest/system/alert/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/alert/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/alert/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/alert/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/alerts

This REST URI path provides actions and information related to system alerts

GET /api/latest/system/alerts

Description
Returns a list of hashes of information about system alerts
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • remote: (optional) the name of a remote Qorus connection to retrieve alerts for and add to the return value
  • summary: (optional) parsed with Qore::parse_boolean(); if True the return value is a hash with the following keys:
    • "cutoff": the transient cut off date used
    • "transient": the count of transient alerts
    • "ongoing": the count of ongoing alerts
  • cutoff: (optional) parsed as a date; the cutoff date/time for transient alerts (only used when summary is True); transient events after this point in time are not considered in the summarized result
Return Value
This API returns a list of REST Alert Hash elements for system alerts unless the summary option is passed (see above for details)

/api/latest/system/alerts/ongoing

This REST URI path provides actions and information related to ongoing system alerts

GET /api/latest/system/alerts/ongoing

Description
Returns a list of hashes of information about ongoing system alerts
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • remote: (optional) the name of a remote Qorus connection to retrieve ongoing alerts for and add to the return value
Return Value
This API returns a list of REST Alert Hash elements for ongoing system alerts

/api/latest/system/alerts/transient

This REST URI path provides actions and information related to transient system alerts

GET /api/latest/system/alerts/transient

Description
Returns a list of hashes of information about transient system alerts
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • remote: (optional) the name of a remote Qorus connection to retrieve transient alerts for and add to the return value
  • max: (optional) the maximum number of local alerts to return; defaults to 50 if not given
Return Value
This API returns a list of REST Alert Hash elements for transient system alerts

/api/latest/system/api

This REST URI path provides actions and information about the system RPC API

PUT /api/latest/system/api?action=call

Description
Calls a system RPC API method and returns the return value
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • method: (required) the string method name to call; if no "." characters are found in the method name, then it is prefixed with "omq.system."; if the method starts with "system." or "user.", then "omq." is prefixed to the method; if the method starts with "group." or "job.", then "omq.system." is prefixed to the method name
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the method arguments; parse_args takes precedence over args
  • [args]: any arguments passed here will be used directly as the method arguments
Return Value
This API returns result of calling the given RPC API method with the given arguments
Errors
  • 409 Conflict: API-ERROR: missing or invalid "method" key
See also
the RPC API method in question for information about arguments, return types, or permissions required

/api/latest/system/audit/logger

This URI path provides ability to customize the Qorus audit logger

DELETE /api/latest/system/audit/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/audit/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/audit/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/audit/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/authlabels

This REST URI path provides information about authentication labels

GET /api/latest/system/authlabels

Description
Returns a hash of authentication labels existing in Qorus
Return Value
This API returns a hash with the following keys:
  • authlabelid: (string) key for the hash value assigned a value of a list of hashes with the following keys:
    • authlabelid: (string) unique identifier of the label
    • serviceid: (int) the service ID again
    • value: (string) the value of the authentication label
    • servicename: (string) the name of the service

/api/latest/system/config

This REST URI path provides actions and information related to Qorus configuration item values on the global level

GET /api/latest/system/config

Description
Returns a list of all configuration item values on the global level
Return Value
This API returns a list of hashes with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "value": the value of the configuration item
  • "is_set": True if the value is set otherwise False
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "is_templated_string": True if the value is a templated string that can be later expanded

POST /api/latest/system/config

Description
Creates the value for the given workflow configuration item
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name: the name of the configuration item
  • value: the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value: the new value
  • info: info about the workflow configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: QR_SERVER_CONTROL: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 404 Bad Request: returned if the request has no value or name keys
Note

GET /api/latest/system/config?action=yaml

Description
Returns a list of all configuration item values on the global level
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "value": (YAML-serialized string) the value of the configuration item
  • "is_set": True if the value is set otherwise False
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string)
  • "is_templated_string": True if the value is a templated string that can be later expanded

POST /api/latest/system/config?action=yaml

Description
Sets the value for the given workflow configuration item using a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • name: the name of the configuration item
  • value: (YAML-serialized string) the value of the configuration item
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value (YAML-serialized string): the new value
  • info: info about the workflow configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Bad Request: returned if the request has no value or name keys
Note

/api/latest/system/config/{name}

This REST URI path provides actions and information related to a specific Qorus global configuration item

DELETE /api/latest/system/config/{name}

Description
Permanently deletes the current value for the configuration item on the global level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value: deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

GET /api/latest/system/config/{name}

Description
Returns a hash for the current configuration item value on the global level
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "value": the value of the configuration item
  • "is_set": True if the value is set otherwise False
  • "allowed_values": the list of allowed values for the configuration item if defined
  • "is_templated_string": True if the value is a templated string that can be later expanded

PUT /api/latest/system/config/{name}

Description
Sets the value for the given configuration item on the global level
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value (required): the value of the configuration item; must be compatible with the item's declared type
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value: the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Bad Request: returned if the request has no value key
  • 409 Conflict: CONFIG-ITEM-ERROR: this exception is thrown if an invalid type is given for the given configuration item
Note

PUT /api/latest/system/config/{name}?action=yaml

Description
Sets the value for the given global configuration item using a YAML-serialized string
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value (YAML-serialized string): the value of the configuration item
Return Value
This API returns a hash with the following keys:
  • inserted: True or False (returned if the value has been inserted)
  • updated: True or False (returned if the value has been updated)
  • value (YAML-serialized string): the new value
  • info: info about the service configuration item change action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 404 Bad Request: returned if the request has no value key
Note

GET /api/latest/system/config/{name}?action=yaml

Description
Returns a hash for the current configuration item value as a YAML-serialized string on the global level
Return Value
This API returns a hash with the following keys:
  • "name": the name of the configuration item
  • "type": the type of the configuration item
  • "value": (YAML-serialized string) the value of the configuration item
  • "is_set": True if the value is set otherwise False
  • "allowed_values": the list of allowed values for the configuration item if defined (each element is a YAML-serialized string)
  • "is_templated_string": True if the value is a templated string that can be later expanded

DELETE /api/latest/system/config/{name}?action=yaml

Description
Permanently deletes the current value for the configuration item on the global level
Return Value
This API returns a hash with the following key:
  • info: a string confirming the delete operation
  • deleted: True if value has been deleted
  • value (YAML-serialized string): deleted value
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

/api/latest/system/health

This REST URI path provides actions and information about system health

GET /api/latest/system/health

Description
Returns a hash describing the health of the system and monitored remote systems
Return Value
This API returns a hash with the following keys:
  • transient: the number of transient alerts
  • ongoing: the number of ongoing alerts
  • health: a string color code for the health of the system with the following values:
    • "GREEN": good health
    • "YELLOW": warning
    • "RED": problems
  • instance-key: the instance key for the system
  • remote: a list of health information for remotely-monitored Qorus instances with the same keys as this hash (minus "remote")
Return Value Example
hash: (5 members)
  transient : 0
  ongoing : 123
  health : "RED"
  instance-key : "quark-1"
  remote : <EMPTY LIST>

/api/latest/system/http/logger

This URI path provides ability to customize the Qorus http logger

DELETE /api/latest/system/http/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/http/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/http/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/http/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/listeners

This REST URI path provides actions and information related to Qorus HTTP listeners

GET /api/latest/system/listeners

Description
Returns a list of hashes of information about HTTP listeners
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Listener Hash elements

/api/latest/system/listeners/{id_or_name}

This REST URI path provides actions and information related to a specific HTTP listener

DELETE /api/latest/system/listeners/{id_or_name}

Description
Stops the current listener
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

GET /api/latest/system/listeners/{id_or_name}

Description
Returns a hash of information about the current listener
Return Value
This API returns a REST Listener Hash

GET /api/latest/system/listeners/{id_or_name}?action=logOptions

Description
Returns a code giving the logging options set for the current listener
Return Value
Returns the integer value of Listener Log Options set for the current listener combined by binary or
See also

PUT /api/latest/system/listeners/{id_or_name}?action=logVerboseAll

Description
Turns on and off verbose logging for the current listener; verbose logging means that HTTP headers and bodies are logged (which can produce lots of data in log files)
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • flag: (optional) if present, parsed with Qore::parse_boolean(); if True then verbose logging is enabled for the current listener, if False, then it is disabled; default value if not present True
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
  • requires permission OMQ::QR_SERVER_CONTROL
  • it is recommended to enable verbose logging only as a debug option
Warning
this option can result in sensitive data being logged; use with care
See also

PUT /api/latest/system/listeners/{id_or_name}?action=setLogOptions

Description
Sets logging options for the current listener according to the option argument passed
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "option" argument
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONTROL
Warning
this option can result in sensitive data being logged; use with care
See also

POST /api/latest/system/listeners/{id_or_name}?action=stop

Description
Stops the current listener
See also
This API is equivalent to DELETE /api/system/listeners/{id_or_name}; see that documentation for details.

/api/latest/system/logger/appenders

This URI path provides ability to customize Qorus system logger appenders

DELETE /api/latest/system/logger/appenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/logger/appenders

Description
Return system logger appenders
Arguments
This API takes the following argument as URI arguments:
  • id: (string) id of appender to get
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

POST /api/latest/system/logger/appenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/logger/appenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppender File, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/loggers

Returns all system loggers

GET /api/latest/system/loggers

Description
Returns all system loggers
Return Value
This API returns 200 OK and list with hashes with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) interface table name (jobs/workflows/services). If set means default logger

/api/latest/system/metadata

This REST URI path provides actions and information related to the system metadata cache.

Since
Qorus 4.0

PUT /api/latest/system/metadata?action=reload

Description
Reloads data in the named metadata caches and resets affected workflows, services, and jobs
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); all keys are optional:
  • workflows: a list of workflow IDs to reload in the metadata cache and reset
  • services: a list of service IDs to reload in the metadata cache and to reset
  • jobs: a list of job IDs to reload in the metadata cache and to reset
  • mappers: a list of mapper IDs to reload in the metadata cache
  • vmaps: a list of value map IDs to reload in the metadata cache
  • functions: a list of functions IDs to reload in the metadata cache
  • classes: a list of class IDs to reload in the metadata cache
  • constants: a list of constant IDs to reload in the metadata cache
  • queues: a list of queue IDs to reload in the metadata cache
  • events: a list of event IDs to reload in the metadata cache
  • steps: a list of step IDs to reload in the metadata cache
  • config_values: a list of config item names to reload their values in the metadata cache
Return Value
This method returns a hash with keys depending on the arguments as follows:
  • workflows: the number of workflows updated in the metadata cache
  • services: the number of services updated in the metadata cache
  • jobs: the number of jobs updated in the metadata cache
  • mappers: the number of mappers updated in the metadata cache
  • vmaps: the number of value maps updated in the metadata cache
  • functions: the number of functions updated in the metadata cache
  • classes: the number of classes updated in the metadata cache
  • constants: the number of constants updated in the metadata cache
  • queues: the number of queues updated in the metadata cache
  • events: the number of events updated in the metadata cache
  • steps: the number of steps updated in the metadata cache
  • config_values: the number of configuration item values updated in the metadata cache
  • workflow_reset: a hash of workflow reset info; see the return value of PUT /api/workflows?action=reset for a description of this hash
  • service_reset: a hash of service reset info; see the return value of PUT /api/services?action=reset for a description of this hash
  • job_reset: a hash of job reset info; see the return value of PUT /api/jobs?action=reset for a description of this hash
Errors
  • 409 Conflict: METADATA-RELOAD-ERROR: unknown metadata keys passed
Note
requires permissions depending on the arguments:

/api/latest/system/metadata/reload

See also PUT /api/v3/system/metadata?action=reload

/api/latest/system/metadata/reload/{object_type}

object_type can be one of following PUT calls:

  • all: reload all maps
  • functions
  • classes
  • constants
  • queues
  • events
  • mappers
  • vmaps
  • steps
  • workflows
  • services
  • jobs
  • slas
  • config_values

/api/latest/system/metadata/{lookup}

This REST URI path provides information related to the system metadata maps and lookups.

This set of API calls provides a thread-safe cache for internal Qorus data. The underlying functionality provided by this service has been moved into the Qorus server to avoid race conditions and dependencies with the service infrastructure. Qorus internally and Qorus system services no longer use this service for metadata lookups, but rather use internal functionality directly.

Named Caches

  • GET systemserviceids: list of all system service ids
  • GET userserviceids: list of all user service ids (currently only available with dumpMap("userserviceids"))
  • GET stepmap: map of stepids to step info
  • GET steprmap: map of names to step info
  • GET functionmap: map of function instance ids to function info
  • GET functionrmap: map of function names to function instance ids
  • GET qmap: map of queue ids to queue info
  • GET qrmap: map of queue names to queue ids
  • GET sla: map of SLA ids to SLA info
  • GET slarmap: map of SLA names to SLA ids
  • GET mmap: map of mapper ids to mapper info
  • GET mrmap: map of mapper names and versions to mapper IDs
  • GET wfmap: map of workflow ids to workflow info
  • GET wfrmap: map of workflow names to workflow ids
  • GET wfids: list of all workflow ids
  • GET constmap: map of constant ids to constant info
  • GET constrmap: map of constant names to constant ids
  • GET classmap: map of class ids to constant info
  • GET classrmap: map of class names to class ids
  • GET emap: map of workflow synchronization event ids to workflow synchronization event info
  • GET ermap: map of workflow synchronization event type names to workflow synchronization event ids
  • GET servicemap: map of service ids to service info
  • GET servicermap: map of service names to service ids
  • GET serviceamap: map of service types (lower case) -> names -> hash (serviceid, version)
  • GET svcids: list of all service ids
  • GET jmap: map of job ids to job info
  • GET jrmap: map of job names to job ids
  • GET jobids: list of all job ids
  • GET vmmap: map of value map ids to value map info
  • GET vmrmap: map of value map names to value map IDs

Lookups

  • GET lookupstep/{stepid}
  • GET lookupstep/{stepid}/{verbose}
  • GET lookupsteps?ids={list of ids}

returns a hash of info for the given stepid(s) or no value if none of the step ids exist

Parameters
stepidthe step ID of the step
verboseadds detailed information about each function
Returns
a hash of step info for the given stepid or no value if the stepid does not exist
  • GET rlookupstep/{stepname}

looks up all versions of a step from the step's name

Parameters
namethe name of the step
Returns
nothing if the arguments do not match a cached step or a hash where the keys are version strings and the values are the corresponding step IDs and the following two special keys:
  • lvcreated: the creation date/time of the latest version of the step
  • lastversion: the version string of the latest version
Note
the latest version of the step is determined by the creation time of the step and not by a logical version string comparison
  • GET rlookupstep/{stepname}/{version}

looks up the stepid of a particular step from the name and version

Parameters
namethe name of the step
versionthe version of the step
Returns
nothing if the arguments do not match or the stepid for the latest version of the step
  • GET stepid/{name}
  • GET stepid/{name}/{version}
Parameters
namethe name of the step
versionthe version of the step
Returns
the stepid from the step name and optional version, thrown an exception if no match is found
  • GET lookupfunc/{funcid}
Parameters
funcidthe id of the function
Returns
hash with function metadata
Exceptions
OMQMAP-LOOKUPFUNC-ERRORthis error will be thrown if the function ID passed is not a valid function ID
  • GET rlookupfunc/{name}

looks up all versions of a function from the function's name

Parameters
namethe name of the function
Returns
nothing if the arguments do not match a cached function or a hash where the keys are version strings and the values are the corresponding function IDs and the following two special keys:
  • lvcreated: the creation date/time of the latest version of the function
  • lastversion: the version string of the latest version
Note
the latest version of the function is determined by the creation time of the function and not by a logical version string comparison
  • GET rlookupfunc/{name}/{version}

looks up the functionid of a particular function from the name and version

Parameters
namethe name of the function
versionthe version of the function
Returns
nothing if the arguments do not match or the functionid for the latest version of the function
Note
the latest version of the function is determined by the creation time of the function and not by a logical version string comparison
  • GET functionid/{name}
  • GET functionid/{name}/{version}
Parameters
namethe name of the function
versionthe version of the function
Returns
the functionid from the function name and optional version, thrown an exception if no match is found
  • GET lookupqueue/{qid}

looks up queue information from the queueid

Parameters
qidthe queueid to use for the lookup
Returns
no value if the given ID is not a valid queue ID or a hash of queue information with the following keys:
  • name: the name of the queue
  • serviceid: the service associated with the queue
Note
currently the service association is ignored by Qorus
  • GET rlookupqueue/{name}

looks up queue information from the queue name

Parameters
namethe queue name to use for the lookup
Returns
no value if the given name is not a valid queue name or a hash of queue information with the following keys:
  • queueid: the queueid of the queue
  • serviceid: the service associated with the queue
Note
currently the service association is ignored by Qorus
  • GET lookupsla/{slaid}

looks up SLA information from the slaid

Parameters
slaidthe slaid to use for the lookup
Returns
no value if the given ID is not a valid SLA ID or a hash of SLA information with the following keys:
  • name: the name of the SLA
  • type: the type of the SLA
  • description: the description of the SLA
  • GET rlookupsla/{name}

looks up SLA information from the SLA name

Parameters
namethe SLA name to use for the lookup
Returns
no value if the given name is not a valid SLA name or a hash of SLA information with the following keys:
  • slaid: the ID of the SLA
  • type: the type of the SLA
  • description: the description of the SLA
  • GET lookupworkflow/{wfid}
  • GET lookupworkflow/{wfid}/{verbose}

lookup up workflow information from the workflowid

Parameters
wfidthe workflowid of the workflow
verboseadds additional step and function information to the return value
Returns
nothing if the workflowid does not match any cached workflow, otherwise a workflow information hash
  • GET rlookupworkflow/{name}

looks up all versions of a workflow from the workflow name

Parameters
namethe name of the workflow
Returns
nothing if the argument does not match a cached workflow or a hash, otherwise the top-level keys of the hash are the cached versions of the workflow and the values are workflow information hashes
Note
the latest version of the workflow is determined by the creation time of the workflow and not by a logical version string comparison
  • GET rlookupworkflow/{name}/{version}

returns workflow info from the workflow name and version

Parameters
namethe name of the workflow
versionthe version of the workflow
Returns
nothing if the arguments do not match a cached workflow or a hash, otherwise a workflow information hash is returned
  • GET workflowid/{name}
  • GET workflowid/{name}/{version}

looks up the last workflow id(s) from the name, optional version

Parameters
namethe name of the workflow
versionthe optional version of the workflow; if no version argument is passed, then the workflowid for the latest version of the workflow is returned
Note
the latest version of the workflow is determined by the creation time of the workflow and not by a logical version string comparison
Returns
the integer workflowid value
Exceptions
WORKFLOW-ERRORworkflow does not exist
  • GET lookupconstant/{cid}

lookup up constant information from the constantid

Parameters
cidthe constantid
Returns
no value if the constantid does not match any cached constant, otherwise a hash with the following keys:
  • name: the name of the constant
  • version: the version of the constant
  • patch: the patch string for the constant
  • description: the description of the constant
  • created: the date/time the constant was created
  • modified: the date/time the constant was last modified
  • GET rlookupconstant/{name}

looks up all versions of a constant from the constant's name

Parameters
namethe name of the constant
Returns
nothing if the arguments do not match a cached constant or a hash where the keys are version strings and the values are the corresponding constant IDs and the following two special keys:
  • lvcreated: the creation date/time of the latest version of the constant
  • lastversion: the version string of the latest version
Note
the latest version of the constant is determined by the creation time of the constant and not by a logical version string comparison
  • GET rlookupconstant/{name}/{version}

looks up the constantid of a particular constant from the name and version

Parameters
namethe name of the constant
versionthe version of the constant
Returns
nothing if the arguments do not match or the constantid for the latest version of the constant
Note
the latest version of the constant is determined by the creation time of the constant and not by a logical version string comparison
  • GET constantid/{name}
  • GET constantid/{name}/{version}

returns the constantid from the constant name and optional version, thrown an exception if no match is found

  • GET lookupclass/{cid}

lookup up class information from the classid

Parameters
cidthe classid
Returns
no value if the classid does not match any cached class, otherwise a hash with the following keys:
  • name: the name of the class
  • version: the version of the class
  • patch: the patch string for the class
  • description: the description of the class
  • created: the date/time the class was created
  • modified: the date/time the class was last modified
  • GET rlookupclass/{name}

looks up all versions of a class from the class name

Parameters
namethe name of the class
Returns
nothing if the arguments do not match a cached class or a hash where the keys are version strings and the values are the corresponding class IDs and the following two special keys:
  • lvcreated: the creation date/time of the latest version of the class
  • lastversion: the version string of the latest version
Note
the latest version of the class is determined by the creation time of the class and not by a logical version string comparison
  • GET rlookupclass/{name}/{version}

looks up the classid of a particular class from the name and version

Parameters
namethe name of the class
versionthe version of the class
Returns
nothing if the arguments do not match or the classid for the latest version of the class
Note
the latest version of the class is determined by the creation time of the class and not by a logical version string comparison
  • GET classid/{name}
  • GET classid/{name}/{version}

returns the classid from the class name and optional version, thrown an exception if no match is found

  • GET lookupevent/{eid} lookup up event information from the workflow_event_typeid
    Parameters
    eidthe event id (workflow_event_typeid)
    Returns
    no value if the id does not match any cached event, otherwise a hash with the following keys:
  • name: the name of the event
  • desc: the description of the event
  • GET rlookupevent/{name}

looks up the event id(s) from the name, optional version (without version returns all versions)

Parameters
namethe event name
Returns
no value if the event name does not match any cached event, otherwise a hash with the following keys:
  • workflow_event_typeid: the id of the event
  • desc: the description of the event
  • GET lookupservice/{type}/{name}

lookup up service information from the serviceid or a list of serviceids

Parameters
serviceidthe serviceid
Returns
no value if the serviceid does not correspond to a cached service, otherwise a hash with the following keys:
  • type: either "system" or "user"
  • name: the name of the service
  • version: the version of the service
  • patch: the patch string for the service
  • description: the description of the service
  • created: the creation date/time of the service
  • modified: the date/time the service was last modified
  • autostart: boolean value for autostart status
  • manual_autostart: boolean value for the manual_autostart flag
  • GET lookupserviceinfo/{type}/{name}

lookup up service information from the serviceid or a list of serviceids

Parameters
typethe type of service (either "system" or "user"; case is ignored)
namethe name of the service
Returns
no value if the service does not correspond to a cached service, otherwise a hash with the following keys:
  • type: either "system" or "user"
  • name: the name of the service
  • version: the version of the service
  • patch: the patch string for the service
  • description: the description of the service
  • created: the creation date/time of the service
  • modified: the date/time the service was last modified
  • autostart: boolean value for autostart status
  • manual_autostart: boolean value for the manual_autostart flag
  • GET rlookupservice/{type}/{name}

looks up all versions of a service

Parameters
typethe type of service (either "system" or "user"; case is ignored)
namethe name of the service
Returns
nothing if the arguments do not match a cached service or a hash where the keys are version strings and the values are the corresponding service IDs and the following two special keys:
  • lvcreated: the creation date/time of the latest version of the service
  • lastversion: the version string of the latest version
Note
the latest version of the service is determined by the creation time of the service and not by a logical version string comparison
  • GET rlookupservice/{type}/{name}/{version}

looks up the serviceid from the name and version

Parameters
typethe type of service (either "system" or "user"; case is ignored)
namethe name of the service
versionthe version of the service
Returns
nothing if the arguments do not match or the serviceid for the latest version of the service
Note
the latest version of the service is determined by the creation time of the service and not by a logical version string comparison
  • GET serviceid/{type}/{name}[/{version}]

looks up the last service id(s) from the type, name, optional version

Parameters
typethe type of service (either "system" or "user"; case is ignored)
namethe name of the service
versionthe optional version of the service; if no version argument is passed, then the serviceid for the latest version of the service is returned
Note
the latest version of the service is determined by the creation time of the service and not by a logical version string comparison
Returns
the integer serviceid value
Exceptions
SERVICE-ERRORservice does not exist
  • GET lookupjob/{jid}

lookup up job information from the jobid

Parameters
jidthe jobid
Returns
no value if the jobid does not match any cached job, otherwise a hash with the following keys:
  • jobid: the job id (always same as the argument)
  • name: the name of the job
  • version: the version of the job
  • description: the description of the job
  • active: a boolean flag indicating if the job is active or not; active jobs will be running unless they are a member of a disabled group
  • created: the date/time the job was created
  • modified: the date/time the job was last modified
  • GET rlookupjob/{name}

looks up the job information from the name

Parameters
namethe name of the job
Returns
nothing if the arguments do not match a cached job or a hash of job information with the following keys:
  • jobid: the job id
  • name: the name of the job (always same as the argument)
  • version: the version of the job
  • description: the description of the job
  • active: a boolean flag indicating if the job is active or not; active jobs will be running unless they are a member of a disabled group
  • created: the date/time the job was created
  • modified: the date/time the job was last modified
  • GET jobid/{name}

looks up the job id from the name, throws an exception if the name is not recognized

Parameters
namethe name of the job
Returns
the integer jobid value
Exceptions
JOB-ERRORjob does not exist
  • GET jobname/{jobid}

looks up the job name from the jobid, throws an exception if id is not recognized

Parameters
jobidthe jobid to look up
Returns
the name of the job
Exceptions
JOB-ERRORjob does not exist
  • GET lookupmapper/{mid}

lookup up mapper information from the mapperid

Parameters
midthe mapperid
Returns
no value if the mapperid does not match any cached mapper, otherwise a hash with the following keys:
  • name: the name of the mapper
  • version: the version of the mapper
  • patch: the patch string for the mapper
  • description: the description of the mapper
  • author: the author of the mapper
  • type: the type or class of the mapper
  • fields: the source of the mapper field description hash
  • options: the mapper's option hash
  • created: the date/time the mapper was created
  • modified: the date/time the mapper was last modified
  • GET rlookupmapper/{name}

looks up all versions of a mapper from the mapper name

Parameters
namethe name of the mapper
Returns
nothing if the arguments do not match a cached mapper or a hash where the keys are version strings and the values are the corresponding mapper IDs
  • GET rlookupmapper/{name}/{version}

looks up the mapperid of a particular mapper from the name and version

Parameters
namethe name of the mapper
versionthe version of the mapper
Returns
nothing if the arguments do not match or the mapperid for the requested version of the mapper
  • GET mapperid/{name}/{version}
Returns
the mapperid from the mapper name and version, thrown an exception if no match is found
  • GET lookupvmap/{mid}

lookup up value map information from the value map id

Parameters
midthe value map id
Returns
no value if the value map id does not match any cached value map, otherwise a hash with the following keys:
  • name: the name of the value map
  • version: the version of the value map
  • patch: the patch string for the value map
  • description: the description of the value map
  • author: the author of the value map
  • type: the type or class of the value map
  • created: the date/time the value map was created
  • modified: the date/time the value map was last modified
  • GET rlookupvmap/{name}

looks up all versions of a value map from the value map name

Parameters
namethe name of the value map
Returns
nothing if the arguments do not match a cached value map or a hash where the keys are version strings and the values are the corresponding value map IDs
  • GET vmapid/{name}
Returns
the value map id from the value map name and version, thrown an exception if no match is found
  • GET workflowlist

returns a list of integers of known workflow ids

Returns
a list of integers of known workflow ids
  • GET servicelist

returns a list of integers of known service ids

Returns
a list of integers of known service ids
  • GET joblist

returns a list of integers of known job ids

Returns
a list of integers of known job ids
  • GET getworkflowlist[/{with_deprecated}]

returns a list of cached workflow information enhanced with step and function information from the cache

Parameters
with_deprecatedbool, include deprecated workflows in return list (default: do not include)
Note
this method is subject to RBAC access filtering
  • GET pmap
Returns
a list of processes
  • GET getConfigItemValues
Returns
the configuration item values
  • GET pgmlist
Returns
list of debuggable interfaces (type, interface name, version, pgm_name, remote process)

Workflow Info

The workflow info hash has the following keys:

  • name: the name of the workflow
  • version: the version of the workflow
  • patch: the patch string for the workflow
  • description: the description of the workflow
  • workflowid: the workflowid
  • errorfunction_instanceid: the function_instanceid of the error function, if any
  • attach_func_instanceid: the function_instanceid of the attach function, if any
  • detach_func_instanceid: the function_instanceid of the detach function, if any
  • onetimeinit_func_instanceid: the function_instanceid of the one time init function, if any
  • errhandler_func_instanceid: the function_instanceid of the error handler function, if any
  • created: the date/time the workflow was created
  • modified: the date/time the workflow was last modified
  • keylist: a list of valid keys for the workflow
  • stepmap: a hash where the keys are stepids and the values are step names
  • steps: a hash of step dependencies where the keys are stepids and the values are lists of steps are the direct dependent steps (that must be COMPLETE before the step given as the key can be executed)
  • segment: a list of segment information, where each element in the list is a segment info hash
  • stepseg: a hash of asynchronous/subworkflow/event stepids and their associated back-end segments
  • options: optional: a hash of workflow options where the keys are the option names and values are the descriptions
  • lib: optional: a hash of library objects where the top-level keys are one of the following strings: "FUNCTION", "CLASS", "CONSTANT" and the values are lists of object names

Step Info

The step info hash has the following keys:

  • name: step name
  • version: step version
  • patch: step patchlevel
  • description: step description
  • steptype: step type
  • [stepfunction_instanceid]: the function_instanceid for the primary step function (not present for class-based steps)
  • [validationfunction_instanceid]: the function_instanceid for the validation function (if present)
  • [endfunction_instanceid]: the function_instanceid for the asynchronous end function (if present)
  • [arrayfunction_instanceid]: the function_instanceid for the array function (if present)
  • [arraytype]: the type of array step for array steps (only for array steps)
  • [step_classid]: the ID of the class for the step class, if the step is a class-based step
  • [queueid]: the async event queue ID for asynchronous steps (not present if not an asynchronous step)
  • [queuename]: the name of the async event queue for asynchronous steps (not present if not an asynchronous step)
  • [workflow_event_typeid]: the workflow_event_typeid for workflow event steps (only for workflow event steps)
  • created: the created date/time of the step

Segment Info Hash

  • steplist: list of stepids in the segment
  • steps: a step dependency hash as above
  • prereqfor: optional: list of segmentid that depend on this segment
  • start: optional: the first stepid in the segment
  • linksegment: optional: the segmentid that directly precedes this segment as linked from an asynchronous/subworkflow/event step
  • linkstepid: optional: the stepid of the asynchronous/subworkflow/event step that link this segment to the previous segment

/api/latest/system/monitoring/logger

This URI path provides ability to customize the Qorus monitoring logger

DELETE /api/latest/system/monitoring/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/monitoring/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/monitoring/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/monitoring/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/options

This REST URI path provides actions and information related to system options; see System Options for more information

GET /api/latest/system/options

Description
Returns a list of system options
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • hash: optional (parsed with Qore::parse_boolean()); if True then the return type is a hash keyed by option name instead of a list
Return Value
This API returns a list of hashes if the hash argument is not set; each element in the list is a REST System Option Hash

PUT /api/latest/system/options?action=set

Description
Sets one or more system options to a new value
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • options: a hash of options; if the value of this key is a string, then it is first parsed with Util::parse_to_qore_value(), which should then return a hash
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "options" argument or "options" is not a hash (or string parsed to a hash with Util::parse_to_qore_value())
  • 409 Conflict: OPTION-ERROR: one or more options given was invalid or could not be set
Note
  • requires permission OMQ::QR_OPTION_CONTROL
  • when setting multiple options, an error setting one or more options does not block the other options without errors from being set

PUT /api/latest/system/options?action=setOptions

Description
Sets one or more system options to a new value
See also
This API is equivalent to PUT /api/system/options?action=set; see that documentation for details.

/api/latest/system/options/{options}

This REST URI path provides actions and information related to specific system options; see System Options for more information

GET /api/latest/system/options/{options}

Description
Returns a hash describing the option
Return Value
This API returns a REST System Option Hash

PUT /api/latest/system/options/{options}?action=set

Description
Sets the option to a new value
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • value: (required) the new value for the option
Return Value
This API returns "OK" upon successful execution
Errors
  • 400 Bad Request: missing "value" argument
  • 409 Conflict: OPTION-ERROR: there was an error setting the option
Note
requires permission OMQ::QR_OPTION_CONTROL

/api/latest/system/processes

This REST URI path provides actions and information related to system processes

GET /api/latest/system/processes

Description
Returns a hash of information about currently-running Qorus cluster processes
Return Value
This API returns a hash keyed by cluster process name where values are process info hashes.

/api/latest/system/processes/{id}

This REST URI path provides actions and information related to a specific system process

GET /api/latest/system/processes/{id}

Description
Returns a hash of information about a specific Qorus cluster process
Return Value
This API returns a process info hashes for the current process.

POST /api/latest/system/processes/{id}?action=kill

Description
Kills a cluster process
Return Value
This API returns a hash with the following keys:
  • status: "OK", "ERR" if not
  • code: the return code of the kill() command: 0 if successful, non-zero if not
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

/api/latest/system/props

This REST URI path provides actions and information related to a system properties.

GET /api/latest/system/props

Description
Returns system properties according to the arguments passed.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • domain: (optional) a system property domain to retrieve values for
  • key: (optional) a system property key in the given domain; if key is given then domain must also be passed
Return Value
This API returns:
  • a hash of all domains if no domain value is passed
  • a hash of the given domain if the domain value is passed and the domain exists, otherwise NOTHING
  • the vaule of the given property in the given domain if the domain and key values are passed and the property exists

GET /api/latest/system/props?action=export

Description
Exports properties as a YAML string. Attributes in the "qorus_properties" tag are only informational and are not used when importing. The "omq" domain is not exported.
Return Value
This API returns a YAML-encoded string of all system properties in all domains except the "omq" domain.
Example Return Value
{qorus_properties: {domain1: {key1: "value", key2: "value"},
 ^attributes^: {instance: "quark-1", schema-version: "3.1.0",
 schema-compatibility: "3.1.0", schema-load-compatibility: "3.1.0"}}}
See also
PUT /api/system/props?action=import

PUT /api/latest/system/props?action=import

Description
Import properties from a serialized string (such as exported from GET /api/system/props?action=export); if there are set domains in the list, only enumerated domains are imported
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • domains: (optional) a list of domains to import; a comma-separated string will be split into a list
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY
See also
GET /api/system/props?action=export

PUT /api/latest/system/props?action=reload

Description
Reloads all system properties from the database.
Return Value
This API returns the number of domains loaded
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_RELOAD_PROPERTIES

PUT /api/latest/system/props?action=replaceAll

Description
Replaces all system property keys in one atomic operation
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • props: (required) must be a hash keyed by domain assigned to key-value property hashes; any "omq" domain is ignored
Return Value
This API returns the system property hash passed as an argument.
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit) or invalid type assigned to domain key
Note
requires permission OMQ::QR_SERVER_CONTROL or both OMQ::QR_SET_PROPERTY and OMQ::QR_DELETE_PROPERTY to replace all property values

PUT /api/latest/system/props?action=set

Description
Sets or deletes the value of a single system property in a single domain.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • domain: (required) a string giving the system property domain for the key-value pair
  • key: (required) a string giving the property key value in the given domain
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the property value; parse_args takes precedence over args
  • [args]: arguments passed here will be used directly as the system property value
Return Value
This API returns a string action code as follows:
  • "INSERT": the property was created
  • "UPDATE": the property was updated
  • "DELETE": the property was deleted (existing key, no value passed)
  • "IGNORED": if a non-existent key should be deleted
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: SYSTEM-PROPERTY-ERROR: the given key already exists in the given property domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY to set property values, OMQ::QR_DELETE_PROPERTY to delete property values

PUT /api/latest/system/props?action=updateMany

Description
Sets or deletes the values of one or more system property keys in one or more system property domains
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • arg: (required) must be a hash in the format domain.key.value for updating, inserting, or deleting
Return Value
This API returns a hash of "INSERT", "UPDATE", "DELETE" and "IGNORED" keys with integer values corresponding to the number of operations performed (deleting a non-existent key or domain causes a "IGNORED" value to be returned).
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY to set property values, OMQ::QR_DELETE_PROPERTY to delete property values

/api/latest/system/props/{domain}

This REST URI path provides actions and information related to a specific system property domain.

DELETE /api/latest/system/props/{domain}

Description
Deletes the entire system property domain
Return Value
This API returns a hash of "DELETE" (and "IGNORED" keys in case of a race condition with a competing delete operation on the same system property domain) with integer values corresponding to the number of operations performed.
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_DELETE_PROPERTY

GET /api/latest/system/props/{domain}

Description
Returns the value of the system property domain as a hash or of the specific key(s) given
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • key: (optional) one or more property values in the domain to return; if the string is a comma-separated list, it will be interpreted as a list of keys
Return Value
This API returns the value of the system property domain as a hash (optionally filtered by the key argument as above)

POST /api/latest/system/props/{domain}

Description
Creates an entire system property domain from a hash of key-value pairs
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • arg: (required) a hash giving all key-value pairs for the new system property domain
Return Value
This API returns a hash of "INSERT" (and "UPDATE" in case of a race condition with a parallel request writing to the same system property domain) keys with integer values corresponding to the number of operations performed
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: SYSTEM-PROPERTY-ERROR: the given key already exists in the given property domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY

PUT /api/latest/system/props/{domain}?action=set

Description
Sets the value of a single system property or deletes the system property key if no value is passed.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • key: (required) a string giving the property key value in the current domain
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the property value; parse_args takes precedence over args
  • [args]: arguments passed here will be used directly as the system property value
Return Value
This API returns a string action code as follows:
  • "INSERT": the property was created
  • "UPDATE": the property was updated
  • "DELETE": the property was deleted (existing key, no value passed)
  • "IGNORED": if a non-existent key should be deleted
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY to set property values, OMQ::QR_DELETE_PROPERTY to delete property values

PUT /api/latest/system/props/{domain}?action=updateMany

Description
Sets or deletes the values of one or more system property keys in the current system property domain.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • arg: (required) a key-value hash for updating, inserting, or deleting system properties in the current domain
Return Value
This API returns a hash of "INSERT", "UPDATE", "DELETE" and "IGNORED" keys with integer values corresponding to the number of operations performed (deleting a non-existent key or domain causes a "IGNORED" value to be returned).
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY to set property values, OMQ::QR_DELETE_PROPERTY to delete property values

/api/latest/system/props/{domain}/{key}

This REST URI path provides actions and information related to a specific system property key.

DELETE /api/latest/system/props/{domain}/{key}

Description
Deletes the system property key-value pair.
Return Value
This API returns a string action code as follows:
  • "DELETE": the property was deleted
  • "IGNORED": if a non-existent key should be deleted (only possible with this API with a race condition where the property was deleted in another thread during this request)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_DELETE_PROPERTY

GET /api/latest/system/props/{domain}/{key}

Description
Returns the value of the system property
Return Value
This API returns the value of the system property

POST /api/latest/system/props/{domain}/{key}

Description
Creates a system property with the given value.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body; one of the following hash keys must be present):
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the property value; parse_args takes precedence over arg
  • [arg]: the argument passed here will be used directly as the system property value
Return Value
This API returns a string action code as follows:
  • "INSERT": the property was created
  • "UPDATE": the property was updated (only possible with this API with a race condition where the property was created in another thread during this request)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: SYSTEM-PROPERTY-ERROR: the given key already exists in the given property domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY

PUT /api/latest/system/props/{domain}/{key}?action=set

Description
Sets the value of the system property or deletes the system property key if no value is passed.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • [parse_args]: any string here will be parsed with Util::parse_to_qore_value() and used as the property value; parse_args takes precedence over args
  • [args]: arguments passed here will be used directly as the system property value
Return Value
This API returns a string action code as follows:
  • "INSERT": the property was created (only possible with this API with a race condition where the property was deleted in another thread during this request)
  • "UPDATE": the property was updated
  • "DELETE": the property was deleted (existing key, no value passed)
  • "IGNORED": if a non-existent key should be deleted (only possible with this API with a race condition where the property was deleted in another thread during this request)
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: UPDATE-ERROR: changes attempted in the "omq" domain
  • 409 Conflict: PROP-ERROR: serialized value exceeds 4000 bytes (column limit)
Note
requires permission OMQ::QR_SERVER_CONTROL or OMQ::QR_SET_PROPERTY to set property values, OMQ::QR_DELETE_PROPERTY to delete property values

/api/latest/system/qorus-core/logger

This URI path provides ability to customize the qorus-core: Qorus Core Cluster Process process logger

DELETE /api/latest/system/qorus-core/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/qorus-core/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/qorus-core/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/qorus-core/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/qorus-master/logger

This URI path provides ability to customize the qorus: Qorus Cluster Master Process process logger

DELETE /api/latest/system/qorus-master/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/qorus-master/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/qorus-master/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/qorus-master/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/system/rbac

GET /api/latest/system/rbac

Description
Returns information about Role Based Access Control configuration and status
Return Value
This API returns a hash with the following keys:
  • loaded: the date/time Role Based Access Control information was loaded
  • users: the number of users cached
  • roles: the number of roles cached
  • permissions: a list of REST Permission Hash elements
  • enabled: True if Role Based Access Control is enabled
  • groups: the number of interface groups cached
  • providers: a hash of providers keyed by descriptive name; values are hashes with the following keys:
    • loaded: the date/time the provider was loaded
    • storage: a boolean value indicating whether the provides supports user-defined storage or not

PUT /api/latest/system/rbac?action=reload

Description
Reloads the all Role Based Access Control information (users, permissions, roles, groups) from the system schema
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_RELOAD_RBAC
See also
omq.system.reload-rbac()

/api/latest/system/sessions

This REST URI path provides actions and information related to Qorus application sessions

GET /api/latest/system/sessions

Description
Returns a list of hashes for sessions matched according to the arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ended_maxdate: (optional) give the upper date range for the session end date
  • ended_mindate: (optional) give the lower date range for the session end date
  • hostname: (optional) the hostname to search for
  • id: (optional) the session ID
  • key: (optional) the instance key name
  • limit: (optional) the maximum number of sessions to return
  • list: (optional) parsed with Qore::parse_boolean(); if True then a list of session names is returned
  • short: (optional) parsed with Qore::parse_boolean(); if True then a list of short strings of session names and descriptions is returned
  • started_maxdate: (optional) give the upper date range for the session start date
  • started_mindate: (optional) give the lower date range for the session start date
  • offset: (optional) the starting release to return (use when paging for example)
  • status: (optional) one or more session status values
  • url: (optional) the HTTP URL for the instance
  • version: (optional) the Qorus version string
Return Value
If list and short are not used, then this API returns list of hashes for sessions matched; each hash has the following keys:
  • id: the session ID
  • key: the instance key for the session
  • status: status of the session
  • hostname: the hostname hosting the Qorus process running the session
  • url: the primary URL for the application session
  • version: the Qorus version for the session
  • started: the date/time the session started
  • ended: the date/time the session ended

/api/latest/system/sqlcache

This REST API path provides actions and information related to the system SQL cache

Since
Qorus 3.1.0

GET /api/latest/system/sqlcache

Description
Returns information about the system cache
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • system: returns information about system objects as well (in the "omq" datasource)
Return Value
This API returns a hash keyed by datasource name; values are hashes keyed by SQL object type (ex: "tables"); the values of this hash are hashes with the following keys:
  • count: the number of times accessed
  • created: the date/time the object was cached

PUT /api/latest/system/sqlcache?action=clear

Description
Clears the SQL cache according to the arguments.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • datasource: (optional) a string giving the datasource to clear all objects for
  • name: (optional) the name of the object to clear; if this argument is given, then datasource must also be given
Return Value
This API returns "OK" upon successful execution

PUT /api/latest/system/sqlcache?action=clearCache

Description
Clears the SQL cache according to the arguments.
See also
This API is equivalent to PUT /api/system/sqlcache?action=clear; see that documentation for details.

/api/latest/system/ui

This REST URI path provides actions and information related to the system UI

GET /api/latest/system/ui

Description
Returns a list of child URI path components
Return Value
This API returns a list of child URI path components

/api/latest/system/ui/extensions

This REST URI path provides actions and information related to system UI extensions

GET /api/latest/system/ui/extensions

Description
Returns a list of hashes of information about UI extensions
Return Value
This API returns a list of REST System UI Extension Hash elements

GET /api/latest/system/ui/extensions?action=list

Description
Returns a list of hashes of information about UI extensions
See also
This API is equivalent to GET /api/system/ui/extensions; see that documentation for details.

/api/latest/system/ui/extensions/{name}

This REST URI path provides actions and information related to a specific system UI extension

GET /api/latest/system/ui/extensions/{name}

Description
Returns a hash of information about the current UI extension
Return Value
This API returns a REST System UI Extension Hash

/api/latest/system/userhttp

This REST URI path provides actions and information about user HTTP services.

GET /api/latest/system/userhttp

Description
Returns a hash keyed by resource type with values as lists of hashes of information about user-defined HTTP services
Return Value
The hash element in each list has the following keys:
  • title: the title of the HTTP service
  • url: the full URL to the service
  • service: the name of the service
  • version: the version of the service
  • serviceid: the service ID
Since
Qorus 4.0 returns an empty hash in case no data is available

/api/latest/system/{type}/logger

This URI path provides ability to customize Qorus system logger configurations

DELETE /api/latest/system/{type}/logger

Description
Delete system logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/system/{type}/logger

Description
Returns system logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
    • appenders: (list of hashes) list of appender hashes
  • interface_table_name: (string) system (audit, alert, monitoring, http, qorus-core, qorus-master, qdsp) type. If set means default logger

POST /api/latest/system/{type}/logger

Description
Create Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/system/{type}/logger

Description
Set system logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

/api/latest/users

This REST URI path provides actions and information related to Qorus users

GET /api/latest/users

Description
Returns a list of hashes describing Qorus users
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST User Hash elements
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL

POST /api/latest/users

Description
Adds a user to the system
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • username: (required) the username to add
  • pass: (required) the password for the user
  • name: (required) the name of the user
  • roles: (optional) a single role or a list of roles to add to the user; note that the user must have at least the OMQ::QR_LOGIN permission to connect to the server
Return Value
This API returns a REST User Hash for the new user created
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: RBAC-ADD-USER-ERROR: invalid user, invalid role, invalid group
Note
See also

GET /api/latest/users?action=current

Description
Returns a hash describing the current calling user
Return Value
This API returns a REST User Hash

GET /api/latest/users?action=list

Description
Returns a list of hashes describing Qorus users
See also
This API is equivalent to GET /api/users; see that documentation for details.

/api/latest/users/{user}

This REST URI path provides actions and information related to a particular user

DELETE /api/latest/users/{user}

Description
Deletes the current user
Return Value
This API returns a hash with the following key:
  • info: a string describing the user deletion action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_DELETE_USER
See also

GET /api/latest/users/{user}

Description
Returns a hash describing the current user
Return Value
This API returns a REST User Hash

PUT /api/latest/users/{user}

Description
Modifies the current user
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body); at least one of the following keys must be present:
  • pass: (string) password
  • name: (string) user description
  • storage: (hash) updated key-value pairs for server-side user storage; set a key to NOTHING to delete the key
  • roles: (list of strings) a comma-separated string will be split into a list; the new list will replace the current list unless the role names are preceded by "+" or "-", meaning add or remove a role, respectively (in which case all role names must be preceded by a "+" or "-"); to remove all roles for a user, send an empty list here
Return Value
This API returns the updated attributes of the user as a hash
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: RBAC-UPDATE-USER-ERROR: invalid user, no valid keys in hash, invalid role
Note
requires permission OMQ::QR_USER_CONTROL or OMQ::QR_MODIFY_USER
See also

PUT /api/latest/users/{user}?action=update

Description
Modifies the current user
See also
This API is equivalent to PUT /api/users/{user}; see that documentation for details.

/api/latest/valuemaps

This URI path provides actions and information related to Qorus value maps

GET /api/latest/valuemaps

Description
Returns a list of hashes describing value maps accessible by the current user
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
Return Value
If neither list nor short are used, then this API returns a list of REST Value Map Description Hash elements
Errors
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)

PUT /api/latest/valuemaps?action=reload

Description
Reloads one or more value maps from the DB
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) a comma-separated string will be split into a list; the value map names or IDs to reset
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)
  • 409 Conflict: VALUE-MAP-ERROR: invalid or unknown value map
Note
requires permission OMQ::QR_VALUE_MAP_CONTROL or OMQ::QR_RELOAD_VALUE_MAP

PUT /api/latest/valuemaps?action=reloadAll

Description
Reloads all value maps accessible by the calling user
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note
requires permission OMQ::QR_VALUE_MAP_CONTROL or OMQ::QR_RELOAD_VALUE_MAP

/api/latest/valuemaps/{id_or_name}

This URI path provides actions and information related to a specific value map

GET /api/latest/valuemaps/{id_or_name}

Description
Returns a hash describing the current value map
Return Value
This API returns a REST Value Map Description Hash
Errors
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)

GET /api/latest/valuemaps/{id_or_name}?action=dump

Description
Returns a string giving the source of the value map as reconstructed from the database
Return Value
This API returns a string giving the source of the value map as reconstructed from the database
Errors
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)

GET /api/latest/valuemaps/{id_or_name}?action=lookup

Description
Looks up the mapping for the key given as an argument in the current value map and returns the mapped value
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • key: (required) the value map key to look up
Return Value
This API returns the value of the key
Errors
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)
  • 409 Conflict: VALUEMAP-LOOKUP-ERROR: missing key argument key

PUT /api/latest/valuemaps/{id_or_name}?action=reload

Description
Reloads the current value map from the DB
Return Value
This API returns "OK" upon successful execution
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)
Note
requires permission OMQ::QR_VALUE_MAP_CONTROL or OMQ::QR_RELOAD_VALUE_MAP

PUT /api/latest/valuemaps/{id_or_name}?action=value

Description
Creates or updates the mapping given as arguments in the current value map
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • key: (required) the value map key to create or update
  • value: (optional) the value to set; if not present, then the given key will be deleted
  • enabled: (optional) parsed with Qore::parse_boolean(); if True then the key is immediately usable; if not present the default is False
Return Value
This API returns a string describing the operation performed:
  • "DELETED": the key was deleted
  • "IGNORED": the key to be deleted did not exist
  • "CREATED": the key-value pair was created
  • "UPDATED": the key-value pair was updated
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)
Note
requires permission OMQ::QR_VALUE_MAP_CONTROL or OMQ::QR_MODIFY_VALUE_MAP

/api/latest/valuemaps/{id_or_name}/{key}

This URI path provides actions and information related to a specific value map value

GET /api/latest/valuemaps/{id_or_name}/{key}

Description
Returns the value of the current value map key
Return Value
This API returns the value of the current value map key
Errors
  • 403 Forbidden: VALUEMAP-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given value map (for more information, see Interface Groups)

/api/latest/workflows

This URI path allows workflows to be queried and for actions on multiple workflows to be performed; this is the URI path parent of workflow-specific actions as well.

GET /api/latest/workflows

Description
Returns information about workflows accessible to the calling user.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • deprecated: optional; parsed with Qore::parse_boolean(); if False then no deprecated workflows will be returned; default True
  • list: optional; parsed with Qore::parse_boolean(); if True then a list of workflow names is returned
  • short: optional; parsed with Qore::parse_boolean(); if True then a list of short strings of workflow names and descriptions is returned
  • date: optional; parsed as a date; the minimum date for historical workflow order overview information; if omitted then defaults to the past 24 hours
  • sqlcache: optional; parsed with Qore::parse_boolean(); if False then no SQL cache will be used for historical info; default True
Return Value
If neither list nor short are used, then a list of hashes is returned, one element for each accessible workflow (depending on the calling users accessible interface groups); each hash in the returned list represents an accessible workflow as a REST Workflow Description Hash v3

PUT /api/latest/workflows?action=decAutostart

Description
Decrements the autostart value on one or more workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to modify; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • arg: the workflow ID or name
  • updated: True or False
  • autostart: the new autostart value for the workflow
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • info: info about the workflow update action or a reason why the request failed
  • [stopped]: the number of execution instances stopped
Errors
  • 409 Conflict: WORKFLOW-SETAUTOSTART-ERROR: missing ids argument; autostart value cannot be negative
Note

PUT /api/latest/workflows?action=defaultLogger

Description
Set logger params
Arguments
This API takes the following argument as URI arguments:
  • level: (int|string) LoggerLevel
  • name: logger name to set
  • additivity: logger additivity to set
Return Value
If success 200 OK, in case of fail 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

DELETE /api/latest/workflows?action=defaultLogger

Description
Delete logger
Return Value
If success 200 OK, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/workflows?action=defaultLogger

Description
Create default Logger
Arguments
This API takes the following argument as URI arguments:
  • level: required; (int|string) LoggerLevel
  • name: (string) logger name
  • additivity: (bool) logger additivity (default True)
  • cloneDefault: (bool) create logger with appenders based on default logger
Return Value
If success 200 with the logger ID created, in case of failure 400 and string with error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

GET /api/latest/workflows?action=defaultLogger

Description
Returns default logger info
Return Value
This API returns 200 OK and hash with the following keys:
  • loggerid: (int) logger id
  • params: (hash) logger params
    • level: (hash) LoggerLevel
      • "key": logger level string representation
      • "value": logger level int representation
    • name: (string) logger name
    • additivity: (bool) logger additivity
  • interface_table_name: (string) interface table name (jobs/workflows/services). If set means default logger

GET /api/latest/workflows?action=defaultLoggerAppenders

Description
Return all logger appenders
Return Value
This API returns 200 OK and list with the following hashes:
  • appenderId: (int) appenderId
  • params: (hash) possible appender parameters, might be missing if not set
    • name: (string) appender name
    • layoutPattern: (string) appender layout pattern
    • rotation: (int) appender layout pattern
    • filename: (string) appender filename

DELETE /api/latest/workflows?action=defaultLoggerAppenders

Description
Delete logger appender with obtained id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be deleted
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_DELETE_LOGGER or OMQ::QR_LOGGER_CONTROL

POST /api/latest/workflows?action=defaultLoggerAppenders

Description
Create logger appenders
Arguments
This API takes the following argument as URI arguments:
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK and appender id, in case of fail one of the error codes: 400, 409 and string of error description
Errors
  • 400 Bad Request: invalid or missing arguments to REST call
  • 409 Conflict: conflict with the current state
Note
requires permission OMQ::QR_CREATE_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/workflows?action=defaultLoggerAppenders

Description
Update logger appender with the given id
Arguments
This API takes the following argument as URI arguments:
  • id: required; (int); id of the appender to be update
  • name: (string) the name of the appender
  • layoutPattern: (string) the layout for the appender
  • filename: (string) the output filename
  • encoding: (string) the file's output encoding
  • appenderType: required; (string) appender type, case sensitive (see Logger for possible values) (ex. LoggerAppenderFileRotate, LoggerAppenderFile, LoggerAppenderStdOut ...)
  • rotationCount: (int) the number of files in rotation chain, if count is <=0 then no ratation is performed. Only for rotation appenders
  • archivePattern: (string) pattern to evaluate archive filename
Return Value
If success 200 OK, in case of fail 400 and string with error description
Note
requires permission OMQ::QR_MODIFY_LOGGER or OMQ::QR_LOGGER_CONTROL

PUT /api/latest/workflows?action=disable

Description
Disables one or more enabled workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to disable; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances disabled
  • details: a list of hashes providing details of the individual workflow disable actions with the following keys
    • arg: the workflow ID or name
    • stopped: True or False
    • [count]: the number of execution instances stopped
    • [workflowid]: the workflow ID
    • [name]: the workflow name
    • [version]: the workflow version
    • info: info about the workflow disable action or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-DISABLE-ERROR: missing ids argument
Note

PUT /api/latest/workflows?action=enable

Description
Enables one or more disabled workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to enable; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • arg: the workflow ID or name
  • enabled: True or False
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • info: info about the workflow enable action or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-ENABLE-ERROR: missing ids argument
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: disabled workflows cannot be enabled while the system is shutting down
Note

PUT /api/latest/workflows?action=incAutostart

Description
Increments the autostart value on one or more workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to modify; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • arg: the workflow ID or name
  • updated: True or False
  • autostart: the new autostart value for the workflow
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • info: info about the workflow update action or a reason why the request failed
  • [started]: the number of execution instances started
Errors
  • 409 Conflict: WORKFLOW-SETAUTOSTART-ERROR: missing ids argument; cannot set a positive autostart value on a workflow with the deprecated flag set
Note

GET /api/latest/workflows?action=list

Description
Returns information about workflows accessible to the calling user.
See also
This API is equivalent to GET /api/workflows; see that documentation for details.

GET /api/latest/workflows?action=listErrors

Description
Returns information about workflow order errors corresponding to the search arguments
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • orderby: one or more field names for sorting the output
  • error: the error text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • description: the description text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given)
  • info: the info text to search (can also include '' characters for use with the LIKE operator; in this case only 1 value can be given
  • stepid: limit the search to one or more stepids
  • severity: limit the search to one or more severity values
  • name: limit the search to one or more step names
  • version: limit the search to one or more step versions
  • retry: limit the search to errors with or without the retry flag
  • business_error: limit the search to errors with or without the business_error flag
  • workflow_instanceid: limit the search to one or more workflow_instanceids
  • error_instanceid: mit the search to one or more error_instanceids
  • mindate: give the lower date range for the error search
  • maxdate: give the upper date range for the error search
  • workflowid: limit the search to one or more workflowids
  • workflowstatus: limit the search to workflow instances with the given status value(s)
  • limit: the maximum number of errors to return
  • offset: the starting error to return (use when paging for example)
Return Value
This API returns a list of hashes with the following keys for all data matched according to the search arguments:
  • name: the name of the workflow
  • version: the version of the workflow
  • workflow_instanceid: the workflow instance ID
  • workflowid: the workflow ID
  • stepid: the step ID where the error occurred
  • stepname: the name of the step where the error occurred
  • stepversion: the version of the step where the error occurred
  • ind: the array step index number where the error occurred
  • workflowstatus: current status of the workflow (see Workflow, Segment, and Step Status Descriptions for possible values)
  • started: the date and time when the workflow order started processing
  • completed: the date and time when the workflow order was completed
  • parent_workflow_instanceid: any parent workflow instance ID
  • custom_status: the custom status of the workflow order, if any
  • priority: the priority of the workflow order
  • scheduled: any scheduled date for the workflow order
  • error_instanceid: the error instance ID
  • error: the error code string
  • description: a description for the error (if any)
  • info: additional information about the error (if any)
  • severity: an error severity code (see Error Severity Codes for possible values)
  • created: the date and time the error was raised
  • retry: the retry count of the error
  • business_error: a boolean flag indicating of the error is a business error
  • custom_status_desc: a descriptive string for the custom status (if any)

GET /api/latest/workflows?action=processingSummary

Description
Returns information about workflow processing.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • mindate: (required) minimum date
  • maxdate: maximum date
  • wfids: optional workflow IDs
  • seconds: if True then the performance values will be returned as arbitrary-precision numeric values representing seconds, otherwise they will be returned as relative date/time values
  • global: if True then all workflows will be combined into an overall processing report, if False then each workflow gets a separate line in the output
  • grouping: (optional) possible values for reporting performance statistics:
    • "hourly": hourly grouping
    • "daily": daily grouping
    • "monthly": monthly grouping
    • "yearly": yearly grouping
Return Value
This API returns a list of hashes with the following keys for all data matched according to the search arguments:
  • workflowid: the workflow ID
  • name: the workflow name
  • version: the workflow version
  • count: the number of workflow orders in the period
  • minstarted: the minimum workflow order start date
  • maxcompleted: the maximum workflow order completion date (if any)
  • minduration: the minimum total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • avgduration: the average total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • maxduration: the maximum total elapsed order processing time for workflow orders in the period (starting from workflow order creation)
  • minprocessing: the minimum order processing time for workflow orders in the period (starting from when then order was first processed)
  • avgprocessing: the average order processing time for workflow orders in the period (starting from when then order was first processed)
  • maxprocessing: the maximum order processing time for workflow orders in the period (starting from when then order was first processed)
Errors
  • 409 Conflict: ARGUMENT-ERROR: missing mindate

PUT /api/latest/workflows?action=reset

Description
Resets one or more workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to reset; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances disabled
  • details: a list of hashes providing details of the individual workflow reset actions with the following keys
    • arg: the workflow ID or name
    • reset: True or False
    • [workflowid]: the workflow ID
    • [name]: the workflow name
    • [version]: the workflow version
    • info: info about the workflow reset action or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-RESET-ERROR: missing ids argument
Note

PUT /api/latest/workflows?action=resetAll

Description
Resets all cached and running workflow execution instances accessible by the calling user.
Return Value
This API returns a list of hashes of affected workflows with the following keys:
  • name: the name of the workflow that was reset
  • version: the version of the workflow that was reset
  • workflowid: the workflow ID of the workflow that was reset
  • count: the number of workflow execution instances affected
Note

PUT /api/latest/workflows?action=setAutostart

Description
Sets the autostart value on one or more workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to modify; a comma-separated string will be split into a list
  • autostart: (required) an integer value giving the new autostart value for the workflow(s)
Return Value
This API returns a hash with the following keys:
  • arg: the workflow ID or name
  • updated: True or False
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • info: info about the workflow update action or a reason why the request failed
  • [started]: the number of execution instances started
Note
the autostart cannot be set over Workflow Max Instances Parameter; in case Workflow Max Instances Parameter is reached the autostart value is set to Workflow Max Instances Parameter and this number is returned in started
Errors
  • 409 Conflict: WORKFLOW-SETAUTOSTART-ERROR: missing ids or autostart argument; autostart value is negative; cannot set a positive autostart value on a workflow with the deprecated flag set
Note

PUT /api/latest/workflows?action=setDeprecated

Description
Sets or removes the deprecated flag on one or more workflows.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to modify; a comma-separated string will be split into a list
  • deprecated: (required) a value (processed with Qore::parse_boolean()) indicating whether or not the workflows should have their deprecated flag set (True) or removed (False)
Return Value
This API returns a hash with the following keys:
  • arg: the workflow ID or name
  • updated: True or False
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • [stopped]: a hash keyed by workflow description where the values are the lists of all execution instance IDs stopped for that workflow
  • info: info about the workflow update action or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-SETDEPRECATED-ERROR: missing ids or deprecated argument
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: disabled workflows cannot be enabled while the system is shutting down
Note

PUT /api/latest/workflows?action=start

Description
Manually starts one or more workflow execution instances.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to start; a comma-separated string will be split into a list
Return Value
This API returns a list of hashes with the following keys:
  • arg: the workflow ID or name
  • started: True or False
  • [exec_id]: the workflow execution ID (when started = True)
  • [workflowid]: the workflow ID
  • [name]: the workflow name
  • [version]: the workflow version
  • info: info about the workflow start or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-START-ERROR: missing ids argument
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: workflows cannot be started while the system is shutting down
Note
Deprecated:
Workflow execution instances should not be manually started; they should be started by the system based on their autostart values and enabled and disabled for operational reasons; use PUT /api/workflows?action=enable and PUT /api/workflows?action=disable instead of starting and stopping workflow execution instances

PUT /api/latest/workflows?action=stop

Description
Manually stops one or more workflow execution instances.
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • ids: (required) one or more workflow names or IDs to stop; a comma-separated string will be split into a list
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances stopped
  • workflows: a hash keyed by workflow description where the values are the lists of all execution instance IDs stopped for that workflow
  • details: a list of hashes providing details of the individual workflow stop actions with the following keys
    • arg: the workflow ID or name
    • stopped: True or False
    • [count]: the number of execution instances stopped
    • [workflowid]: the workflow ID
    • [name]: the workflow name
    • [version]: the workflow version
    • info: info about the workflow stop action or a reason why the request failed
Errors
  • 409 Conflict: WORKFLOW-STOP-ERROR: missing ids argument
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows?action=enable and PUT /api/workflows?action=disable instead of starting and stopping workflow execution instances
Note

PUT /api/latest/workflows?action=stopAll

Description
Stops all workflow execution instances.
Return Value
This API returns a hash with the following keys:
  • count: number of workflow execution instances stopped
  • workflows: a hash keyed by workflow description where the values are the lists of all execution instance IDs stopped for that workflow
  • msg: a descriptive message about the workflows stopped
Deprecated:
Workflow execution instances should not be manually stopped; they should be disabled instead; use PUT /api/workflows?action=enable and PUT /api/workflows?action=disable instead of starting and stopping workflow execution instances
Note

/api/latest/workflows/{id_or_name}

This REST URI path provides actions and information about a particular workflow.

GET /api/latest/workflows/{id_or_name}

Description
Returns a REST Workflow Description Hash v3 for the current workflow
Return Value
This API returns a REST Workflow Description Hash v3 for the current workflow

POST /api/latest/workflows/{id_or_name}?action=createOrder

Description
Creates a workflow order data instance for the current workflow with the data passed as arguments

To ensure that a given workflow order is only created once for a given unique key value, make sure your workflow defines order keys, and use one of the following options to guarantee uniqueness of the order:

  • global_unique_key
  • workflow_specific_unique_key
  • workflow_unique_key
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • [external_order_instanceid]: (string) the external order instance ID for the workflow data; either this key or staticdata is required
  • [dynamicdata]: (hash) the initial dynamic data for the order
  • [global_unique_key]: (optional hash) a hash giving one or more unique order keys for the order (across all workflows regardless of workflowid, name, or version); if this key already exists for any order in the system, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • [orderkeys]: (hash) a hash of order keys for the order
  • [parent_workflow_instanceid]: (int) a loosely-coupled workflow that will be marked as the parent of this workflow
  • [priority]: (int) the order priority (default OMQ::DefaultOrderPriority) from 0 - 999; priority 0 is the highest; 999 is the lowest
  • [scheduled]: (date) the earliest date and time the order can be processed; if this date is given as a future date/time value and a OMQ::StatReady status is given, then the initial status of the workflow order data instance will be automatically changed to OMQ::StatScheduled instead of OMQ::StatReady
  • [sensitive_data]: (hash) a hash of sensitive data information for the workflow; this key can only be used when submitting the data over a secure (encrypted) connection; the keys are sensitive data key types, values are hashes keyed by sensitive data values, and the hash values have the following keys:
    • [aliases]: (list of strings) zero or more string aliases for the sensitive data
    • data: (hash) the sensitive data hash itself
    • [meta]: (hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
      • [PURPOSE]: free-form information about the purpose of the sensitive data
      • [CATEGORIES]: free-form information about the categories of sensitive data
      • [RECIPIENTS]: free-form information about the recipients or recipient catories of sensitive data
      • [STORAGE]: free-form information about the storage time or rules for sensitive data
  • [staticdata]: (hash) the static data for the order; either this key or external_order_instanceid is required
  • [status]: (string) the initial order status (default OMQ::StatReady); must be either OMQ::StatReady or OMQ::StatBlocked
  • [workflow_specific_unique_key]: (optional string) a hash giving one or more unique order keys for the particular workflowid (which matches a unique name and workflow version); if this key already exists for an order with the target workflowid, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • [workflow_unique_key]: (optional string) a hash giving one or more unique order keys for the particular workflow by name only (across all workflows with the same name regardless of version); if this key already exists for a workflow order with the same name, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
Return Value
a hash with the following key:
  • workflow_instanceid the workflow instance ID of the workflow order instance ID created
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SENSITIVE-DATA-ERROR: a workflow order was submitted with sensitive data over a non-encrypted network connection
  • 409 Conflict: SUBMIT-ORDER-ERROR: invalid status value
  • 409 Conflict: ORDER-DATA-ERROR: missing either external_order_instanceid or staticdata, unknown workflow; invalid keys or sensitive data format
  • 409 Conflict: DUPLICATE-ORDER-KEY: the given unique key already exists in the defined scope
  • 409 Conflict: WORKFLOW-KEY-ERROR: invalid workflow key given
Note
  • requires permission OMQ::QR_SUBMIT_ORDER
  • sensitive data can only be created over a secure connection
  • The global_unique_key, workflow_specific_unique_key, and workflow_unique_key options can be used to ensure that given workflow order data is only created once; note that any archiving schema is also searched when checking for duplicate keys. These options may be combined, but it's recommended to use no more than one key for uniqueness.
See also

PUT /api/latest/workflows/{id_or_name}?action=decAutostart

Description
Decrements the autostart value on the current workflow.
Return Value
This API returns a hash with the following keys:
  • updated: True or False
  • autostart: the new autostart value
  • info: info about the workflow update action
  • stopped: the number of execution instances started
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: WORKFLOW-SETAUTOSTART-ERROR: autostart value cannot be negative; cannot change the autostart value on a workflow with the deprecated flag set
Note

PUT /api/latest/workflows/{id_or_name}?action=disable

Description
Disables the current workflow.
Return Value
This API returns a hash with the following keys:
  • name: the workflow name
  • version: the workflow version
  • workflowid: the workflow ID
  • info: info about the workflow disable action
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
Note

PUT /api/latest/workflows/{id_or_name}?action=enable

Description
Enables the current workflow if it is disabled.
Return Value
This API returns a hash with the following keys:
  • name: the workflow name
  • version: the workflow version
  • workflowid: the workflow ID
  • info: info about the workflow enable action
Errors
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: disabled workflows cannot be enabled while the system is shutting down
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
Note

POST /api/latest/workflows/{id_or_name}?action=execSynchronous

Description
Creates a new order for the current workflow and executes it synchronous mode. The call will normally return only after the workflow order reaches a OMQ::StatComplete or OMQ::StatError state, unless the system or the workflow order data instance are manually stopped while the workflow order data instance is being processed, in which case other statuses can be returned.

To ensure that a given workflow order is only created once for a given unique key value, make sure your workflow defines order keys, and use one of the following options to guarantee uniqueness of the order:

  • global_unique_key
  • workflow_specific_unique_key
  • workflow_unique_key
Arguments
This API takes the following hash arguments (either as URI arguments or in the message body):
  • [external_order_instanceid]: (string) the external order instance ID for the workflow data; either this key or staticdata is required
  • [dynamicdata]: (hash) the initial dynamic data for the order
  • [global_unique_key]: (optional hash) a hash giving one or more unique order keys for the order (across all workflows regardless of workflowid, name, or version); if this key already exists for any order in the system, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • [orderkeys]: (hash) a hash of order keys for the order
  • [parent_workflow_instanceid]: (int) a loosely-coupled workflow that will be marked as the parent of this workflow
  • [priority]: (int) the order priority (default OMQ::DefaultOrderPriority) from 0 - 999; priority 0 is the highest; 999 is the lowest
  • [sensitive_data]: (hash) a hash of sensitive data information for the workflow; this key can only be used when submitting the data over a secure (encrypted) connection; the keys are sensitive data key types, values are hashes keyed by sensitive data values, and the hash values have the following keys:
    • [aliases]: (list of strings) zero or more string aliases for the sensitive data
    • data: (hash) the sensitive data hash itself
    • [meta]: (hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
      • [PURPOSE]: free-form information about the purpose of the sensitive data
      • [CATEGORIES]: free-form information about the categories of sensitive data
      • [RECIPIENTS]: free-form information about the recipients or recipient catories of sensitive data
      • [STORAGE]: free-form information about the storage time or rules for sensitive data
  • [staticdata]: (hash) the static data for the order; either this key or external_order_instanceid is required
  • [workflow_specific_unique_key]: (optional string) a hash giving one or more unique order keys for the particular workflowid (which matches a unique name and workflow version); if this key already exists on an order with the target workflowid, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • [workflow_unique_key]: (optional string) a hash giving one or more unique order keys for the particular workflow by name only (across all workflows with the same name regardless of version); if this key already exists for a workflow order with the same name, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
Return Value
This API returns a hash with the following keys:
  • workflow_instanceid: the workflow instance ID of the order
  • status: the status of the workflow order
  • dynamicdata: the dynamic data of the workflow order instance
Errors
  • 403 Forbidden: WORKFLOW-ACCESS-ERROR: this is exception is thrown when Role Based Access Control is enabled and the user does not have the right to access the given workflow (for more information, see Interface Groups)
  • 403 Forbidden: AUTHORIZATION-ERROR: this exception is thrown when Role Based Access Control is enabled and the user does not have sufficient privileges for the operation
  • 409 Conflict: SHUTDOWN-IN-PROGRESS: cannot start new workflows because the system is shutting down
  • 409 Conflict: SENSITIVE-DATA-ERROR: a workflow order was submitted with sensitive data over a non-encrypted network connection
  • 409 Conflict: ORDER-DATA-ERROR: missing either external_order_instanceid or staticda