Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

Group API can perform functions to interact or exchange data for Groups.interact with Group and its users in the Joget built-in directory manager.

Image AddedImage Removed


NameDescription
1

Anchor
Add group
Add group
Add group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Add a new group.

Name

Description
URL/group
HTTP MethodPOST
Body Parameters
ParameterDescription
idGroup ID.
nameGroup name.
descriptionDescription of group.
organization
KeyDescription
id

ID of the organization that this group belongs to.

This parameter is optional.

Sample Response
Code Block
languagejs
{
  "id": "apiTestGroup",
  "name": "API Test Group",
  "description": "This is a group created by API.",
  "organization": {
    "id": "ORG-001"
  }
}
2

Anchor
Assign user to group
Assign user to group
Assign user to group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Assign a Joget user to a group.

Name

Description
URL/group/assignUser/{group}/{username}
HTTP MethodPOST
Path Parameters
ParameterDescription
groupGroup ID.
usernameUsername of Joget user.
Sample Response
Code Block
languagejs
{
  "username": "cat",
  "groups": [
    {
		"id": "G-004",
		"name": "API Test Group",
		"description": "This is API generated group.",
		"organizationId": "ORG-001"
	}
  ]
}
3

Anchor
Delete group
Delete group
Delete group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Delete a group via group ID.

Name

Description
URL/group/{id}
HTTP MethodDELETE
Path Parameters
ParameterDescription
idGroup ID.
Sample Response
Code Block
languagejs
{
  "date": "Wed Aug 28 
15
16:
43
13:
58
00 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
34

Anchor
Find group
Find group
Find group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Get all groups by default.

Able to filter or sort the returned results via parameters.

Name

Description
URL/group/find
HTTP MethodGET
Query String Parameters
ParameterDescription
nameFilterFilters the response via group ID.
organizationIdFilter groups that belong to an organization, via organization ID.
sort

Group data column to sort.

Must be used in conjunction with "sortDescending" parameter.

sortDescending

Sort the specified "sort" parameter value in ascending or descending order.

Expects a boolean value.

Must be used in conjunction with "sort" parameter.

startOffsetStarting position of records to start query. Expects an integer.
pageSizeNumber of results to return. Expects an integer.
Sample Response
Code Block
languagejs
[
  {
    "id": "G-001",
    "name": "Managers",
    "description": "",
	"organization": {
    	"id": "ORG-001"
  	}
  },
  {
    "id": "G-002",
    "name": "CxO",
    "description": "",
	"organization": null
  },
	.....
]
54

Anchor
Find group by username
Find group by username
Find group by username

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Find the group that belongs to the specified user via username.

Name

Description
URL/group/findByUser/{username}
HTTP MethodGET
Path Parameters
ParameterDescription
usernameUsername of a Joget user.
Query String Parameters
ParameterDescription
nameFilterFilters the response via group ID.
organizationIdFilter groups that belong to an organization, via organization ID.
inGroup

Search for group(s) that the user belongs or does not belong to.

Expects a boolean value.

sort

Group data column to sort.

Must be used in conjunction with "sortDescending" parameter.

sortDescending

Sort the specified "sort" parameter value in ascending or descending order.

Expects a boolean value.

Must be used in conjunction with "sort" parameter.

startOffsetStarting position of records to start query. Expects an integer.
pageSizeNumber of results to return. Expects an integer.
Sample Response
Code Block
languagejs
[
  {
    "id": "G-001",
    "name": "Managers",
    "description": "",
	"organization": {
    	"id": "ORG-001"
  	}
  }
]
65

Anchor
Get group by ID
Get group by ID
Get group by ID

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Get details of a group via group ID.

Name

Description
URL/group/{id}
HTTP MethodGET
Path Parameters
ParameterDescription
idGroup ID.
Sample Response
Code Block
languagejs
{
  "id": "G-002",
  "name": "CxO",
  "description": "",
  "organization": {
    "id": "ORG-001"
  }
}
7

Anchor
Unassign user from group
Unassign user from group
Unassign user from group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Unassign a Joget user from a group.

Name

Description
URL/group/unassignUser/{group}/{username}
HTTP MethodDELETE
Path Parameters
ParameterDescription
groupGroup ID.
usernameUsername of Joget user.
Sample Response
Code Block
languagejs
{
  "date": "Thu Dec 05 03:29:56 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
86

Anchor
Update group
Update group
Update group

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Update the details of a group.

Name

Description
URL/group
HTTP MethodPUT
Body Parameters
ParameterDescription
idGroup ID.
nameGroup name.
descriptionDescription of group.
organization
KeyDescription
idID of the organization that this group belongs to.
Sample Response
Code Block
languagejs
{
	"id": "apiTestGroup",
	"name": "API Test Group",
	"description": "This group is updated via API.",
	"organization": {
    	"id": "ORG-001"
  	}
}