- 1. 简介
- 2. 开始
- 3. 配置
- 4. Flowable API
- 5. 集成 Spring
- 6. 部署
- 7. BPMN 2.0 介绍
- 8. BPMN 2.0 结构
- 9. 表单
- 10. JPA
- 11. 历史
- 12. 身份管理
- 13. Eclipse Designer
- 14. Flowable UI 应用
- 15. REST API
- 16. 集成 CDI
- 17. 集成 LDAP
- 18. 高级
- 19. 工具
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
15.15. Groups
15.15.1. Get a single group
GET identity/groups/{groupId}
Parameter | Required | Value | Description |
---|---|---|---|
groupId | Yes | String | The id of the group to get. |
Success response body:
{
"id":"testgroup",
"url":"http://localhost:8182/identity/groups/testgroup",
"name":"Test group",
"type":"Test type"
}
Response code | Description |
---|---|
200 | Indicates the group exists and is returned. |
404 | Indicates the requested group does not exist. |
15.15.2. Get a list of groups
GET identity/groups
Parameter | Description | Type |
---|---|---|
id | Only return group with the given id | String |
name | Only return groups with the given name | String |
type | Only return groups with the given type | String |
nameLike | Only return groups with a name like the given value. Use % as wildcard-character. | String |
member | Only return groups which have a member with the given username. | String |
potentialStarter | Only return groups which members are potential starters for a process-definition with the given id. | String |
sort | Field to sort results on, should be one of id , name or type . | String |
Success response body:
{
"data":[
{
"id":"testgroup",
"url":"http://localhost:8182/identity/groups/testgroup",
"name":"Test group",
"type":"Test type"
}
],
"total":3,
"start":0,
"sort":"id",
"order":"asc",
"size":3
}
Response code | Description |
---|---|
200 | Indicates the requested groups were returned. |
15.15.3. Update a group
PUT identity/groups/{groupId}
Body JSON:
{
"name":"Test group",
"type":"Test type"
}
All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only updating the name of the group, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the group-value will be updated to null.
Response code | Description |
---|---|
200 | Indicates the group was updated. |
404 | Indicates the requested group was not found. |
409 | Indicates the requested group was updated simultaneously. |
Success response body: see response for identity/groups/{groupId}
.
15.15.4. Create a group
POST identity/groups
Body JSON:
{
"id":"testgroup",
"name":"Test group",
"type":"Test type"
}
Response code | Description |
---|---|
201 | Indicates the group was created. |
400 | Indicates the id of the group was missing. |
Success response body: see response for identity/groups/{groupId}
.
15.15.5. Delete a group
DELETE identity/groups/{groupId}
Parameter | Required | Value | Description |
---|---|---|---|
groupId | Yes | String | The id of the group to delete. |
Response code | Description |
---|---|
204 | Indicates the group was found and has been deleted. Response-body is intentionally empty. |
404 | Indicates the requested group was not found. |
15.15.6. Get members in a group
There is no GET allowed on identity/groups/members
. Use the identity/users?memberOfGroup=sales
URL to get all users that are part of a particular group.
15.15.7. Add a member to a group
POST identity/groups/{groupId}/members
Parameter | Required | Value | Description |
---|---|---|---|
groupId | Yes | String | The id of the group to add a member to. |
Body JSON:
{
"userId":"kermit"
}
Response code | Description |
---|---|
201 | Indicates the group was found and the member has been added. |
404 | Indicates the userId was not included in the request body. |
404 | Indicates the requested group was not found. |
409 | Indicates the requested user is already a member of the group. |
Response Body:
{
"userId":"kermit",
"groupId":"sales",
"url":"http://localhost:8182/identity/groups/sales/members/kermit"
}
15.15.8. Delete a member from a group
DELETE identity/groups/{groupId}/members/{userId}
Parameter | Required | Value | Description |
---|---|---|---|
groupId | Yes | String | The id of the group to remove a member from. |
userId | Yes | String | The id of the user to remove. |
Response code | Description |
---|---|
204 | Indicates the group was found and the member has been deleted. The response body is left empty intentionally. |
404 | Indicates the requested group was not found or that the user is not a member of the group. The status description contains additional information about the error. |
Response Body:
{
"userId":"kermit",
"groupId":"sales",
"url":"http://localhost:8182/identity/groups/sales/members/kermit"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论