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 > Activate, deactivate, delete, or move users and groups

Activate, deactivate, delete, or move users and groups

This method executes the specified update action to the specified users and the specified user groups. The action can be one of ACTIVATE , DEACTIVATE , DELETE , or MOVE . The MOVE action moves users from one group to another.

URL syntax

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

HTTP method

POST

Request

Content-Type
application/xml
Request body

The XML input to specify which update action to apply, the users and userGroups to apply the update. XML root element is updateInput and the following XML schema:

<xs:element name="updateInput" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/User">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="action" type="tns:UpdateAction"/>
      <xs:element minOccurs="0" name="targetGroup" type="tns:UserGroupItem"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="user" type="tns:UserItem"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="userGroup" type="tns:UserGroupItem"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
 
<xs:simpleType name="UpdateAction">
  <xs:restriction base="xs:string">
    <xs:enumeration value="ACTIVATE"/>
    <xs:enumeration value="DEACTIVATE"/>
    <xs:enumeration value="DELETE"/>
    <xs:enumeration value="MOVE"/>
  </xs:restriction>
</xs:simpleType>

Response

Content-Type
application/xml
Response body

The update result, with the information of the updated users and the user groups (the update applied to all the users in the user groups). Expressed as XML text with root element updateResult and the following XML schema:

<xs:element name="updateResult" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/User">
  <xs:complexType>
    <xs:sequence>
      <xs:element minOccurs="0" name="updatedUsers">
        <xs:simpleType>
          <xs:list itemType="xs:string"/>
        </xs:simpleType>
      </xs:element>
      <xs:element minOccurs="0" name="updatedUserGroups">
        <xs:simpleType>
          <xs:list itemType="xs:string"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
JAXB type
com.cloudcruiser.server.webservices.v1.dto.user.UpdateResult

Example

URL
http://localhost:8080/rest/v1/users/update
Request body
<?xml version="1.0" encoding="UTF-8"?>
<updateInput xmlns="http://www.cloudcruiser.com/webservices/v1/User">
  <action>MOVE</action>
  <targetGroup name="testGroup-3"/>
  <user name="t-user-2"/>
  <userGroup name="testGroup-2"/>
</updateInput>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<updateResult xmlns="http://www.cloudcruiser.com/webservices/v1/User">
  <updatedUsers>t-user-2</updatedUsers>
  <updatedUserGroups>testGroup-2</updatedUserGroups>
</updateResult>
Java
UpdateResult result = userServiceProxy.update(updateInput);
Last modified

Tags

This page has no custom tags.

Classifications

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