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 > Update a user

Update a user

Updates an existing user.

URL syntax

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

HTTP method

PUT

Request

URL path parameters (required)

userId (type: int )

Content-Type
application/xml
Request body

The user detailed information with any modification, expressed as XML text with root element user and the following XML schema. The value of the user ’s id attribute must match the userId in the URL path.

<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 updated user information, expressed as XML text with root element userGroup 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/10000
Java
User updatedUser = userServiceProxy.updateUser(10000, user)
Request body
<?xml version="1.0" encoding="UTF-8"?>
<user xmlns="http://www.cloudcruiser.com/webservices/v1/User" id="10000">
  <userName>test-user-1</userName>
  <password>pass</password>
  <fullUserName>test user 1</fullUserName>
  <userGroup name="testGroup-2" id="10600"/>
  <emailAddress>tu1@test.com</emailAddress>
  <enabled>true</enabled>
  <nativeCCUser>true</nativeCCUser>
  <role name="Post usage data" id="8">
    <description>Post usage data via REST service</description>
  </role>
  <role name="Report User" id="4">
    <description>Access only to running reports</description>
  </role>
</user>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user xmlns="http://www.cloudcruiser.com/webservices/v1/User" id="10000">
  <userName>test-user-1</userName>
  <fullUserName>test user 1</fullUserName>
  <userGroup name="testGroup-2" id="10600"/>
  <emailAddress>tu1@test.com</emailAddress>
  <enabled>true</enabled>
  <nativeCCUser>true</nativeCCUser>
  <role name="Post usage data" id="8">
    <description>Post usage data via REST service</description>
  </role>
  <role name="Report User" id="4">
    <description>Access only to running reports</description>
  </role>
</user>
Last modified

Tags

This page has no custom tags.

Classifications

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