Skip to main content

Version: 22.10

POST Count Job

Return the total count of jobs, filtered on the specified criteria.

This API is similar to Query Job in its supported filter criteria attributes, however, it ignores the fetchLimit and fetchOffset set in the query.

Only jobs associated with the current portal and its organizations are included in the count.

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

  • jobStatus = 'In Progress'

Request

HTTP request

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

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 supported query JSON attributes are listed below. All attributes are optional except where otherwise indicated. Any additional attributes are ignored or return a 400 Bad Request HTTP status code.

AttributeDescription
filtersList
A list of filters to query jobs by. To learn more about filters, see Filter query results.

Supported filter criteria attributes

The following filter criteria attributes are supported for the Job API. Any additional attributes return a 400 Bad Request HTTP status code.

AttributeDescription
clientCodeString
Filter jobs based on the specified 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. Supports exact match of value but not extract name. For example:
- Supported: "formDataMap[*] = 'Jane'"
- Unsupported: "formDataMap['firstName'] = 'Jane'"
Supported operators: =, IN
groupNameString
Filter jobs associated with the specified job groups.
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 specified job name.
Supported operators: =, IN, LIKE
processImmediateBoolean
Filter jobs based on the processImmediate property.
Values: true, false.
  • true: "processImmediate = 1"
  • false: "processImmediate = 0" and/or "processImmediate = null"
Supported operators: =
propertiesMap
Filter jobs based on specified job properties.
Supports exact match of both name and value for a single property per search. For example:
  • "properties[*] = 'prop1Value'"
  • "properties['property1'] = 'prop1Value'"
Supported operators: =
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 specified job status property.
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). For example:
  • "timeCreated <= '2018-01-01'"
  • "timeCreated = '2018-01-01 15:17:29'"
  • "timeCreated <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
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). For example:
  • "timeCompletionScheduled <= '2018-01-01'"
  • "timeCompletionScheduled > '2018-01-01 09:00:00'"
  • "timeCompletionScheduled <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
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). For example:
  • "timeFinished <= '2018-01-01'"
  • "timeFinished = '2018-01-01 15:17:29'"
  • "timeFinished <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
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). For example:
  • "timeLastModified <= '2018-01-01'"
  • "timeLastModified = '2018-01-01 15:17:29'"
  • "timeLastModified > '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
userLoginNameString
Filter jobs based on the login name of the user associated with transactions submitted as part of the job.
Supported operators: =, IN

Response

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

Error messages

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

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 count. Contact administrator.

Example

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

note

Ensure you specify Content-Type: application/json.

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

{
"filters": [
{
"criteria": [
"spaceName = 'Web Plug-in'",
"spaceName = 'Work Space'",
"status = 'Completed",
"name LIKE 'loan"
],
"operator" : "or"
}
]
}
Example successful response
{
"count": 29
}