Skip to main content

Version: 23.10

POST Query Job

Return a list of jobs, filtered on specified criteria. Only jobs associated with the current portal and its organisations are returned.

If no filters are specified in the query, the following default filters are applied.

  • jobStatus = 'In Progress'

The result is ordered by job oid by default; however, a sort order can be defined.

Request

HTTP request

POST https://<JM_SERVER>/workspaces/secure/api/v1/job/query

Request body

The POST request must contain a JSON structure describing the job query. To support multiple parameters, this API uses HTTP Content Type: application/json.

The set of query JSON attributes is listed below. All attributes are optional except where otherwise indicated.

AttributeDescription
attributesList
The list of attributes to return.
Specify the attributes to return in each job in the result. Jobs consist of the attributes listed in Job Result Attributes.
If no attributes are specified, all attributes are returned.
fetchLimitInteger (Default: 10000)
Required. Specify the query fetch limit; that is, the maximum number of results returned.
Values: In the range 1 - 10,000. Values greater than 10,000 are reduced to 10,000.
Note: This attribute is used in conjunction with fetchOffset to determine which results are returned.
fetchOffsetInteger (Default: 0)
Specify the query fetch offset.
Note: This attribute is used in conjunction with fetchLimit to determine which results are returned.
filtersList
Provides a list of filters to query Jobs by. To learn more about filters, see Filter query results.
sortsList
Provides a list of orderings to sort Jobs by. To learn more about sorting, see Sort query results.

Supported filter criteria attributes

The following filter criteria attributes are supported for this operation.

caution

If you specify an invalid filter criteria attribute, a 400 Bad Request HTTP status code is returned.

AttributeDescription
clientCodeString
Filter jobs based on the client code.
Supported operators: =, IN
currentActionString
Filter jobs based on the current step action.
Supported operators: =, IN
currentStepString
Filter jobs based on the current step.
Supported operators: =, IN
formDataMapString
Filter jobs based on an entry in the formDataMap of a transaction as part of the job.
Supported operators: =, IN
Supports exact match of value but not extract name. For example:
  • Supported: "formDataMap[*] = 'Jane'"
  • Not supported: "formDataMap['firstName'] = 'Jane'"
groupNameString
Filter jobs associated with the specified job group names.
Supported operators: =, IN
jobKeyString
Filter jobs based on the job key. Matches one job record only.
Supported operators: =, IN
jobRefNumberString
Filter jobs based on the job reference number. Matches one job record only.
Supported operators: =, IN
nameString
Filter jobs based on the job name.
Supported operators: =, IN, LIKE
processImmediateBoolean
Filter jobs based on the process immediate property.
Values: true, false
  • true: "processImmediate = 1"
  • false: "processImmediate = 0" and/or "processImmediate = null"
Supported operators: =
propertiesMap
Filter jobs based on job properties.
Supported operators: =
Supports exact match of both name and value for a single property per search. For example:
  • Supported: "properties[*] = 'prop1Value'"
  • Supported: "properties['property1'] = 'prop1Value'"
spaceNameString
Filter jobs based on the name of spaces associated with transactions submitted as part of the job.
Supported operators: =, IN
statusString
Filter jobs based on the status property of the job.
Supported operators: =, IN
timeCreatedString
Filter jobs based on the time created timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Supported operators: <, <=, =, >=, >
Examples:
  • "timeCreated <= '2018-01-01'"
  • "timeCreated = '2018-01-01 15:17:29'"
  • "timeCreated <= '2018-01-01T15:17:29+10:00'"
timeCompletionScheduledString
Filter jobs based on the time completed scheduled timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Supported operators: <, <=, =, >=, >
Examples:
  • "timeCompletionScheduled <= '2018-01-01'"
  • "timeCompletionScheduled > '2018-01-01 09:00:00'"
  • "timeCompletionScheduled <= '2018-01-01T15:17:29+10:00'"
timeFinishedString
Filter jobs based on the time finished timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Supported operators: <, <=, =, >=, >
Examples:
  • "timeFinished <= '2018-01-01'"
  • "timeFinished = '2018-01-01 15:17:29'"
  • "timeFinished <= '2018-01-01T15:17:29+10:00'"
timeLastModifiedString
Filter jobs based on the time last modified timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Supported operators: <, <=, =, >=, ><br/Examples:
  • "timeLastModified <= '2018-01-01'"
  • "timeLastModified = '2018-01-01 15:17:29'"
  • "timeLastModified > '2018-01-01T15:17:29+10:00'"
userLoginNameString
Filter jobs based on the loginName of the user associated with transactions submitted as part of the job.
Supported operators: =, IN

Result attributes

The jobs returned by the query consist of a number of attributes. If only certain attributes are of interest, they can be specified in the "attributes" parameter in the Job Query.

caution

If you specify an invalid result attribute, a 400 Bad Request HTTP status code is returned.

By default all attributes except the following are returned unless their value is empty.

  • txns.comments
  • txns.formDataMap
  • txns.milestones
  • txns.properties

The following result attributes are supported for this operation.

"attributes": [
"clientCode",
"comments",
"currentAction",
"currentStep",
"groupName",
"jobKey",
"jobRefNumber",
"name",
"processImmediate",
"properties",
"status",
"steps",
"timeCompletionScheduled",
"timeCreated",
"timeFinished",
"timeLastModified",
"txns",
"txns.comments",
"txns.formDataMap",
"txns.milestones",
"txns.properties"
]

Response

If successful, this operation returns a response with a HTTP 200 OK status code.

Error messages

