REST Form Groups API
The Form Groups API provides a REST service for querying and creating Form Groups in Journey Manager in a secure and efficient manner.
Security
To access the Form Groups REST endpoint the caller needs to be authenticated using HTTP Basic Authentication. The authenticated user will need an user account on the Journey Manager server and this account will need to be active and have access to the Management Console module.
To be authorized to call the service the user account will also need the Management Console permission 'REST Form Groups API
'.
URL Endpoint
The REST Form Groups API URL endpoint is as follows:
``` https://Service API
This section provides a description all the REST Form Groups API operations including:
GET Form Group
Retrieve a single form group by specifying the database ID.
URL Format
GET https://<tm server>/manager/secure/rest/form-groups/v1/<group ID>
URL Example
GET https://transact.maguire.com/manager/secure/rest/form-groups/v1/23/
200 Response
{
"id": 23,
"groupName": "Reviewer Group",
"groupDescription": "Application Reviewers Group",
"formWorkGroup": true,
"newForm": true,
"savedForm": true,
"completedForm": true,
"taskAssign": true
}
GET Form Groups
Retrieve the list of form groups sorted by database ID in descending order (the ordering can be customized).
URL Format
GET https://<tm server>/manager/secure/rest/form-groups/v1/
Request Parameters
The table below shows the set of request parameters can be used as additional search criteria.
Parameter | Description |
---|---|
id | the unique form group id |
groupName | filters on the form group name |
formWorkGroup | filters on the formWorkGroup access control permission attribute [ true | false ] |
URL Example
GET https://transact.maguire.com/manager/secure/rest/form-groups/v1/?groupName=Card Applicants
200 Response
[
{
"id": 42,
"groupName": "Card Applicants",
"groupDescription": "Credit Card Applicants",
"formWorkGroup": false,
"newForm": true,
"savedForm": true,
"completedForm": true,
"taskAssign": false
}
]
POST Create Form Group
Create a form group that a user or task can be assigned to.
URL Format
POST https://<tm server>/manager/secure/rest/form-groups/v1/
POST Body
The POST request must contain a JSON structure describing the group.
To support multiple parameters this API uses the HTTP Content Type: application/json
The set of task JSON attributes is listed below (all attributes are optional unless indicated otherwise):
Attribute | Type | Description |
---|---|---|
groupName | String | specifies the group name, this value must be unique (required) |
groupDescription | String | specifies the group description (optional) |
formWorkGroup | boolean | access control permission to share the form with work group members |
newForm | boolean | access control permission allowing users to open new forms |
savedForm | boolean | access control permission allowing users to open saved work group forms and group assigned form tasks |
completedForm | boolean | access control permission allowing users to view completed form group submissions |
taskAssign | boolean | access control permission allowing users to reassign tasks to other users |
Example: Creating form group
Please ensure you specify Content-Type: application/json
POST <b>/manager/secure/rest/form-groups/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/json
{
"groupName": "Acme Applicant Group",
"groupDescription": "Acme Corporation Applicants Group",
"formWorkGroup": true,
"newForm": false,
"savedForm": true,
"completedForm": true,
"taskAssign": false
}
200 Response
{
"id": 52,
"groupName": "Acme Applicant Group",
"groupDescription": "Acme Corporation Applicants Group",
"formWorkGroup": true,
"newForm": false,
"savedForm": true,
"completedForm": true,
"taskAssign": false
}