POST Query Txn
Return a list of transactions, filtered on the specified criteria. Only submissions associated with the current portal are returned.
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.
Likewise, 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.
The result is ordered by submission oid
by default however a sorting order can be defined.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/txn/query
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.
Attribute | Description |
---|---|
attributes | List A list of attributes to return. Specify the attributes to return in each txn in the result. Transactions consists of the attributes listed in Txn Result Attributes. If no attributes are specified, all attributes are returned. |
fetchLimit | Integer (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. |
fetchOffset | Integer (Default: 0 )Specify the query fetch offset. Note: This attribute is used in conjunction with fetchLimit to determine which results are returned. |
filters | List A list of filters to query transactions by. To learn more about filters, see Filter query results. |
scope | String Define 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). |
sorts | List A list of sort orders to sort transactions by. To learn more about sorting, see Sort query results. |
Supported filter criteria attributes
The filter criteria attributes supported are listed below. Any additional attributes will return a Bad Request Response.
Attribute | Description |
---|---|
authStatus | String Filter transactions based on the transaction authStatus .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 specified category. Supported operators: = , IN |
formCode | String Filter transactions based on the submitted form's form code. Supported operators: = , IN |
formDataMap | Map Filter transactions based on an entry in the formDataMap . Supports exact match of value but not extract name.Examples:
= |
formName | String Filter transactions based on the submitted form's form name. Supported operators: = , IN |
formStatus | String Filter transactions based on transaction form status. Supported operators: = , IN |
groupName | String Filter transactions based on the association with the specified submission group 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. Supports exact match of both name and value for a single property per search. Examples:
= , IN |
spaceName | String Filter transactions based on the association with the specified space names. 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). Examples:
< , <= , = , >= , > |
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). Examples:
< , <= , = , >= , > |
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). Examples:
< , <= , = , >= , > |
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). Examples:
< , <= , = , >= , > |
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) . Examples:
< , <= , = , >= , > |
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). Examples:
< , <= , = , >= , > |
trackingCode | String Filter transactions based on the tracking code. Matches 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 user saved property.
= |
Result attributes
The transactions returned by the query consist of a number of attributes. If only certain attributes are of interest, these can be specified in the "attributes"
parameter in the Txn Query. By default, all attributes are populated and returned if their value is not empty.
All Transaction attributes are listed below. All attributes are optional except where otherwise indicated.
caution
If you specify an invalid query attribute, a 400 Bad Request
HTTP status code is returned.
"attributes": [
"authStatus",
"clientCode",
"comments",
"emailAddress",
"fileAttachments",
"formCategories",
"formCode",
"formDataMap",
"formName",
"formStatus",
"formUrl",
"groupName",
"job",
"job.currentAction",
"job.currentStep",
"job.jobKey",
"job.name",
"job.jobRefNumber",
"job.status",
"job.timeCompletionScheduled",
"job.timeCreated",
"job.timeLastModified",
"milestones",
"properties",
"receiptUrl",
"spaceName",
"submitKey",
"taskType",
"timeAbandoned",
"timeCompleted",
"timeCreated",
"timeRequest",
"timeSubmitted",
"timeUserLastModified",
"trackingCode",
"userLoginName",
"userSaved"
]
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> Invalid sort string: <STRING> Unsupported sort attribute: <ATTRIBUTE> 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 query. Contact administrator. |
Examples
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 Txn with result attributes
In this example, attributes are passed into the query; hence, only the specified attributes are returned. For each atribute, if the attribute value is empty it is not returned.
Ensure you specify Content-Type: application/json
.
POST /workspaces/secure/api/v1/txn/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"fetchLimit": 100,
"fetchOffset": 0,
"attributes": [
"clientCode",
"formDataMap",
"formCode",
"submitKey",
"job",
"job.jobRefNumber"
],
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified < '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
],
"sorts": [
"submitKey asc"
],
"scope": "portal"
}
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 37,
"totalCount": 3,
"result": [
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Katheleen Pacinovsky",
"lastName": "Pacinovsky",
"loanAmount": "15000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "9B4W7NM"
},
"submitKey": "08215d28b908dc616a03325b7eaafee7"
},
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Louise Pica",
"lastName": "Pica",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "MXGR2DC"
},
"submitKey": "0a426dcf7c648c4e9cc06083bd5669b4"
},
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Lily Grace Haynesworthington",
"lastName": "Haynesworthington",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "G4HYYSY"
},
"submitKey": "6057bc3cef7773f5745a780258d6156a"
}
]
}
Query Txn without result attributes
In this example, no attributes are passed into the query; hence, all attributes for the transactions are returned. For each attribute, if the attribute value is empty it will not be returned.
POST /workspaces/secure/api/v1/user/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"fetchLimit": 100,
"fetchOffset": 0,
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified < '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
],
"sorts": [
"submitKey asc"
]
}
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 200,
"totalCount": 3,
"result": [
{
"clientCode": "workspace",
"comments": [
{
"timeAdded": "2018-09-05T19:54:33-06:00",
"session": "441SKEuP-fmzpzbwi3a6JZNjOHmaq7jHxbxz2Sem",
"ipAddress": "114.141.100.202",
"commentId": "1",
"header": "comment header",
"userLoginName": "user2",
"message": "this is an example to a comment"
},
{
"parent": "1",
"timeAdded": "2018-09-05T19:55:05-06:00",
"session": "441SKEuP-fmzpzbwi3a6JZNjOHmaq7jHxbxz2Sem",
"ipAddress": "114.141.100.202",
"commentId": "2",
"header": "reply header",
"userLoginName": "user2",
"message": "reply comment"
}
],
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Katheleen Pacinovsky",
"lastName": "Pacinovsky",
"loanAmount": "15000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=08215d28b908dc616a03325b7eaafee7",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "9B4W7NM",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "08215d28b908dc616a03325b7eaafee7",
"taskType": "Review",
"timeCreated": "2018-07-24T15:17:29+10:00",
"timeRequested": "2018-07-24T15:17:29+10:00",
"timeUserLastModified": "2018-07-24T15:17:29+10:00",
"trackingCode": "M95M46T",
"userLoginName": "cwang",
"userSaved": false
},
{
"clientCode": "workspace",
"comments": [],
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Louise Pica",
"lastName": "Pica",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=0a426dcf7c648c4e9cc06083bd5669b4",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "MXGR2DC",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "0a426dcf7c648c4e9cc06083bd5669b4",
"taskType": "Review",
"timeCreated": "2018-07-25T13:02:08+10:00",
"timeRequested": "2018-07-25T13:02:08+10:00",
"timeUserLastModified": "2018-07-25T13:02:08+10:00",
"trackingCode": "MRW8PQW",
"userLoginName": "[email protected]",
"userSaved": false
},
{
"clientCode": "workspace",
"comments": []
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Lily Grace Haynesworthington",
"lastName": "Haynesworthington",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=6057bc3cef7773f5745a780258d6156a",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "G4HYYSY",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "6057bc3cef7773f5745a780258d6156a",
"taskType": "Review",
"timeCreated": "2018-07-24T15:17:59+10:00",
"timeRequested": "2018-07-24T15:17:59+10:00",
"timeUserLastModified": "2018-07-24T15:17:59+10:00",
"trackingCode": "FND9SG6",
"userSaved": false
}
]
}