POST Count Txn
Return the total count of transactions associated with the portal, filtered on the specified criteria.
This API is similar to Query Txn in its supported filter criteria attributes; however, it ignores the fetchLimit
and fetchOffset
set in the query.
Only submissions associated with the current portal are included in the count.
If no filters are specified in the query, the following default filters are applied.
formStatus in [ 'Saved', 'Opened', 'Assigned']
timeRequest range of 14 days
Furthermore, if no formStatus
or identity (submitKey
, trackingCode
, jobRefNumber
) filters are specified within an operator "AND"
, the default filter "formStatus in ['Saved', 'Opened', 'Assigned']"
is added. Similarly, if no time or identity (submitKey
, trackingCode
, jobRefNumber
) filters are specified within an operator "AND"
, the default filter to limit the results to transactions from the last 14 days based on timeRequest
is added.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/txn/count
Request body
The POST request must contain a JSON structure describing the txn query. To support multiple parameters, this API uses HTTP Content Type: application/json
.
The available query attributes are listed below. All attributes are optional except where otherwise indicated.
caution
If you specify an invalid request attribute, a 400 Bad Request
HTTP status code is returned.
Attribute | Description |
---|---|
filters | List A list of filters to query transactions by. To learn more about filters, see Filter query results. |
scope | String Defines which transactions will be included in the search. By default (or if passing in "Portal" ), only transactions directly associated with the current space are included. When passing in "Form" , and the user has the Help Desk View permissions, all transactions whose forms are associated with the current space are included (even if the transaction itself is associated with a different space). |
Supported filter criteria attributes
The supported filter criteria attributes are listed below.
caution
If you specify an invalid filter criteria attribute, a 400 Bad Request
HTTP status code is returned.
Attribute | Description |
---|---|
authStatus | String Filter transactions based on the authStatus of the transaction.Supported operators: = , IN |
clientCode | String Filter transactions based on the client code. Supported operators: = , IN |
emailAddress | String Filter transactions based on the email address associated with the submission. Supported operators: = , IN |
formCategory | String Filter transactions based on the form template version's association to the category specified. Supported operators: = , IN |
formCode | String Filter transactions based on the form code of the submitted form. Supported operators: = , IN |
formDataMap | Map Filter transactions based on an entry in the formDataMap .Supports exact match of value but not extract name. For example:
= , IN |
formName | String Filter transactions based on the form name of the submitted form. Supported operators: = , IN |
formStatus | String Filter transactions based on transaction form status. Supported operators: = , IN |
groupName | String Filter transactions based on the association with submission groups with specified names. Supported operators: = , IN |
jobRefNumber | String Filter transactions based on the job reference number. Supported operators: = , IN |
milestones | String Filter transactions based on submission milestones. Supported operators: = , IN |
properties | Map Filter transactions based on submission properties. Supported operators: = , IN Supports exact match of both name and value for a single property per search. For example:
|
spaceName | String Filter transactions based on the association with spaces with name(s) specified Supported operators: = , IN |
submitKey | String Filter transactions based on the submission submitKey . Matches one transaction record only.Supported operators: = , IN |
timeAbandoned | String Filter transactions based on the time abandoned timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
< , <= , = , >= , >= |
timeCompleted | String Filter transactions based on the time completed timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
< , <= , = , >= , >= |
timeCreated | String Filter transactions 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).
< , <= , = , >= , >= |
timeRequest | String Filter transactions based on the time request timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
< , <= , = , >= , >= |
timeSubmitted | String Filter transactions based on the time submitted timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
< , <= , = , >= , >= |
timeUserLastModified | String Filter transactions based on the time user 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).
< , <= , = , >= , >= |
trackingCode | String Filter transactions based on the tracking code. Matchs one transaction record only. Supported operators: = , IN |
userLoginName | String Filter transactions based on the user login name. Supported operators: = , IN |
userSaved | Boolean Filter transactions based on the userSaved property.
= |
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>Invalid scope: <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 txn count. 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.
Ensure you specify Content-Type: application/json
.
POST /workspaces/secure/api/v1/txn/count HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified < '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
]
}
{
"count": 3
}