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

Activate, deactivate, delete, or move users and groups

This method was deprecated in HPE Consumption Analytics Portal version 4.1. For information about updating users and groups in version 4.1 and later, see Update a user and Update a user group.

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

Resource URL

POST http://<ccServerURL>/rest/v2/users/update

Request

Parameters

None

Content-Type

application/xml

Body

The action to take, users and groups on which to act, and target group for moved users, as XML text with root element updateInput or JAXB type com.cloudcruiser.server.webservices.v2.dto.User.updateInput.

When the action is anything other than DELETE, any userGroup elements are ignored.

Schema

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:element name="updateInput">
    <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:element name="updateResult">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="updatedUsers">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="userName" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" name="updatedUserGroups">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="groupName" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="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:element name="userGroup">
    <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:element name="users">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" name="userGroup">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" minOccurs="0" name="user" type="tns:UserItem"/>
            </xs:sequence>
            <xs:attribute name="name" type="xs:string"/>
            <xs:attribute name="id" type="xs:int"/>
            <xs:attribute name="totalUsers" type="xs:int"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="totalGroups" type="xs:int"/>
      <xs:attribute name="retrievedGroups" type="xs:int"/>
      <xs:attribute name="startFrom" 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>
  <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>
  <xs:complexType name="Role">
    <xs:sequence>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="AccountStructure">
    <xs:sequence/>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="groupDefault" type="xs:boolean"/>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <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>
</xs:schema>

Response

Content-Type

application/xml

Body

The result of the update, as XML text with root element updateResult or JAXB type com.cloudcruiser.server.webservices.v2.dto.User.updateResult.

Schema

Same as for the request, above.

Example

URL invocation

POST http://localhost:8080/rest/v2/users​​/update

Java invocation
Request body
<updateInput
    xmlns="http://www.cloudcruiser.com/webservices/v2/User">
    <action>MOVE</action>
    <targetGroup name="tAdmin" id="10004"/>
    <user name="devmgr" id="10003"/>
    <user name="storagemgr" id="10005"/>
    <user name="testmgr" id="10100"/>
</updateInput>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<updateResult 
    xmlns="http://www.cloudcruiser.com/webservices/v2/User">
    <updatedUsers>
        <userName>storagemgr</userName>
        <userName>devmgr</userName>
        <userName>testmgr</userName>
    </updatedUsers>
</updateResult>
Last modified

Tags

Classifications

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