Home > Cloud Cruiser 3 > REST API reference > Users and user groups > Create a user group

Create a user group

Creates a new user group based on the provided information.

URL syntax

http://<ccServerURL>/rest/v1/users/group

HTTP method

POST

Request

Content-Type
application/xml
Request body

The user group definition information. The userGroup ’s id attribute should be empty. XML text with root element userGroup and the following XML schema:

<xs:element name="userGroup" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/User">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="groupName" type="xs:string"/>
      <xs:element minOccurs="0" name="title" type="xs:string"/>
      <xs:element maxOccurs="unbounded" name="accountStructure" type="tns:AccountStructure"/>
      <xs:element default="true" name="allowAllAccounts" type="xs:boolean"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="allowedAccountId" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="user" type="tns:UserItem"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
</xs:element>
 
<xs:complexType name="UserItem">
  <xs:sequence/>
  <xs:attribute name="name" type="xs:string"/>
  <xs:attribute name="id" type="xs:int"/>
  <xs:attribute name="enabled" type="xs:boolean"/>
</xs:complexType>

Response

Content-Type
application/xml
Response body

The created user group information. XML text with root element userGroup and the same XML schema as the request body.

JAXB type
com.cloudcruiser.server.webservices.v1.dto.user.UserGroup

Example

URL
http://localhost:8080/rest/v1/users/group
Request body
<?xml version="1.0" encoding="UTF-8"?>
<userGroup xmlns="http://www.cloudcruiser.com/webservices/v1/User">
  <groupName>testGroup-1</groupName>
  <title>test group 1</title>
  <accountStructure name="Default" groupDefault="true"/>
  <accountStructure id="3" groupDefault="false"/>
  <allowAllAccounts>false</allowAllAccounts>
  <allowedAccountId>B-AA-MMMM</allowedAccountId>
  <allowedAccountId>B-AA-LLLL</allowedAccountId>
</userGroup>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userGroup xmlns="http://www.cloudcruiser.com/webservices/v1/User" id="10701">
  <groupName>testGroup-1</groupName>
  <title>test group 1</title>
  <accountStructure name="Default" groupDefault="true" id="0"/>
  <accountStructure name="Department View" groupDefault="false" id="3"/>
  <allowAllAccounts>false</allowAllAccounts>
  <allowedAccountId>B-AA-LLLL</allowedAccountId>
  <allowedAccountId>B-AA-MMMM</allowedAccountId>
</userGroup>
Java
UserGroup newUserGroup = userServiceProxy.createUserGroup(userGroup);
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP