Summary:
List general information about user groups.
URL:
http(s)://{server hostname}/api/userGroups
Methods summary
- GET Method - lists available user groups.
- POST Method - creates a new user group.
GET Method detail
Lists available user groups. For non-administrators, the list is restricted to the groups to which the user currently belongs.
Response:
Name | Description |
---|---|
id |
user group id unique to the server. |
name |
user group name. |
serverId |
Entuity server Id on which resource resides. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/userGroups?media=json
OUTPUT
{
"items": [
{
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a",
"id": "1",
"name": "Administrators"
},
{
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b21eb30a",
"id": "2",
"name": "All Users"
}
],
"count": 2
}
INPUT
curl -u admin:admin https://localhost/api/userGroups?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="2">
<item xsi:type="namedItem" name="Administrators" id="1" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
<item xsi:type="namedItem" name="All Users" id="2" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
</items>
POST Method detail
Creates a new group of users.
Request:
Name | Description |
---|---|
name |
name of the group. |
Response:
The updated list of user groups, as the 'GET Method - Response' above would return them.
Examples:
INPUT
curl -u admin:admin https://localhost/api/userGroups?media=json -X POST -H "content-type:application/xml" -d \
'{
"name" : "Support"
}'
OUTPUT
{
"items": [
{
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a",
"id": "1",
"name": "Administrators"
},
{
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a",
"id": "2",
"name": "All Users"
},
{
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a",
"id": "6",
"name": "Support"
}
],
"count": 3
}
INPUT
curl -u admin:admin https://localhost/api/userGroups?media=xml -X POST -H "content-type:application/xml" -d \
'<userGroupInfo audit="false">
<name>Support</name>
</userGroupInfo>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="3">
<item xsi:type="namedItem" name="Administrators" id="1" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
<item xsi:type="namedItem" name="All Users" id="2" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
<item xsi:type="namedItem" name="Support" id="6" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
</items>
Comments
0 comments
Please sign in to leave a comment.