You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Definition

Group API can interact with Group and its users.


NameDescription
1

Add group

Add a new group.

Name

Description
URL/group
HTTP MethodPOST
Body Parameters
ParameterDescription
idGroup ID.
nameGroup name.
descriptionDescription of group.
Sample Response
{
  "id": "apiTestGroup",
  "name": "API Test Group",
  "description": "This is a group created by API.",
  "organization": {
    "id": "ORG-001"
  }
}
2

Assign user to group

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
{
  "username": "cat",
  "groups": [
    {
		"id": "G-004",
		"name": "API Test Group",
		"description": "This is API generated group.",
		"organizationId": "ORG-001"
	}
  ]
}
3

Delete group

Delete a group via group ID.

Name

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

Find group

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
[
  {
    "id": "G-001",
    "name": "Managers",
    "description": "",
	"organization": {
    	"id": "ORG-001"
  	}
  },
  {
    "id": "G-002",
    "name": "CxO",
    "description": "",
	"organization": null
  },
	.....
]
5

Find group by username

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
[
  {
    "id": "G-001",
    "name": "Managers",
    "description": "",
	"organization": {
    	"id": "ORG-001"
  	}
  }
]
6

Get group by ID

Get details of a group via group ID.

Name

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

Unassign user from group

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
{
  "date": "Thu Dec 05 03:29:56 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
8

Update group

Update the details of a group.

Name

Description
URL/group
HTTP MethodPUT
Body Parameters
ParameterDescription
idGroup ID.
nameGroup name.
descriptionDescription of group.
Sample Response
{
	"id": "apiTestGroup",
	"name": "API Test Group",
	"description": "This group is updated via API.",
	"organization": {
    	"id": "ORG-001"
  	}
}




  • No labels