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 > Customers > Update a customer

Update a customer

Updates an existing customer.

URL syntax

http://<ccServerURL
>/rest/v1/customers/customer/<id
>

HTTP method

PUT

Request

URL path parameters (required)

id (type: int )

Content-Type
application/xml
Request body

The customer detailed information with any modification. The customer’s id attribute value is required to be the same as that in the URL Path. XML text with root element customer and the following XML schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/Customer" targetNamespace="http://www.cloudcruiser.com/webservices/v1/Customer">
<xs:element name="customer" type="tns:Customer"/>
<xs:complexType name="Customer">
  <xs:sequence>
    <!-- Required element -->
    <xs:element name="accountId" type="xs:string"/>
    <!-- Required element -->
    <xs:element name="active" type="xs:boolean"/>
    <!-- Required element -->
    <xs:element name="accountLevel">
      <xs:complexType>
        <xs:sequence/>
        <xs:attribute name="description" type="xs:string" use="required"/>
        <xs:attribute name="level" type="xs:short"/>
      </xs:complexType>
    </xs:element>
    <!-- Required element, ratePlan name is required. -->
    <xs:element name="ratePlan">
      <xs:complexType>
        <xs:sequence/>
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="id" type="xs:int"/>
      </xs:complexType>
    </xs:element>
    <!-- Optional element. The default is 1 -->
    <xs:element minOccurs="0" name="accountingDay" type="xs:short"/>
    <!-- Optional element. The default is 1 -->
    <xs:element minOccurs="0" name="fiscalStartMonth" type="xs:short"/>
    <!-- Optional element. -->
    <xs:element minOccurs="0" name="altAccountId" type="xs:string"/>
    <!-- Optional element. -->
    <xs:element minOccurs="0" name="description" type="xs:string"/>
    <!-- All five flags are Optional chars. -->
    <xs:element minOccurs="0" name="flag1" type="xs:string"/>
    <xs:element minOccurs="0" name="flag2" type="xs:string"/>
    <xs:element minOccurs="0" name="flag3" type="xs:string"/>
    <xs:element minOccurs="0" name="flag4" type="xs:string"/>
    <xs:element minOccurs="0" name="flag5" type="xs:string"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:int"/>
</xs:complexType>
</xs:schema>
JAXB type
com.cloudcruiser.server.webservices.v1.dto.customer.Customer

Response

The updated information for the customer. XML text with root element customer and the same XML schema as the request body.

Example

URL
http://localhost:8080/rest/v1/customers/customer/10400
Request body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customer xmlns="http://www.cloudcruiser.com/webservices/v1/Customer" id="10400">
  <accountId>B-AA-KKKK-11-vm101</accountId>
  <active>true</active>
  <accountLevel description="VM Name" level="5"/>
  <ratePlan name="default" id="1"/>
  <accountingDay>5</accountingDay>
  <fiscalStartMonth>2</fiscalStartMonth>
  <description>VM Host B-AA-KKKK-11-vm101</description>
</customer>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customer xmlns="http://www.cloudcruiser.com/webservices/v1/Customer" id="10400">
  <accountId>B-AA-KKKK-11-vm101</accountId>
  <active>true</active>
  <accountLevel description="VM Name" level="5"/>
  <ratePlan name="default" id="1"/>
  <accountingDay>5</accountingDay>
  <fiscalStartMonth>2</fiscalStartMonth>
  <description>VM Host B-AA-KKKK-11-vm101</description>
</customer>
Java
Customer customer = customerServiceProxy.updateCustomer(10400);
Last modified

Tags

This page has no custom tags.

Classifications

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