TIBCO Data Virtualization® > Business Directory REST API > Business Directory REST APIs > Groups
 
Groups
The operations that can be performed on the groups defined in the Business Directory are:
GET /groups
GET /groups/{groupParam}
PUT /groups/{groupParam}
POST /groups/{groupParam}/roles
DELETE /groups/{groupParam}/roles
DELETE /groups/{groupParam}/roles/{role}
GET /groups
This API is used to retrieve groups defined in Business Directory. Filter by group, domain or roles.
Parameters
Name
Description
Parameter Type
Data Type
groups
 
query
Array(string)
domain
 
query
string
rolefilter
Optional. Filter groups by the specified roles.
query
Array(string)
Example to retrieve groups from ldap domain 'my_bd_ldap_domain'
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?domain=my_bd_ldap_domain"
Example to retrieve groups from ldap domain 'my_bd_ldap_domain' as ldap user with BD_ADMIN rights
curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups?domain=ldapDomain"
Example to retrieve groups 'xyz' and 'abcd'
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?groups=xyz&groups=abcd"
Example to retrieve groups that have roles BD_ADMIN and MANAGE_CATEGORY
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?roleFilter=BD_ADMIN&roleFilter=MANAGE_CATEGORY"
Example to retrieve count of all groups from ldap domain 'my_bd_ldap_domain'
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?domain=my_bd_ldap_domain&count"
Example to retrieve count of all groups that have roles BD_ADMIN and MANAGE_CATEGORY
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?roleFilter=BD_ADMIN&roleFilter=MANAGE_CATEGORY&count"
GET /groups/{groupParam}
This API is used to retrieve a group defined in Business Directory.
Parameters
Name
Description
Parameter Type
Data Type
groupParam
group in group@domain format.
path
string
Example to retrieve groups from ldap domain 'my_bd_ldap_domain'
curl -X GET -u admin:admin "https://localhost:9502/rest/v2/groups?domain=my_bd_ldap_domain"
Example to retrieve groups from ldap domain 'my_bd_ldap_domain' as ldap user with BD_ADMIN rights
curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups/myGroup@ldapDomain"
PUT /groups/{groupParam}
This API is used to add or remove roles from groups. The roles include READ_ALL_RESOURCES, APPLY_COMMENT, MODERATE_COMMENT, MANAGE_CATEGORY, APPLY_CATEGORY, APPLY_CUSTOM_PROPERTIES, MANAGE_CUSTOM_PROPERTIES, BD_ADMIN, and ACCESS_DIRECTORY.Additionally, you can modify group annotations
Parameters
Name
Description
Parameter Type
Data Type
groupParam
group in group@domain format.
path
string
Request Body
{
"groupName": "string",
"domain": "string",
"annotation": "string",
"roles": [
"string"
]
}
Example to set BD_ADMIN and MODERATE_COMMENT as only roles for group 'g2' in 'ad2003' domain; set annotation
curl -X PUT -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003" -H "Content-Type:application/json" -d "{ \"annotation\" : \"new annotation\", \"roles\" : [ \"BD_ADMIN\", \"MODERATE_COMMENT\" ]}"
Example to set BD_ADMIN and MODERATE_COMMENT as only roles for group 'g2' in 'ad2003' domain; set annotation as ldap user with BD_ADMIN rights
curl -X PUT -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups/g2@ad2003" -H "Content-Type:application/json" -d "{ \"annotation\" : \"new annotation\", \"roles\" : [ \"BD_ADMIN\", \"MODERATE_COMMENT\" ]}"
Example to set BD_ADMIN and MODERATE_COMMENT as only roles for group 'g2' in 'ad2003' domain; set annotation awith X-HTTP-Method-Override
curl -X POST -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003" -H "X-HTTP-Method-Override:PUT" -H "Content-Type:application/json" -d "{ \"annotation\" : \"new annotation\", \"roles\" : [ \"BD_ADMIN\", \"MODERATE_COMMENT\" ]}"
POST /groups/{groupParam}/roles
This API is used to add roles to a group. The roles include READ_ALL_RESOURCES, APPLY_COMMENT, MODERATE_COMMENT, MANAGE_CATEGORY, APPLY_CATEGORY, APPLY_CUSTOM_PROPERTIES, MANAGE_CUSTOM_PROPERTIES, BD_ADMIN, and ACCESS_DIRECTORY.
Parameters
Name
Description
Parameter Type
Data Type
groupParam
group in group@domain format.
path
string
Request Body
[
"string"
]
Example to add BD_ADMIN and MODERATE_COMMENT to group 'g2'
curl -X POST -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003/roles" -H "Content-Type:application/json" -d "[ \"BD_ADMIN\", \"MODERATE_COMMENT\" ]"
Example to add BD_ADMIN and MODERATE_COMMENT to group 'g2' as ldap user with BD_ADMIN rights
curl -X POST -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups/g2@ad2003/roles" -H "Content-Type:application/json" -d "[ \"BD_ADMIN\", \"MODERATE_COMMENT\" ]"
DELETE /groups/{groupParam}/roles
This API is used to remove all roles from a group.
Parameters
Name
Description
Parameter Type
Data Type
groupParam
group in group@domain format.
path
string
Example to remove MODERATE_COMMENT from group 'g2'
curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003/roles"
Example to remove MODERATE_COMMENT from group 'g2' as ldap user with BD_ADMIN rights
curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups/g2@ad2003/roles"
Example to remove MODERATE_COMMENT from group 'g2' with X-HTTP-Method-Override:DELETE
curl -X POST -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003/roles" -H "X-HTTP-Method-Override:DELETE"
DELETE /groups/{groupParam}/roles/{role}
This API is used to remove role from a group. The roles include READ_ALL_RESOURCES, APPLY_COMMENT, MODERATE_COMMENT, MANAGE_CATEGORY, APPLY_CATEGORY, APPLY_CUSTOM_PROPERTIES, MANAGE_CUSTOM_PROPERTIES, BD_ADMIN, and ACCESS_DIRECTORY.
Parameters
Name
Description
Parameter Type
Data Type
groupParam
group in group@domain format.
path
string
role
role
path
string
Example to remove MODERATE_COMMENT from group 'g2'
curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003/roles/MODERATE_COMMENT"
Example to remove MODERATE_COMMENT from group 'g2' as ldap user with BD_ADMIN rights
curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/groups/g2@ad2003/roles/MODERATE_COMMENT"
Example to remove MODERATE_COMMENT from group 'g2' (X-HTTP-Method-Override)
curl -X POST -u admin:admin "https://localhost:9502/rest/v2/groups/g2@ad2003/roles/MODERATE_COMMENT" -H "X-HTTP-Method-Override:DELETE"