5. group – Group

Group functionality.

5.1. Resources

5.1.1. Group

class group.Group

This resource represents a method in which to create a new group.

Resource URI:

/rest/hosting/group/
PUT(groupname, displayname)

Create a new group by submitting an HTTP PUT request.

Note

This resource requires create permission on the elastic_hosting extension module.

Parameters:
  • groupname – New group name.
  • displayname – New group display name.
Return type:

group.RepGroup

5.1.2. GroupUUID

class group.GroupUUID

This resource represens a specific group.

Resource URI:

/rest/hosting/group/<UUID>/
GET()

Retrieve the specified group by submitting an HTTP GET request. The UUID in the resource URI should be the UUID of the target group.

Note

This resource requires read permission on both the group and the elastic_hosting extension module when using the HTTP GET method.

Return type:group.RepGroupUUID
POST(groupname, displayname)

Update the specified group by submitting an HTTP POST request. The UUID in the resource URI should be the UUID of the target group.

Note

This resource requires update permission on both the group and the elastic_hosting extension module when using the HTTP POST method.

Parameters:
  • groupname – The groupname to update the group with.
  • displayname – The display name to update the group with.
Return type:

group.RepGroupUUID

5.1.3. GroupList

class group.GroupList

This resource represents a list of groups.

Resource URI:

/rest/hosting/group/list/
GET()

Retrieve a list of groups by submitting an HTTP GET request.

Note

This resource requires read permission on the elastic_hosting extension module and on each group that is found.

Return type:group.RepGroupList

5.2. Representations

5.2.1. RepGroup

class group.RepGroup

This is a representation of a group resource.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
group
This attribute represents the newly created group object and is a group.RepGroupUUID representation.

Representation:

{"errno":response.errno,
 "message":response.message,
 "group": group_obj}

5.2.2. RepGroupUUID

class group.RepGroupUUID

This is a representation of a group resource.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
group.uuid
This attribute represents the UUID of the group.
group.group_name
This attribute represents the groupname of the group.
group.display_name
This attribute represents the display name of the group.

Representation:

{"errno": response.errno,
 "message": response.message,
 "user": {"uuid": group.uuid,
          "group_name": group.group_name,
          "display_name": group.display_name}}

5.2.3. RepGroupList

class group.RepGroupList

This is a representation of a list of groups. This is a list of user.RepGroupUUID representations.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
groups
This attribute represents the list of group representations.

Representation

{"errno": response.errno,
 "message": response.message,
 "groups": [group1, group2]}