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 3 > REST API reference > Users and user groups > Create a user

Create a user

Creates a new user based on the provided user information.

URL syntax

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

HTTP method

POST

Request

Content-Type
application/xml
Request body

The user definition information. The user’s id attribute should be empty. If the password element is empty, the user receives the default password for new users set in Administration > Configuration > General > System. XML text with root element user and the following XML schema:

<xs:element name="user" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/User">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="userName" type="xs:string"/>
      <xs:element minOccurs="0" name="password" type="xs:string"/>
      <xs:element minOccurs="0" name="fullUserName" type="xs:string"/>
      <xs:element minOccurs="0" name="domainUsername" type="xs:string"/>
      <xs:element name="userGroup" type="tns:UserGroupItem"/>
      <xs:element minOccurs="0" name="emailAddress" type="xs:string"/>
      <xs:element default="true" name="enabled" type="xs:boolean"/>
      <xs:element default="true" name="nativeCCUser" type="xs:boolean"/>
      <xs:element maxOccurs="unbounded" name="role" type="tns:Role"/>
      <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:element>
 
<xs:complexType name="UserGroupItem">
  <xs:sequence/>
  <xs:attribute name="name" type="xs:string"/>
  <xs:attribute name="id" type="xs:int"/>
</xs:complexType>

Response

Content-Type
application/xml
Response body

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

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

Example

URL
http://localhost:8080/rest/v1/users/user
Request body
<?xml version="1.0" encoding="UTF-8"?>
<user xmlns="http://www.cloudcruiser.com/webservices/v1/User">
  <userName>t-admin-2</userName>
  <fullUserName>test admin 2</fullUserName>
  <domainUsername>bigorg</domainUsername>
  <userGroup name="testGroup-3"/>
  <emailAddress>t-admin-2@bigorg.com</emailAddress>
  <enabled>true</enabled>
  <nativeCCUser>true</nativeCCUser>
  <role name="Admin"/>
  <role name="Customer Budget"/>
  <role name="Report User"/>
</user>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user xmlns="http://www.cloudcruiser.com/webservices/v1/User" id="10501">
  <userName>t-admin-2</userName>
  <fullUserName>test admin 2</fullUserName>
  <domainUsername>bigorg</domainUsername>
  <userGroup name="testGroup-3" id="10700"/>
  <emailAddress>t-admin-2@bigorg.com</emailAddress>
  <enabled>true</enabled>
  <nativeCCUser>true</nativeCCUser>
  <role name="Admin" id="3">
    <description>Full access to all application functions</description>
  </role>
  <role name="Customer Budget" id="6">
    <description>Access to customer budgets</description>
  </role>
  <role name="Report User" id="4">
    <description>Access only to running reports</description>
  </role>
</user>
Java
User newUser = userServiceProxy.createUser(user);
Last modified

Tags

This page has no custom tags.

Classifications

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