Rest API methods to manage groups, including creating, updating, listing, deleting groups.
A POST
method to create a new user group.
POST /api/v1/groups/
{
"name" : <string>,
"description" : <string_may_be_null>,
}
{
"groupId" : <integer>,
"pid" : <integer>,
"name" : <string>,
"description" : <string_may_be_null>,
"membershipCount" : <integer>,
"wildcards" : <list of strings>,
"users" : <list of user IDs>
}
A PUT
method to update a user group.
PUT /api/v1/groups/
<groupId>
{
"name" : <string>,
"description" : <string_may_be_null>,
}
{
"groupId" : <integer>,
"pid" : <integer>,
"name" : <string>,
"description" : <string_may_be_null>,
"membershipCount" : <integer>,
"wildcards" : <list of strings>,
"users" : <list of user IDs>
}
A GET
method to list user groups.
GET /api/v1/groups/
[
{
"groupId" : <integer>,
"pid" : <integer>,
"name" : <string>,
"description" : <string_may_be_null>,
"membershipCount" : <integer>,
"wildcards" : <list of strings>,
"users" : <list of user IDs>
}, ...
]
A DELETE
method to delete a user group and remove all members from that group.
DELETE /api/v1/groups/
<groupId>
Returns 204 No Content
if successful. In case of conflict returns 409 Conflict
.
A DELETE
method to delete multiple groups in bulk and remove all members from that group.
DELETE /api/v1/groups/bulk-delete
Returns 204 No Content
if successful. In case of conflict returns 409 Conflict
.
A GET
method to list the permission objects on a group.
GET /api/v1/groups/{groupId}/permissions
[{
"objectId" : 34,
"objectType": "SEGMENT",
"permissions": ["READ", "WRITE", "DELETE", "MAP_TO_MODELS"]
},
{
"objectId" : "234",
"objectType": "TRAIT",
"permissions": ["READ", "WRITE", "DELETE", "MAP_TO_MODELS"]
},
{
"objectId" : 277,
"objectType": "SEGMENT",
"permissions": ["READ", "WRITE", "MAP_TO_MODELS"]
}
]
Returns 400 Bad Request
if the group is inaccessible.
A PUT
method to update group permissions. This method overwrites the old permissions with the new permissions.
PUT /api/v1/groups/{groupId}/permissions/
[
{ "objectType" : "SEGMENT",
"objectId" : 563,
"permissions" : [ "READ", "WRITE"]
},
{ "objectType" : "SEGMENT",
"objectId" : 2363,
"permissions" : [ "CREATE", "WRITE"]
},
{ "objectType" : "TRAIT",
"objectId" : 83498,
"permissions" : [ "READ", "MAP_TO_SEGMENTS"]
},
{ "objectType" : "DESTINATION",
"objectId" : 304,
"permissions" : [ "READ", "WRITE", "CREATE"]
}
]
The sample response represents the updated list of permission objects.
Returns 200 OK
if successful. Returns 400
if any given permission is invalid. Can also return 403
if the object is not accessible by the logged-in user.