Version: 20.11 (EOL)
POST Query Category
Retrieve the list of distinct categories associated with the portal, sorted by name in descending order. The query returns only those categories that are used by non-test forms that are part of active clients.
The result is ordered alphabetically by category name.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/category/query
Request body
The POST request must contain a JSON structure describing the category 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.
Attribute | Description |
---|---|
clientCode | String Filter the list of returned categories to just those associated with this clientCode . |
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. |
formCodes | Set Filter categories by forms with the form codes specified in this set. |
Response
If successful, this operation returns a response with a HTTP 200 OK
status code.
Error messages
Error key | Error | HTTP status code |
---|---|---|
illegalArg | 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 category query. Contact administrator. |
Example
Ensure you specify Content-Type: application/json
.
Example request
POST /workspaces/secure/api/v1/category/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"fetchLimit": 100,
"fetchOffset": 0,
"clientCode": "workspace",
"formCodes": ["loanapplication", "loanApp2"]
}
Example successful response
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 5,
"result": [
{
"name": "Deposit Account Opening",
"description": "DAO forms - Springboard solution forms"
},
{
"name": "Loan applications",
"description": "Test out the sample application flow"
}
]
}