Error keyErrorHTTP status code
unableToResolvePortalUnable to resolve portal from request400 Bad Request
illegalArgumentUnsupported criteria attribute: <ATTRIBUTE>
Unsupported operator for attribute '<ATTRIBUTE>': <OPERATOR>
For input string: <STRING>
Invalid sort string: <STRING>
Unsupported sort attribute: <ATTRIBUTE>
Please see Error Log ID {number}
400 Bad Request
internalErrorPlease see Error Log ID {number}500 Internal Server Error

Error responses

HTTP status codeDescription
400 Bad RequestBad request or request parameter. Check error message for details.
404 Not FoundEnsure the URL endpoint is entered correctly.
500 Internal Server ErrorException occurred in job query. Contact administrator.

Example

Complex queries can be created by joining multiple filter criteria using "AND" or "OR" operators. For examples of how to define these queries, see Filter query results.

Query with result attributes

In this example, attributes are passed into the query; hence, only the specified attributes are returned unless their value is empty.

Ensure you specify Content-Type: application/json.

Example request - Specified attributes
POST /workspaces/secure/api/v1/job/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json

{
"fetchLimit": 1,
"fetchOffset": 0,
"attributes": [
"jobKey",
"jobRefNumber",
"name",
"clientCode",
"status",
"timeCreated"
],
"filters": [
{
"criteria": [
"spaceName = 'Web Plug-in'",
"spaceName = 'Work Space'",
"status = 'Completed",
"name LIKE 'loan"
],
"operator" : "or"
}
],
"sorts": [
"timeCreated desc",
"jobRefNumber asc"
]
}
Example successful response - Specified attributes
{
"fetchLimit": 1,
"fetchOffset": 0,
"durationMs": 11,
"result": [
{
"name": "CAP - 1 Step Review",
"jobKey": "0b271437b65654ade78b7ec58295d83c",
"jobRefNumber": "GVSPC66",
"status": "In Progress",
"clientCode": "captest",
"timeCreated": "2018-08-07T11:49:42+10:00"
}
],
"totalCount": 29
}

Query without result attributes

In this example, no attributes are passed into the query; hence, the default result attributes are returned unless their value is empty.

Example request - Default attributes
POST /workspaces/secure/api/v1/user/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json

{
"fetchLimit": 1,
"fetchOffset": 0,
"filters": [
{
"criteria": [
"spaceName = 'Web Plug-in'",
"spaceName = 'Work Space'",
"status = 'Completed",
"name LIKE 'loan"
],
"operator" : "or"
}
],
"sorts": [
"timeCreated desc",
"jobRefNumber asc"
]
}
Example successful response - Default attributes
{
"fetchLimit": 1,
"fetchOffset": 0,
"durationMs": 181,
"totalCount": 29,
"result": [
{
"name": "CAP - 1 Step Review",
"jobKey": "0b271437b65654ade78b7ec58295d83c",
"jobRefNumber": "GVSPC66",
"status": "In Progress",
"clientCode": "captest",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"groupName": "",
"steps": [
{
"name": "Application Start",
"currentAction": "Accept Quote",
"type": "start",
"status": "Completed",
"jobActions": [
{
"name": "Accept Quote",
"type": "Job Form Start",
"jobActionKey": "9538e1fed4c0e19e2b53da8be51413a2",
"status": "Completed",
"submission": "e13470d113679a94e8108278ea45d768",
"actionService": "Job Form Start Action - v1.0.0",
"actionAttempts": 1,
"timeActionExecuted": "2018-08-07T11:49:43+10:00"
}
]
},
{
"name": "Application Review",
"currentAction": "Review Wait",
"type": "",
"status": "In Progress",
"jobActions": [
{
"name": "Assign Review",
"type": "Job Task Assign",
"jobActionKey": "55a8500edecf78ff23f3705c0186d2ca",
"status": "Assigned",
"submission": "4d99591083a2e21ce4cee7fe8570d2c3",
"actionService": "Job Task Assign Action - v1.0.0",
"actionAttempts": 1,
"timeActionExecuted": "2018-08-07T11:49:43+10:00"
},
{
"name": "Review Wait",
"type": "Job Task Wait",
"jobActionKey": "e3fb682064120937370364b8319da140",
"status": "Pending",
"actionService": "Job Task Wait Action - v1.0.0"
}
]
}
],
"txns": [
{
"clientCode": "captest",
"fileAttachments": [],
"formCategories": [],
"formCode": "CAP-customer-enquiry",
"formName": "Job Maestro 1",
"formStatus": "Completed",
"groupName": "",
"jobRefNumber": "GVSPC66",
"receiptUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/servlet/AttachmentViewServlet?attachmentKey=e13470d113679a94e8108278ea45d768",
"spaceName": "Work Space",
"submitKey": "e13470d113679a94e8108278ea45d768",
"timeCompleted": "2018-08-07T11:49:42+10:00",
"timeRequest": "2018-08-07T11:49:23+10:00",
"timeSubmitted": "2018-08-07T11:49:42+10:00",
"timeUserLastModified": "2018-08-07T11:49:42+10:00",
"trackingCode": "GVSPC66",
"userSaved": false
},
{
"clientCode": "captest",
"fileAttachments": [],
"formCategories": [],
"formCode": "CAP-customer-enquiry",
"formName": "Job Maestro 1",
"formStatus": "Assigned",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/servlet/SmartForm.html?submitKey=4d99591083a2e21ce4cee7fe8570d2c3",
"groupName": "Job Managers, Job Reviewers",
"jobRefNumber": "GVSPC66",
"spaceName": "Work Spaces",
"submitKey": "4d99591083a2e21ce4cee7fe8570d2c3",
"timeRequest": "2018-08-07T11:49:42+10:00",
"trackingCode": "2GK2MY7",
"userSaved": false
}
],
"processImmediate": true,
"timeCreated": "2018-08-07T11:49:42+10:00",
"timeLastModified": "2018-08-07T11:49:42+10:00",
"properties": {},
"comments": []
}
]
}