List Servers

Description

Use this request to obtain the list of servers owned by the current user.

Syntax

For a provider's staff member:

GET baseURL/cloud/ve

For a customer's user:

GET baseURL/ve

If you have Cloud Infrastructure Automation with the deployed Federation service, refer to the Example 3 below.

Options

You can append an optional subscription ID to the request URL to list only the servers that belong to a specific subscription. The option is appended in the form "?subscription=id" where id is a numeric subscription ID (see the examples below).

Request Parameters

None

Response

Element

Attribute

Description

ve-list

 

Container for the server list.

ve-info

 

Container for individual server information. This element may appear more than once (one for each server).

 

description

Server description.

Type: string.

 

state

String describing the server state (for example, CREATED, STOPPED, etc).

Type: string.

 

name

Server name.

Type: string.

 

subscription-id

ID of the subscription to which this server belongs. If the subscription ID is specified in the request URL, this parameter is omitted.

Type: int.

Example 1

The following example lists all servers owned by the customer's user, regardless of subscription.

Request

GET http://c2u-web:4465/paci/v1.0/ve

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ve-list>
    <ve-info subscription-id="1000001" name="web1" state="CREATED" description="Web server 1"/>
    <ve-info subscription-id="1000002" name="web2" state="CREATED" description="Web server 2"/>
</ve-list>

Example 2

The following example lists only the servers for subscription 1000001.

Request

GET http://c2u-web:4465/paci/v1.0/ve?subscription=1000001

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ve-list>
    <ve-info name="web1" state="CREATED" description="Web server 1"/>
</ve-list>

Example 3

This example shows a sample request when the Federation service is deployed additionally with Cloud Infrastructure Automation.

Request

curl -u '<login>:<password>' -H "x-paci-subscription-id:<subscription_id>" http://<hostname_of_Federation_service>:8880/im-api-proxy/paci/v1.0/ve

Where <login>:<password> is the generated API credentials.

<subscription_id> is the customer's subscription ID.

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ve-list>
<ve-info description="science" state="STARTED" name="science" subscription-id="1000010" id="19" hostname="science"/>
<ve-info description="" state="STARTED" name="cs-source-1" subscription-id="101000017" id="31" hostname="cs-source-1"/>
<ve-info description="" state="STARTED" name="cs-source-2" subscription-id="101000017" id="32" hostname="cs-source-2"/>
<ve-info description="Clone of [cs-source-1]" state="STARTED" name="server-1000017-1" subscription-id="101000017" id="33" hostname="cs-source-3"/>
</ve-list>