Skip to main content

Version: 21.11

POST Query Group

Return a list of job and form groups, filtered on the specified criteria. The result is ordered alphabetically by group name.

Request

HTTP request

POST https://<JM_SERVER>/workspaces/secure/api/v1/group/query

Request body

The POST request must contain a JSON structure describing the group 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.

AttributeDescription
fetchLimitInteger (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.
fetchOffsetInteger (Default: 0)
Specify the query fetch offset.
Note: This attribute is used in conjunction with fetchLimit to determine which results are returned.
filtersList
A list of filters to query groups by. To learn more about filters, see Filter query results.

Supported filter criteria attributes

The following filter criteria attributes are supported for the Group API.

caution

If you specify an invalid filter criteria attribute, a 400 Bad Request HTTP status code is returned.

AttributeDescription
groupNameString
Filter groups based on the specified group name.
Supported operators: =, IN, LIKE
groupTypeString
Filter groups based on the specified group type.
Supported group types: "Form", "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 group query. Contact administrator.

Example

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

note

Ensure you specify Content-Type: application/json.

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

{
"fetchLimit": 100,
"fetchOffset": 0,
"filters": [
{
"criteria": [
"groupName LIKE 'job'",
"groupType = {0}"
],
"params": [
"Form"
],
"operator": "AND"
},{
"criteria": [
"groupName LIKE 'App'"
],
"operator": "AND"
}
]
}
Example successful response
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 3,
"result": [
{
"name": "Job Applicants",
"description": "Job Applicants",
"type": "Form"
}
]
}