Home > Cloud Cruiser 3 > REST API reference > Customers > Create a customer

Create a customer

Creates a new customer based on the provided information.

URL syntax

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

HTTP method

POST

Request

Content-Type
application/xml
Request body

The customer definition information. The customer’s id attribute should be empty. 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, element 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

Content-Type
application/xml
Response body

The created customer’s detailed information. XML text with root element customer and the same XML schema as the request body.

JAXB type
com.cloudcruiser.server.webservices.v1.dto.customer.Customer

Example

URL
http://localhost:8080/rest/v1/customers/customer
Request body
<?xml version="1.0" encoding="UTF-8"?>
<customer xmlns="http://www.cloudcruiser.com/webservices/v1/Customer">
  <accountId>B-AA-KKKK-11-vm100</accountId>
  <active>true</active>
  <accountLevel description="VM Name" level="5"/>
  <ratePlan name="default" id="1"/>
  <accountingDay>1</accountingDay>
  <fiscalStartMonth>1</fiscalStartMonth>
  <description>VM Host B-AA-KKKK-11-vm100</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-vm100</accountId>
  <active>true</active>
  <accountLevel description="VM Name" level="5"/>
  <ratePlan name="default" id="1"/>
  <accountingDay>1</accountingDay>
  <fiscalStartMonth>1</fiscalStartMonth>
  <description>VM Host B-AA-KKKK-11-vm100</description>
</customer>
Last modified

Tags

This page has no custom tags.

Classifications

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