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.
Attribute | Description |
---|---|
filters | List 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.
Attribute | Description |
---|---|
clientCode | String Filter jobs based on the specified client code. Supported operators: = , IN |
currentAction | String Filter jobs based on the current step action. Supported operators: = , IN |
currentStep | String Filter jobs based on the current step. Supported operators: = , IN |
formDataMap | String 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 |
groupName | String Filter jobs associated with the specified job groups. Supported operators: = , IN |
jobKey | String Filter jobs based on the job key. Matches one job record only. Supported operators: = , IN |
jobRefNumber | String Filter jobs based on the job reference number. Matches one job record only. Supported operators: = , IN |
name | String Filter jobs based on the specified job name. Supported operators: = , IN , LIKE |
processImmediate | Boolean Filter jobs based on the processImmediate property.Values: true , false .
= |
properties | Map Filter jobs based on specified job properties. Supports exact match of both name and value for a single property per search. For example:
= |
spaceName | String Filter jobs based on the name of spaces associated with transactions submitted as part of the job. Supported operators: = , IN |
status | String Filter jobs based on the specified job status property.Supported operators: = , IN |
timeCreated | String 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:
< , <= , = , >= , > |
timeCompletionScheduled | String 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:
< , <= , = , >= , > |
timeFinished | String 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:
< , <= , = , >= , > |
timeLastModified | String 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:
< , <= , = , >= , > |
userLoginName | String 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 key | Error | HTTP status code |
---|---|---|
illegalArgument | Unsupported criteria attribute: <ATTRIBUTE> Unsupported operator for attribute '<ATTRIBUTE>': <OPERATOR> For input string: <STRING> Please see Error Log ID {number} | 400 Bad Request |
internalError | Please see Error Log ID {number} | 500 Internal Server Error |
unableToResolvePortal | Unable to resolve portal from request | 400 Bad Request |
Error responses
HTTP status code | Description |
---|---|
400 Bad Request | Bad request or request parameter. Check error message for details. |
404 Not Found | Ensure the URL endpoint is entered correctly. |
500 Internal Server Error | Exception 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
.
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"
}
]
}
{
"count": 29
}