Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 4 > 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.

Resource URL

In version 4.0: POST http://<ccServerURL>/rest/v2/users/groups

In version 4.1 and later: POST http://<ccServerURL>/rest/v2/ccusers/groups

Request

Parameters

None

Content-Type

application/xml

Body

The user group to create, as XML text with root element userGroup or JAXB type com.cloudcruiser.server.webservices.v2.dto.User.userGroup. The group's id attribute must be empty, and you cannot include any user elements. You can create users in the group after creating the group.

Schema

Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, this XML schema describes user and user group objects.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.cloudcruiser.com/webservices/v2/User" attributeFormDefault="unqualified" elementFormDefault="qualified"targetNamespace="http://www.cloudcruiser.com/webservices/v2/User">
  <xs:import/>
  <xs:element name="user" type="tns:User"/>
  <xs:element name="userGroup" type="tns:UserGroup"/>
  <xs:element name="userGroupList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:userGroup"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="userList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:user"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="userSummaryList" type="tns:UserSummaryList"/>
  <xs:complexType name="User">
    <xs:sequence>
      <xs:element name="userName" type="xs:string"/>
      <xs:element minOccurs="0" name="password" type="xs:string"/>
      <xs:element default="true" name="active" type="xs:boolean"/>
      <xs:element name="userGroup">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="fullName" type="xs:string"/>
      <xs:element minOccurs="0" name="domainName" type="xs:string"/>
      <xs:element minOccurs="0" name="emailAddress" type="xs:string"/>
      <xs:element default="true" name="nativeCCUser" type="xs:boolean"/>
      <xs:element name="roles">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="role" type="tns:Role"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="userflag1" type="xs:string"/>
      <xs:element minOccurs="0" name="userflag2" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="Role">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="type" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="UserGroup">
    <xs:sequence>
      <xs:element name="groupName" type="xs:string"/>
      <xs:element minOccurs="0" name="title" type="xs:string"/>
      <xs:element maxOccurs="unbounded" name="accountView" type="tns:AccountView"/>
      <xs:element default="true" name="allAccounts" type="xs:boolean"/>
      <xs:element minOccurs="0" name="allowedAccounts">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="accountid" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="users">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="user" type="tns:UserSummary"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="AccountView">
    <xs:sequence/>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="groupDefault" type="xs:boolean"/>
  </xs:complexType>
  <xs:complexType name="UserSummary">
    <xs:sequence/>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="id" type="xs:int"/>
    <xs:attribute name="active" type="xs:boolean"/>
  </xs:complexType>
  <xs:complexType name="UserSummaryList">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="userGroup" type="tns:UserGroupSummary"/>
    </xs:sequence>
    <xs:attribute name="totalGroups" type="xs:int"/>
    <xs:attribute name="retrievedGroups" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="UserGroupSummary">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="user" type="tns:UserSummary"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
    <xs:attribute name="totalUsers" type="xs:int"/>
  </xs:complexType>
</xs:schema>

Response

Content-Type

application/xml

Body

The new user group, as XML text with the root element userGroup or JAXB type com.cloudcruiser.server.webservices.v2.dto.User.userGroup.

Schema

Same as for the request, above.

Example

URL invocation

POST http://localhost:8080/rest/v2/ccusers/groups​​

Request body
<?xml version="1.0" encoding="UTF-8"?>
<userGroup xmlns="http://www.cloudcruiser.com/webservices/v2/User">
    <groupName>finance</groupName>
    <title>Corporate Finance</title>
    <accountView name="Default" groupDefault="true"/>
    <allAccounts>false</allAccounts>
    <allowAllAccounts>true</allowAllAccounts>
</userGroup>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userGroup xmlns="http://www.cloudcruiser.com/webservices/v2/User" id="10001">
    <groupName>finance</groupName>
    <title>Corporate Finance</title>
    <accountView name="Default" groupDefault="true"/>
    <allAccounts>false</allAccounts>
</userGroup>
Last modified

Tags

Classifications

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