API Documentation 3.1

The Claranet Cloud API allows developers to create, modify and delete virtual appliance components (virtual machines, storage and networking elements) from their virtual datacentre (VDC).
Customers should contact us to obtain a dedicated API account to enable this functionality for their VDCs.

The API is RESTful in nature, data is submitted and received via XML or JSON (with JSON being the default, but the examples here are given for XML). The API requires that the API account's credentials are passed (with basic authentication) to our RESTful SSL API endpoint, though an OAuth method is enable if you wish to develop applications and use application authorisation.

The base endpoint url for this version is: https://portal.cloud.claranet.com/api

Get started by reading the sections on Authentication and Basic behaviours, then visit the Cloud Resources topics in the index to start creating Virtual Appliances and Virtual Machines

Table of Contents

Authentication

The API implements the following authentication to prevent unauthorized access to API resources:

Basic HTTP Authentication

Authentication following the Basic HTTP Authentication standard. The client must provide its credentials in base64 format, sending them in a request header in the form:

Authentication Header format
Authorization: Basic base64(<user>:<password>)

For example, for (user:user):

Authentication Header format
Authorization: Basic dXNlcjp1c2Vy

The authentication workflow should be as follows:

  1. The client requests a resource, without providing any credentials.
  2. An HTTP response code 401 (Unauthorized) is returned.
  3. The client requests the resource providing the credentials.
    1. If authentication fails, the server returns an HTTP response code 401 (Unauthorized), indicating a Bad Credentials or a User is disabled error.
    2. If authentication succeeds but the user does not have enough privileges to access the requested resource, an HTTP response code 403 (Forbidden) indicating a Denied Access error is returned.
    3. If authentication is successful, the server returns an HTTP reponse code 200 (OK), the requested resource, and an authentication token that the client can use to authenticate future requests.
  4. The client requests another resource, providing the authentication.

Request a resource without providing credentials

Request Headers: Accept, Content-Type.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Retrieve all the datacenters

GET Datacenters Request
% curl --verbose 'https://portal.cloud.claranet.com/api/admin/datacenters/' \
-X GET \
-H "Content-type:application/xml" \
-H "Accept:application/xml"

> GET /api/admin/datacenters HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: portal.cloud.claranet.com
> Content-type:application/xml
> Accept:application/xml

Response Headers: Content-Length, Content-Type, WWW-Authenticate, Date.
Response Message Body: N/A.
Response Status: 200, 401, 403.
Example Response: Response of the unauthenticated GET over a Datacenters resource

GET Datacenters Response
< HTTP/1.1 401 Unauthorized
< Server: Apache-Coyote/1.1
< WWW-Authenticate: Basic realm="Abiquo API"
< Content-Type: text/html;charset=utf-8
< Content-Length: 1152
< Date: Fri, 02 Jul 2010 09:40:14 GMT

Request a resource providing valid credentials

Request Headers: Accept, Content-Type, Authentication.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Retrieve all the datacenters

GET Datacenters Request
% curl --verbose 'https://portal.cloud.claranet.com/api/admin/datacenters/' \
-X GET \
-H "Content-type:application/xml" \
-H "Accept:application/xml" \
-H "Authorization: Basic ZXhhbXBsZTpleGFtcGxl"

> GET /api/admin/datacenters HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: portal.cloud.claranet.com
> Authorization: Basic ZXhhbXBsZTpleGFtcGxl
> Content-type:application/xml
> Accept:application/xml

Response Headers: Content-Length, Content-Type, Date, Set-Cookie.
Response Message Body: N/A.
Response Status: 200, 401, 403.
Example Response: Response of the authenticated GET over a Datacenters resource

GET Datacenters Response
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTI3ODA2NjA1MjM5NDowMjNmNTdkOWMxMzY3NmFjOTVmZjFlMDkyZjQyM2NmOQ; Expires=Fri, 02-Jul-2010 10:20:52 GMT; Path=/api
< Content-Type: application/xml
< Content-Length: 420
< Date: Fri, 02 Jul 2010 09:50:52 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datacenters>
<datacenter>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="edit"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/racks" rel="racks"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/remoteServices" rel="remoteServices"/>
<id>1</id>
<location>Redwood city</location>
<name>myDatacenter</name>
</datacenter>
</datacenters>

Request a resource providing the authentication

Request Headers: Accept, Content-Type, Cookie.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Retrieve all the datacenters

GET Datacenters Request
% curl --verbose 'https://portal.cloud.claranet.com/api/admin/datacenters/' \
-X GET \
-H "Content-type:application/xml" \
-H "Accept:application/xml" \
-H "Cookie: auth=YWRtaW46MTI3ODA2NjA1MjM5NDowMjNmNTdkOWMxMzY3NmFjOTVmZjFlMDkyZjQyM2NmOQ"

> GET /api/admin/datacenters HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: portal.cloud.claranet.com
> Cookie: auth=YWRtaW46MTI3ODA2NjA1MjM5NDowMjNmNTdkOWMxMzY3NmFjOTVmZjFlMDkyZjQyM2NmOQ
> Content-type:application/xml
> Accept:application/xml

Response Headers: Content-Length, Content-Type, Date.
Response Message Body: N/A.
Response Status: 200, 401, 403.
Example Response: Response of the authenticated GET over a Datacenters resource

GET Datacenters Response
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: application/xml
< Content-Length: 420
< Date: Fri, 02 Jul 2010 09:56:35 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datacenters>
<datacenter>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="edit"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/racks" rel="racks"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/remoteServices" rel="remoteServices"/>
<id>1</id>
<location>Redwood city</location>
<name>myDatacenter</name>
</datacenter>
</datacenters>

Request a resource providing valid credentials but with insufficient privileges

Request Headers: Accept, Content-Type, Authentication.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Retrieve all the datacenters

GET Datacenters Request
% curl --verbose 'https://portal.cloud.claranet.com/api/admin/datacenters/' \
-X GET \
-H "Content-type:application/xml" \
-H "Accept:application/xml" \
-H "Authorization: Basic ZXhhbXBsZTpleGFtcGxl"

> GET /api/admin/datacenters HTTP/1.1
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: portal.cloud.claranet.com
> Authorization: Basic ZXhhbXBsZTpleGFtcGxl
> Content-type:application/xml
> Accept:application/xml

Response Headers: Content-Length, Content-Type, Date, Set-Cookie.
Response Message Body: N/A.
Response Status: 200, 401, 403.
Example Response: Response of the authenticated GET over a Datacenters resource, but without enough privileges

GET Datacenters Response
< HTTP/1.1 403 Forbidden
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTI3ODA2NjU4MjkzMzo5ZGQ0NGYxZTk2NWNlNjk3Nzg3YTZlYmZkNmVlM2QwMA; Expires=Fri, 02-Jul-2010 10:29:42 GMT; Path=/api
< Content-Type: text/html;charset=utf-8
< Content-Length: 1021
< Date: Fri, 02 Jul 2010 09:59:42 GMT

OAuth v1.0 Version A Authentication

The API implements the OAuth 1.0 protocol, so any application that implements it can be used to consume the API. The basic authentication workflow for an already registered application, as defined by the protocol, consists of the following steps:

  1. The client application requests an Unauthenticated Request Token.
  2. The user authorizes the Request Token.
  3. The client application exchanges the Request Token for an Access Token.

Once the Access Token has been granted, the client application can use it to sign the requests and authenticate against the API.

The following table shows the OAuth specific endpoints that must be used when implementing the OAuth workflow.

OperationEndpoint
Request unauthenticated token/oauth/request_token
Authorize request token/oauth/authorize?oauth_token=<request token>
Get access token/oauth/access_token

The following table describes the query parameters that are used in the OAuth authentication workflow:

Query parameterDescription
oauth_tokenRequired when authorizing a request token.
oauth_callback

A callback URL where clients will be redirected after successful authentication

oauth_verifierVerifier value used when authorizing a Request Token

Basic Behaviours

Media Types

In The Server API, resource representations and request bodies are normally encoded in JSON and XML.

Each type of resource matches the pattern application/xml or application/json, even the errors.

The Server MUST provide representations of all resources available in JSON and XML.

The Server MUST accept requests from clients encoded in JSON and XML.

Request Headers

In requests made to services implementing the API, several specific HTTP headers are used as described in the following table:

HeaderSupported ValuesDescription of UseRequired

Accept

Comma-delimited list of media types or media type patterns.

Indicates to the server what media type(s) this client is prepared to accept.

Recommended, on requests that will produce a response message body.

Authorization

"Basic" plus username and password (under RFC 2617)

Identifies the authorized user making this request.

No.

Content-Length

Length (in bytes) of the request message body.

Length (in bytes) of the request message body.

Yes, on requests that contain a message body.(1)

Content-Type

Media type describing the request message body.

Describes the representation and syntax of the request message body.

Yes, on requests that contain a message body.

Host

Identifies the origin host receiving the message.

Required to allow support of multiple origin hosts at a single IP address.

All requests. Note that since a single Space may spread its URIs across multiple hosts, this may need to be set again for each request.

X-YYYYY-Client-Specification-Version

String containing a specification version number.

Declares the specification version of the YYYYY API that this client was programmed against.

No (current version is assumed if this header is not present).

(1) Some APIs MAY require a "Content-Length: 0" header to be included on a POST request that contains no request message body.

Note that because all interactions with this RESTful API is stateless, no Cookie header (or any other mechanism to provide a session identifier) is used.

Request Parameters

Since the URI space is controlled by the Server, client programs MUST not make any assumptions about the meanings of request parameters.

Paging Parameters

Some resources (like IPs, number of Virtual Datacenters per Datacenter) contain a large number of entities to be retrieved. In these cases, the API offers a way to filter the search, control the number of entities to be retrieved or control its sorting method in resource's query parameters in order to improve the user experience. When a resource offers this functionality we name it paged resource.

Paged resources are always exposed the same way using the same query parameters. These parameters are:

Parameter NameDescriptionDefault Value
startwithThe first element to be retrieved of the filtered search0
limitThe number of entities to retrieve25
has

Filter value. Depends on the resource, this value affects different to the request.

That means the resource must be properly documented to let you know what you can filter and what you can not

''
by

Sort preference. Depends on the resource, this value affects different to the request.

That means the resource must be properly documented to let you know how you can sort the output

Depends on the resource
ascIf the value of the 'by' parameter must be sorted in ascending way (true) or descending way (false)true

The Default Value column values mean that by default all paged resources are already filtered retrieving the first 25 entities, starting with the first one, and sorted arbitrarily (depending on the resource) in ascending way. If you want all the entities back instead of a range of them, just use the limit=0 query parameter.

Paging Links

When a resource is paged, then the API offers you a way to navigate through the full range of entities with paging links in its response. These links look this way:

    <link rel="first" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?by=ip"/>
<link rel="previous" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?by=ip"/>
<link rel="next" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?startwith=36&by=ip"/>
<link rel="last" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?startwith=252&by=ip"/>

There are up to 4 paging links:

  • rel='first': it will always refer to the first page (startwith=0). This link is always shown
  • rel='last': it will always refer to the last page. This link is always shown
  • rel='previous': it will refer to the previous page. This links is always shown unless we are in the 'first' page.
  • rel='next': it will refer to the next page. This link is always shown unless we are in the 'last' page.

Good news about the paging links is they respect you current request parameters. For instance, if you execute the following request:

curl -X GET "https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips" -u user:password

The 'next' link will be:

<link rel="next" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?startwith=25&limit=25&by=ip"/>

Since in the request we are using the 'Default Values' for this resource. But, if you execute:

curl -X GET "https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?limit=3" -u user:password

The 'next' link will be:

<link rel="next" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips?startwith=3&limit=3&by=ip"/>

See how it overrides the limit parameter and calculates the startwith parameter for the next page according with the current page length.

If you want all results back instead of a range of them, you can of course make use of the limit parameter with an arbitrarily high number (for example, 9999).

Response Headers

In responses returned by The Server, several specific HTTP headers are used as described in the following table:

HeaderSupported ValuesDescription of UseRequired

Content-Length

Length (in bytes) of the response message body.

Describes the size of the message body.

Yes, on responses that contain a message body.

Content-Type

Media type describing the response message body.

Describes the representation and syntax of the response message body.

Yes, on responses that contain a message body.

Standard HTTP Status Codes

the API will return standard HTTP response codes as described in the following table, under the conditions listed in the description.

HTTP StatusDescription

200 OK

The request was successfully completed. If this request created a new resource that is addressable with a URI, and a response body is returned containing a representation of the new resource, a 200 status will be returned with a Location header containing the canonical URI for the newly created resource.

201 Created

A request that created a new resource was completed, and no response body containing a representation of the new resource is being returned. A Location header containing the canonical URI for the newly created resource should also be returned.

202 Accepted

The request has been accepted for processing, but the processing has not been completed. Under the HTTP/1.1 specification, the returned entity (if any) SHOULD include an indication of the request's current status, and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled. Most asynchronous API methods (deploy virtual machine, reconfigure virtual machine) return this status.

204 No Content

The request has been accepted but it does not return any data in the message body. DELETE methods and asynchronous methods that have already finished return this status code.

400 Bad Request

The request could not be processed because it contains missing or invalid information (such as validation error on an input field, a missing required value, and so on).

401 Unauthorized

The authentication credentials included with this request are missing or invalid.

403 Forbidden

The server recognized your credentials, but you do not possess authorization to perform this request.

404 Not Found

The request specified a URI of a resource that does not exist.

405 Method Not Allowed

The HTTP verb specified in the request (DELETE, GET, HEAD, POST, PUT) is not supported for this request URI.

406 Not Acceptable

The resource identified by this request is not capable of generating a representation corresponding to one of the media types in the Accept header of the request.

409 Conflict

A creation or update request could not be completed, because it would cause a conflict in the current state of the resources supported by the server (for example, an attempt to create a new resource with a unique identifier already assigned to some existing resource).

415 Unsupported Media Type

The header "Content-type" does not match with the expected content type

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

501 Not Implemented

The server does not (currently) support the functionality required to fulfill the request.

503 Service Unavailable

The server is currently unable to handle the request due to temporary overloading or maintenance of the server.

Basic Links Data Model

This resource is the most basic one. It only has links to other resources. It is used when we want to associate a resource to another one. For instance, when we attach a Volume that was already created to a Virtual Machine.

Field NameTypeOccursRequiredDescription

link

String (a link)

1..n

optional

A link to an existing resource. Normally it has a REL field to provide a better understanding of the resource it points to

Get the list of datacenters

Return the list of all datacenters, which can be filtered by enterprise or scope.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/datacenters
Request Headers: Accept:application/vnd.abiquo.datacenters+json; version=3.1;application/vnd.abiquo.datacenters+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

idEnterprise

false

 

identifier of an enterprise

pricing

false

 

identifier of a pricing template

idScope

false

 

identifier of a scope


Response Message Body Entity: Datacenters Media Type

Get the list of datacenters example
curl -X GET https://portal.cloud.claranet.com/api/admin/datacenters\
-H 'Accept: application/vnd.abiquo.datacenters+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/admin/datacenters HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.datacenters+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:11:22 GMT
Set-Cookie: JSESSIONID=47E86632BE37E6187AAC8B1A0A809163; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzI4MjkzNzplM2RmOTIwYjdlZmRlN2VlNjE4NTJjZjg2ZjA4NTJjMjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:41:22 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenters+xml;version=3.1
Content-Length: 2392


<datacenters>
<datacenter>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/checkmachineipmistate" rel="checkmachineipmistate" type="application/vnd.abiquo.machineipmistate+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/checkmachinestate" rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/devices" rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/discovermultiple" rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/discoversingle" rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/enterprises" rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/getlimits" rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/hypervisor" rel="hypervisor" type="text/plain"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/hypervisors" rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/network" rel="network" type="application/vnd.abiquo.vlans+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/networkservicetypes" rel="networkservicetypes" type="application/vnd.abiquo.networkservicetypes+xml; version=3.1"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/racks" rel="racks" type="application/vnd.abiquo.racks+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/remoteservices" rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers" rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
<id>1</id>
<location>New York</location>
<name>JC-b46300d9-bc6</name>
<uuid>AbiquoIT</uuid>
</datacenter>
</datacenters>

Get the list of datacenter names and identifiers

Return the list of all datacenters, with only two attributes,identifier and name, which can be filtered by enterprise or scope.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/datacenters
Request Headers: Accept:application/vnd.abiquo.datacenterslight+json; version=3.1;application/vnd.abiquo.datacenterslight+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

limit

false

25

number of elements to return

idEnterprise

false

 

filters the datacenters that are allowed in enterprise with identifier
idEnterprise

pricing

false

 

identifier of a pricing template

idScope

false

 

identifier of a scope


Response Message Body Entity: DatacentersLight Media Type

Get the list of datacenter names and identifiers example
curl -X GET https://portal.cloud.claranet.com/api/admin/datacenters \
-H 'Accept: application/vnd.abiquo.datacenterslight+xml;version=3.1' \
-u user:pass --verbose

GET /api/admin/datacenters HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
Accept: application/vnd.abiquo.datacenterslight+xml;version=3.1

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: auth=YWRtaW46MTM0NDMzMDQyODkxMToyZjNlNzZhYTZkMGJhNWU5OTU1MmYxOTUyMzJmZDM4MjpBQklRVU8; Expires=Tue, 07-Aug-2012 09:07:08 GMT; Path=/api
Set-Cookie: JSESSIONID=6DBD4F9B5144E8881736432751603EA3; Path=/api
Content-Type: application/vnd.abiquo.datacenterslight+xml;version=3.1
Content-Length: 728
Date: Tue, 07 Aug 2012 08:37:08 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <datacenterslight> <link rel="first" href="https://portal.cloud.claranet.com/api/admin/datacenters?limit=25"/> <link rel="last" href="https://portal.cloud.claranet.com/api/admin/datacenters?startwith=0&amp;limit=25"/> <totalSize>1</totalSize> <datacenterlight> <link rel="datacenter" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/> <idDatacenter>1</idDatacenter> <name>dc</name> </datacenterlight> </datacenterslight>

Retrieve a single Datacenter

Get a single Datacenter by Datacenter identifier

Synopsis: GET https://portal.cloud.claranet.com/api/admin/datacenters/{datacenter}
Request Headers: Accept:application/vnd.abiquo.datacenter+json; version=3.1;application/vnd.abiquo.datacenter+xml; version=3.1; Content-type: ;
Response Message Body Entity: Datacenter Media Type

Retrieve a single Datacenter example
curl -X GET https://portal.cloud.claranet.com/api/admin/datacenters/1\
-H 'Accept: application/vnd.abiquo.datacenter+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/admin/datacenters/1 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.datacenter+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:07 GMT
Set-Cookie: JSESSIONID=14211E9CC250708C2C76792D8446AFFF; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwNzk1NTo4NGUwM2QxNzhmMGU3YmQ5NmNlMDlkMmI5N2JiMTJhMzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:07 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenter+xml;version=3.1
Content-Length: 2365


<datacenter>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/checkmachineipmistate" rel="checkmachineipmistate" type="application/vnd.abiquo.machineipmistate+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/checkmachinestate" rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/devices" rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/discovermultiple" rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/discoversingle" rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/enterprises" rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/getlimits" rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/hypervisor" rel="hypervisor" type="text/plain"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/hypervisors" rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/network" rel="network" type="application/vnd.abiquo.vlans+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/networkservicetypes" rel="networkservicetypes" type="application/vnd.abiquo.networkservicetypes+xml; version=3.1"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/racks" rel="racks" type="application/vnd.abiquo.racks+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/remoteservices" rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers" rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
<id>1</id>
<location>New York</location>
<name>JC-b46300d9-bc6</name>
<uuid>AbiquoIT</uuid>
</datacenter>

Retrieve the list of enterprises

Retrieve the list of enterprises

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises
Request Headers: Accept:application/vnd.abiquo.enterprises+json; version=3.1;application/vnd.abiquo.enterprises+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

has

false

 

name to filter the results

limit

false

25

total number of elements in the result set

idPricingTemplate

false

-1

identifier for {@link PricingTemplateResource}

idScope

false

1

identifier for {@link ScopeResource}

included

false

 

include enterprises with no pricing templat

Response Message Body Entity: Enterprises Media Type

Retrieve the list of enterprises example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises\
-H 'Accept: application/vnd.abiquo.enterprises+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/admin/enterprises HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.enterprises+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:58 GMT
Set-Cookie: JSESSIONID=F6FFACAED71B249A54858EBBDBC90FB1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE5OTA1NDplMzA3M2ViZmNhZDhmMmVlOGZkZWU4MWNjZWIyN2Q5NzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:59 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.enterprises+xml;version=3.1
Content-Length: 5262

<?xml version="1.0" encoding="UTF-8"?> <enterprises> <link href="https://portal.cloud.claranet.com/api/admin/enterprises" rel="first"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises?startwith=0" rel="last"/> <totalSize>2</totalSize> <enterprise> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists" rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions" rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualdatacenters" rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories" rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1" rel="edit" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/ips" rel="ips" title="ips"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits" rel="limits" type="application/vnd.abiquo.limits+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/properties" rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/reservedmachines" rel="reservedmachines" type="application/vnd.abiquo.machines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users" rel="users" type="application/vnd.abiquo.users+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualappliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>1</id> <isReservationRestricted>false</isReservationRestricted> <name>Abiquo</name> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </enterprise> <enterprise> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitionLists" rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitions" rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualdatacenters" rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/datacenterrepositories" rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="edit" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/ips" rel="ips" title="ips"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits" rel="limits" type="application/vnd.abiquo.limits+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/properties" rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/reservedmachines" rel="reservedmachines" type="application/vnd.abiquo.machines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users" rel="users" type="application/vnd.abiquo.users+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualappliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <isReservationRestricted>false</isReservationRestricted> <name>JC-b8e62569-389</name> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </enterprise> </enterprises>

Retrieve the list of enterprise identifiers and names

Retrieve the list of enterprises with only the identifier and name of each enterprise

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises
Request Headers: Accept:application/vnd.abiquo.enterprises-id-name+json; version=3.1;application/vnd.abiquo.enterprises-id-name+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

has

false

 

name to filter the results

limit

false

25

total number of elements in the result set

idPricingTemplate

false

-1

identifier for {@link PricingTemplateResource}

idScope

false

1

identifier for {@link ScopeResource}

included

false

 

include enterprises with no pricing template

Response Message Body Entity: EnterprisesIdName Media Type

Retrieve the list of enterprise identifiers and names example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises\
-H 'Accept: application/vnd.abiquo.enterprises+xml; version=3.1' \
-u user:password --verbose



GET https://portal.cloud.claranet.com/api/admin/enterprises HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.enterprises+xml;version=3.1




HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:58 GMT
Set-Cookie: JSESSIONID=F6FFACAED71B249A54858EBBDBC90FB1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE5OTA1NDplMzA3M2ViZmNhZDhmMmVlOGZkZWU4MWNjZWIyN2Q5NzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:59 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.enterprises+xml;version=3.1
Content-Length: 5262


<?xml version="1.0" encoding="UTF-8"?> <enterprises> <link href="https://portal.cloud.claranet.com/api/admin/enterprises" rel="first"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises?startwith=0" rel="last"/> <totalSize>2</totalSize> <enterprise> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists" rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions" rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualdatacenters" rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories" rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1" rel="edit" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/ips" rel="ips" title="ips"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits" rel="limits" type="application/vnd.abiquo.limits+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/properties" rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/reservedmachines" rel="reservedmachines" type="application/vnd.abiquo.machines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users" rel="users" type="application/vnd.abiquo.users+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualappliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/action/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>1</id> <isReservationRestricted>false</isReservationRestricted> <name>Abiquo</name> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </enterprise> <enterprise> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitionLists" rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitions" rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualdatacenters" rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/datacenterrepositories" rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="edit" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/ips" rel="ips" title="ips"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits" rel="limits" type="application/vnd.abiquo.limits+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/properties" rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/reservedmachines" rel="reservedmachines" type="application/vnd.abiquo.machines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users" rel="users" type="application/vnd.abiquo.users+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualappliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <isReservationRestricted>false</isReservationRestricted> <name>JC-b8e62569-389</name> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </enterprise> </enterprises>

Retrieve enterprise information

Retrieves an enterprise object with basic information

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}
Request Headers: Accept:application/vnd.abiquo.${paramMediatype}+json; version=3.1;application/vnd.abiquo.${paramMediatype}+xml; version=3.1; Content-type: ;

Response Message Body Entity: Enterprise Media Type

Retrieve enterprise information example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2\
-H 'Accept: application/vnd.abiquo.enterprise+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/admin/enterprises/2 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.enterprise+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:09 GMT
Set-Cookie: JSESSIONID=9F369F604606EDBFF45A45158B352455; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwOTMzOTpmNmZkOTA4YmY0MzRlZjYzYjRiNjFhZTZiZmQ1ZGIxODpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:09 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.enterprise+xml;version=3.1
Content-Length: 2562

<?xml version="1.0" encoding="UTF-8"?> <enterprise> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitionLists" rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/appslib/templateDefinitions" rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualdatacenters" rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/datacenterrepositories" rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="edit" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/ips" rel="ips" title="ips"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits" rel="limits" type="application/vnd.abiquo.limits+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/properties" rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/reservedmachines" rel="reservedmachines" type="application/vnd.abiquo.machines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users" rel="users" type="application/vnd.abiquo.users+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualappliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/action/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <isReservationRestricted>false</isReservationRestricted> <name>JC-b8e62569-389</name> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </enterprise>

Retrieve a list of virtual machines

Retrieve a list of virtual machines created by an enterprise in any virtual datacenter.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/virtualmachines

Request Headers: Accept:application/vnd.abiquo.virtualmachines+json; version=3.1;application/vnd.abiquo.virtualmachines+xml; version=3.1; Content-type:
Response Message Body Entity: VirtualMachines Media Type

Retrieve a list of virtual machines example
curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualmachines" -H "Accept:application/vnd.abiquo.virtualmachines+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachines> <virtualMachine> <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations"/> <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/deploy"/> <link rel="disks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/disks"/> <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/> <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/instance"/> <link rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations/1"/> <link rel="nics" type="application/vnd.abiquo.nics+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics"/> <link rel="privateip" type="application/vnd.abiquo.ip+xml; version=3.1" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/1/ips/2"/> <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/reset"/> <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/tasks"/> <link rel="tasks" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/tasks"/> <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/undeploy"/> <link rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/1"/> <link rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=3.1" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1"/> <link title="HYPERV_301" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/> <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/12"/> <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes"/> <cpu>1</cpu> <description>Ubuntu_11_10_SSH_vhd</description> <hdInBytes>5368709120</hdInBytes> <highDisponibility>0</highDisponibility> <id>1</id> <idState>1</idState> <idType>1</idType> <name>ABQ_74f32c39-9058-4432-b6b0-b08510388643</name> <password/> <ram>512</ram> <state>NOT_ALLOCATED</state> <uuid>74f32c39-9058-4432-b6b0-b08510388643</uuid> <vdrpPort>0</vdrpPort> </virtualMachine> </virtualMachines>

Retrieve a list of virtual datacenters

Retrieve an ordered and filtered list of virtual datacenters defined for an enterprise

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/virtualdatacenters

Request Headers: Accept:application/vnd.abiquo.virtualdatacenters+json; version=3.1;application/vnd.abiquo.virtualdatacenters+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

limit

false

25

total number of elements in the result set

by

false

name

parameter for ordering

has

false

 

name to filter the results

asc

false

true

true/false ascending/descending orde


Response Message Body Entity: VirtualDatacenters Media Type

Retrieve a list of virtual datacenters example
curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualdatacenters" -H "Accept:application/vnd.abiquo.virtualdatacenters+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualDatacenters> <link rel="first" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/virtualdatacenters"/> <link rel="last" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/virtualdatacenters?startwith=0"/> <totalSize>1</totalSize> <virtualDatacenter> <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/> <link rel="defaultnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/1"/> <link title="GET" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/defaultvlan"/> <link title="PUT" rel="defaultvlan" type="application/vnd.abiquo.links+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/defaultvlan"/> <link rel="disks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/disks"/> <link rel="edit" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link rel="ips" type="application/vnd.abiquo.ip+xml; version=3.1" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/ips"/> <link rel="privatenetworks" type="application/vnd.abiquo.vlans+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks"/> <link rel="purchased" type="application/vnd.abiquo.ips+xml; version=3.1" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/publicips/purchased"/> <link rel="statefulcandidates" type="application/vnd.abiquo.iscsivolumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/action/statefulcandidates"/> <link rel="tiers" type="application/vnd.abiquo.tiers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/tiers"/> <link rel="topurchase" type="application/vnd.abiquo.ips+xml; version=3.1" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/publicips/topurchase"/> <link rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances"/> <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <hypervisorType>HYPERV_301</hypervisorType> <id>1</id> <name>vdc</name> <network> <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/> <link rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/1"/> <link rel="ips" type="application/vnd.abiquo.ip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/1/ips"/> <address>192.168.0.0</address> <dhcpOptions/> <gateway>192.168.0.1</gateway> <id>1</id> <mask>24</mask> <name>default_private_network</name> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <type>INTERNAL</type> </network> </virtualDatacenter> </virtualDatacenters>

Retrieve the list of virtual appliances

Retrieve the list of virtual appliances defined in an enterprise

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/virtualappliances

Request Headers: Accept:application/vnd.abiquo.virtualappliances+json; version=3.1;application/vnd.abiquo.virtualappliances+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

limit

false

25

total number of elements in the result set

by

false

name

parameter for ordering. Valid values {}

has

false

 

name to filter the results

asc

false

true

true/false ascending/descending order

expand

false

 

adds information on last tasks by Vapp nodes

Response Message Body Entity: VirtualAppliances Media Type

Retrieve the list of virtual appliances example
curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/virtualappliances" -H "Accept:application/vnd.abiquo.virtualappliances+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliances> <totalSize>1</totalSize> <virtualAppliance> <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/action/deploy"/> <link rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/action/price"/> <link rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/state"/> <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/action/undeploy"/> <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/> <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines"/> <error>0</error> <highDisponibility>0</highDisponibility> <id>1</id> <name>vapp</name> <nodeconnections>&lt;connections/&gt;</nodeconnections> <publicApp>0</publicApp> <state>NOT_DEPLOYED</state> </virtualAppliance> </virtualAppliances>

Retrieve the list of private IPs

Retrieve the list of private IPs created by an enterprise.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/ips
Request Headers: Accept:application/vnd.abiquo.privateips+json; version=3.1;application/vnd.abiquo.privateips+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

ip

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.


Response Message Body Entity: PrivateIps Media Type

Retrieve the list of private IPs example
$ curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/ips" -H "Accept:application/vnd.abiquo.privateips+xml" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<privateips>
<link rel="first" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/ips?limit=25&amp;by=ip"/>
<link rel="next" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/ips?startwith=25&amp;limit=25&amp;by=ip"/>
<link rel="last" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/ips?startwith=229&amp;limit=25&amp;by=ip"/>
<totalSize>254</totalSize>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/2"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/2/ips/63"/>
<link title="vdc" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/>
<id>63</id>
<ip>192.168.0.1</ip>
<mac>00:50:56:15:a4:86</mac>
<name>00505615a486_host</name>
<networkName>default_private_network</networkName>
</privateip>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/2"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/privatenetworks/2/ips/64"/>
<link title="vdc" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/>
<id>64</id>
<ip>192.168.0.2</ip>
<mac>00:50:56:16:0c:40</mac>
<name>005056160c40_host</name>
<networkName>default_private_network</networkName>
</privateip>
<privateips>

Retrieve list of volumes managed

Retrieve the list of volumes managed by this enterprise.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/volumes

Request Headers: Accept:application/vnd.abiquo.iscsivolumes+json; version=3.1;application/vnd.abiquo.iscsivolumes+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

id

parameter for ordering

has

false

 

name to filter the results

limit

false

25

total number of elements in the result set

asc

false

true

true/false ascending/descending order

persistent

false

true

Include or not the persistent volumes in the result


Response Message Body Entity: VolumesManagement Media Type

Retrieve list of volumes managed example
$ curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/volumes" -H "Accept:application/vnd.abiquo.iscsivolumes+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<volumes>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/volumes" rel="first"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/volumes?startwith=0" rel="last"/>
<totalSize>8</totalSize>
<volume>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/12664" type="application/vnd.abiquo.volume+xml" rel="edit"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/12664/action/initiatormappings" type="application/vnd.abiquo.initiatormappings+xml" rel="initiator mappings"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/tiers/1" type="application/vnd.abiquo.tier+xml" rel="tier" title="Nexenta"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/602" type="application/vnd.abiquo.virtualappliance+xml" rel="virtualappliance" title="NetApp Sysadmins"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/602/virtualmachines/1105" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine" title="ABQ_6c62a782-1281-4e9b-a5dd-8587693fd69b"/>
<id>12664</id>
<name>netapp7</name>
<state>ATTACHED</state>
<sizeInMB>15360</sizeInMB>
<idImage>329</idImage>
</volume>
<volume>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/14994" type="application/vnd.abiquo.volume+xml" rel="edit"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/14994/action/initiatormappings" type="application/vnd.abiquo.initiatormappings+xml" rel="initiator mappings"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/tiers/1" type="application/vnd.abiquo.tier+xml" rel="tier" title="Nexenta"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
<id>14994</id>
<name>core</name>
<state>DETACHED</state>
<sizeInMB>102</sizeInMB>
</volume>
</volumes>

Retrieve the list of volumes managed with info on virtual machines

Retrieve the list of volumes managed by this enterprise with information on the virtual machines that the volumes are attached to.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/volumes

Request Headers: Accept:application/vnd.abiquo.iscsivolumeswithvirtualmachine+json;version=3.1;application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

id

parameter for ordering

has

false

 

name to filter the results

limit

false

25

total number of elements in the result set

asc

false

true

true/false ascending/descending order

persistent

false

true

Include or not the persistent volumes in the result


Response Message Body Entity: VolumesManagementWithVirtualMachine Media Type

Retrieve the list of volumes managed with info on virtual machines example
$ curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/volumes" -H "Accept:application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<volumes>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/volumes" rel="first"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/volumes?startwith=0" rel="last"/>
<totalSize>8</totalSize>
<volume>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/12664" type="application/vnd.abiquo.volume+xml" rel="edit"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/volumes/12664/action/initiatormappings" type="application/vnd.abiquo.initiatormappings+xml" rel="initiator mappings"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/tiers/1" type="application/vnd.abiquo.tier+xml" rel="tier" title="Nexenta"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/602" type="application/vnd.abiquo.virtualappliance+xml" rel="virtualappliance" title="NetApp Sysadmins"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1" type="application/vnd.abiquo.virtualdatacenter+xml" rel="virtualdatacenter" title="KVM"/>
<link href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/virtualappliances/602/virtualmachines/1105" type="application/vnd.abiquo.virtualmachine+xml" rel="virtualmachine" title="ABQ_6c62a782-1281-4e9b-a5dd-8587693fd69b"/>
<id>12664</id>
<name>netapp7</name>
<state>ATTACHED</state>
<sizeInMB>15360</sizeInMB>
<idImage>329</idImage>
<storagePoolWithDevice>
<availableSizeInMb>312111</availableSizeInMb>
<enabled>false</enabled>
<idStorage>decaa73a-c8c2-4c0d-bf17-26616c9b4d4b</idStorage>
<name>mothership</name>
<totalSizeInMb>475136</totalSizeInMb>
<usedSizeInMb>163025</usedSizeInMb>
<device>
<id>1</id>
<iscsiIp>10.60.20.31</iscsiIp>
<iscsiPort>3260</iscsiPort>
<managementIp>10.60.20.31</managementIp>
<managementPort>8080</managementPort>
<name>Mothership Nexenta</name>
<storageTechnology>NEXENTA</storageTechnology>
</device>
</storagePoolWithDevice>
<virtualAppliance>
<error>0</error>
<highDisponibility>0</highDisponibility>
<id>602</id>
<name>NetApp Sysadmins</name>
<nodeconnections>&lt;connections/&gt;</nodeconnections>
<publicApp>0</publicApp>
<state>DEPLOYED</state>
</virtualAppliance>
<virtualDatacenterWithDatacenter>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<hypervisorType>KVM</hypervisorType>
<id>1</id>
<name>KVM</name>
<datacenter>
<id>1</id>
<location>Barcelona</location>
<name>Abiquo BCN</name>
</datacenter>
</virtualDatacenterWithDatacenter>
<virtualMachine>
<link href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/racks/1/machines/24" type="application/vnd.abiquo.machine+xml" rel="machine" title="KVM"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/7" type="application/vnd.abiquo.user+xml" rel="user"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/329" type="application/vnd.abiquo.virtualmachinetemplate+xml" rel="virtualmachinetemplate"/>
<cpu>1</cpu>
<description>netapp7.qcow2</description>
<hdInBytes>0</hdInBytes>
<highDisponibility>0</highDisponibility>
<id>1105</id>
<idState>4</idState>
<idType>1</idType>
<name>ABQ_6c62a782-1281-4e9b-a5dd-8587693fd69b</name>
<ram>1024</ram>
<state>ON</state>
<vdrpIP>10.60.20.17</vdrpIP>
<vdrpPort>5904</vdrpPort>
</virtualMachine>
</volume>
</volumes>

Retrieve the list of external networks assigned to an enterprise

Retrieve the list of external networks assigned to an enterprise.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/externalnetworks
Request Headers: Accept:application/vnd.abiquo.vlans+json; version=3.1;application/vnd.abiquo.vlans+xml; version=3.1; Content-type: ;
Response Message Body Entity: VLANNetworks Media Type

Retrieve the list of external networks assigned to an enterprise example
curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/externalnetworks" -H "Accept:application/vnd.abiquo.vlans+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <networks> <network> <link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/> <link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/externalnetworks/47" type="application/vnd.abiquo.vlan+xml" rel="externalnetwork"/> <address>10.60.10.0</address> <dhcpOptions/> <gateway>10.60.10.1</gateway> <id>47</id> <mask>24</mask> <name>External Systems</name> <primaryDNS>10.60.10.1</primaryDNS> <secondaryDNS>8.8.8.8</secondaryDNS> <sufixDNS/> <tag>30</tag> <type>EXTERNAL</type> </network> </networks>

Retrieve external VLAN

Retrieve an external VLAN.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/action/externalnetworks/{externalnetwork}
Request Headers: Accept:application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1;  Content-type:
Response Message Body Entity: VLANNetwork Media Type

Retrieve external VLAN example
$ curl -X GET "https://portal.cloud.claranet.com/api/admin/enterprises/1/action/externalnetworks/47" -H "Accept:application/vnd.abiquo.vlan+xml; version=3.1;" -u user:password | xmlindent -nbe -f

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1" type="application/vnd.abiquo.enterprise+xml" rel="enterprise"/>
<link href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/action/externalnetworks/47" type="application/vnd.abiquo.vlan+xml" rel="externalnetwork"/>
<address>10.60.10.0</address>
<dhcpOptions/>
<gateway>10.60.10.1</gateway>
<id>47</id>
<mask>24</mask>
<name>External Systems</name>
<primaryDNS>10.60.10.1</primaryDNS>
<secondaryDNS>8.8.8.8</secondaryDNS>
<sufixDNS></sufixDNS>
<tag>30</tag>
<type>EXTERNAL</type>
</network>

Retrieve all template definition lists

Get all the template definition lists registered in the enterprise.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitionLists
Request Headers: Accept:application/vnd.abiquo.templatedefinitionlists+json; version=3.1;application/vnd.abiquo.templatedefinitionlists+xml; version=3.1; Content-type: ;
Response Message Body Entity: TemplateDefinitionLists Media Type

Retrieve all template definition lists example
curl --verbose -u user:password --X GET https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists

> GET /api/admin/enterprises/1/appslib/templateDefinitionLists HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0Mzg0ODE5MzoyMjJjZWMyZTYwNjQ2ZjUyYWNjYmIxNGQyMGNkZDA1YzpBQklRVU8; Expires=Fri, 01-Feb-2013 18:37:28 GMT; Path=/api
< Set-Cookie: JSESSIONID=2137965EBB9C8A1DDABE1578E0B39966.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinitionlists+xml;version=3.1
< Content-Length: 6235
< Date: Fri, 01 Feb 2013 18:07:28 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinitionLists> <totalSize>1</totalSize> <templateDefinitionList> <link rel="edit" type="application/vnd.abiquo.templatedefinitionlist+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/3"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="repositoryStatus" type="application/vnd.abiquo.templatestates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/3/actions/repositoryStatus"/> <id>3</id> <name>Claranet Official Repository</name> <url>http://repository.com/ovfindex.xml</url> <templateDefinitions> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="OS" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/9"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/27"/> <id>27</id> <url> http://repository.com/centos5/centos5.ovf</url> <name>Centos 5.6 x86_64</name> <description>Centos 5. Log in as 'root' with password 'abiquo'.</description> <productName>Centos 5.6 x86_64</productName> <iconUrl> http://repository.com/centos5/centos.png</iconUrl> <diskFormatType>QCOW2_SPARSE</diskFormatType> <diskFileSize>614</diskFileSize> <osType>UNRECOGNIZED</osType> </templateDefinition> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="OS" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/9"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/28"/> <id>28</id> <url> http://repository.com/ubuntu-9.04/ubuntu-9.04-i386-sparse.1.5.ovf</url> <name>Ubuntu Linux 9.04 32 bits</name> <description>Ubuntu is a computer operating system based on the Debian Linux distribution. Ubuntu provides an up-to-date, stable operating system for the average user, with a strong focus on usability and ease-of-installation. Log in as 'root' with password 'abiquo'</description> <productName>Ubuntu Linux 9.04 32 bits</productName> <iconUrl> http://repository.com/s3direct/ubuntu-9.04/ubuntu_logo.png</iconUrl> <diskFormatType>VMDK_SPARSE</diskFormatType> <diskFileSize>764</diskFileSize> <osType>UBUNTU</osType> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>IDE</diskControllerType> </templateDefinition> </templateDefinitions> </templateDefinitionList> </templateDefinitionLists>

Retrieve a template definition list

Get the content of a Template Definition List.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitionLists/{templateDefinitionList}

Request Headers: Accept:application/vnd.abiquo.templatedefinitionlist+json; version=3.1;application/vnd.abiquo.templatedefinitionlist+xml; version=3.1; Content-type: ;
Response Message Body Entity: TemplateDefinitionList Media Type

Retrieve a template definition list example
curl --verbose -u user:password -X GET 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6'

> GET /api/admin/enterprises/1/appslib/templateDefinitionLists/6 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NDM0OTYzNDowNDVhNTIxYWUwOGQ0ZjJjMDBhOWZiOTNhMWFiZWM3NjpBQklRVU8; Expires=Fri, 01-Feb-2013 18:45:49 GMT; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinitionlist+xml;version=3.1
< Transfer-Encoding: chunked
< Date: Fri, 01 Feb 2013 18:15:49 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinitionList> <link rel="edit" type="application/vnd.abiquo.templatedefinitionlist+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="repositoryStatus" type="application/vnd.abiquo.templatestates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6/actions/repositoryStatus"/> <id>6</id> <name>REPO</name> <url>http://repository.com/ovfindex.xml</url> <templateDefinitions> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="Load Balancer,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/7"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/32"/> <id>32</id> <url>http://rs.bcn.repository.com/zeus/zeus.ovf</url> <name>Zeus Traffic Manager Virtual Appliance</name> <description>Zeus Traffic Manager Virtual Appliance</description> <productName>Zeus Traffic Manager Virtual Appliance</productName> <iconUrl>http://icons.repository.com/zeus.png</iconUrl> <diskFormatType>VMDK_SPARSE</diskFormatType> <diskFileSize>204</diskFileSize> <osType>CENTOS</osType> <diskControllerType>SCSI</diskControllerType> </templateDefinition> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="Operative Systems,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/33"/> <id>33</id> <url>http://rs.bcn.repository.com/namenode/description.ovf</url> <name>Debian</name> <description>Hadoop namenode</description> <productName>Debian</productName> <iconUrl>http://icons.repository.com/namenode.jpg</iconUrl> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>2048</diskFileSize> <osType>LINUX</osType> <diskControllerType>SCSI</diskControllerType> </templateDefinition> </templateDefinitions> </templateDefinitionList>

Modify a template definition list

Update the content of the template definition list based on the supplied list of template definitions.

Synopsis: PUT https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitionLists/{templateDefinitionList}

Request Headers: Accept:application/vnd.abiquo.templatedefinitionlist+json; version=3.1;application/vnd.abiquo.templatedefinitionlist+xml; version=3.1; Content-type: application/vnd.abiquo.templatedefinitionlist+json; version=3.1;application/vnd.abiquo.templatedefinitionlist+xml;version=3.1;

Request Message Body Entity: TemplateDefinitionList Media Type
Response Message Body Entity: TemplateDefinitionList Media Type

Modify a template definition list example
curl --verbose -u user:password -X PUT 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/4' -H "Content-type:application/vnd.abiquo.templatedefinitionlist+xml" -d \
'<templateDefinitionList>
<name>lalarepo</name>
<url>http://rs.bcn.repository.com:9000/ovfindex.xml</url>
</templateDefinitionList>'

> PUT /api/admin/enterprises/1/appslib/templateDefinitionLists/4 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> Content-type:application/vnd.abiquo.templatedefinitionlist+xml
> Content-Length: 131
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NTM0OTUwODo1ZmU0ZDZmODgyNTEyNTM0YTNiMTQ3NDM1NGQ1NjlhYTpBQklRVU8; Expires=Fri, 01-Feb-2013 19:02:29 GMT; Path=/api
< Set-Cookie: JSESSIONID=8A0CD3BC4C233EBDB61ED21CCC48AA90.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinitionlist+xml;version=3.1
< Content-Length: 626
< Date: Fri, 01 Feb 2013 18:32:29 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinitionList> <link rel="edit" type="application/vnd.abiquo.templatedefinitionlist+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/4"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="repositoryStatus" type="application/vnd.abiquo.templatestates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/4/actions/repositoryStatus"/> <id>4</id> <name>lalarepo</name> <templateDefinitions/> </templateDefinitionList>

Refresh a template definition list from the URL

Fetch new Template Definitions (.ovf) from an ovfindex.xml source, adding them to the current list. Also delete template definitions that are not present. Only apply if the list is associated with an ovfindex.xml (url datamodel), which is a list created by providing the ovfindex.xml location.

Synopsis: PUT https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitionLists/{templateDefinitionList}

Request Headers: Accept:application/vnd.abiquo.templatedefinitionlist+json; version=3.1;application/vnd.abiquo.templatedefinitionlist+xml; version=3.1; Content-type: ;

Response Message Body Entity: TemplateDefinitionList Media Type

Refresh a template definition list from the URL example
curl --verbose -u user:password -X PUT 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6'

> PUT /api/admin/enterprises/1/appslib/templateDefinitionLists/6 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NDQ3OTAzMDo3MzJhNzZmODMxZWQ4NTYxZGI2MGQ1MmE4MjI4ZmEzZDpBQklRVU8; Expires=Fri, 01-Feb-2013 18:47:59 GMT; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinitionlist+xml;version=3.1
< Transfer-Encoding: chunked
< Date: Fri, 01 Feb 2013 18:18:00 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinitionList> <link rel="edit" type="application/vnd.abiquo.templatedefinitionlist+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="repositoryStatus" type="application/vnd.abiquo.templatestates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/6/actions/repositoryStatus"/> <id>6</id> <name>OFFICIAL INTERNAL REPO</name> <url>http://rs.bcn.repository.com/ovfindex.xml</url> <templateDefinitions> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="Load Balancer,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/7"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/32"/> <id>32</id> <url>http://rs.bcn.repository.com/zeus/zeus.ovf</url> <name>Zeus Traffic Manager Virtual Appliance</name> <description>Zeus Traffic Manager Virtual Appliance</description> <productName>Zeus Traffic Manager Virtual Appliance</productName> <iconUrl>http://icons.repository.com/zeus.png</iconUrl> <diskFormatType>VMDK_SPARSE</diskFormatType> <diskFileSize>204</diskFileSize> <osType>CENTOS</osType> <diskControllerType>SCSI</diskControllerType> </templateDefinition> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="Operative Systems,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/33"/> <id>33</id> <url>http://rs.bcn.repository.com/namenode/description.ovf</url> <name>Debian</name> <description>Hadoop namenode</description> <productName>Debian</productName> <iconUrl>http://icons.repository.com/namenode.jpg</iconUrl> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>2048</diskFileSize> <osType>LINUX</osType> <diskControllerType>SCSI</diskControllerType> </templateDefinition> </templateDefinitions> </templateDefinitionList>

Delete a template definition list

Removes a Template Definition List, but doesn't delete the included Template Definitions.

Synopsis: DELETE https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitionLists/{templateDefinitionList}

Delete a template definition list example
curl --verbose -u user:password -X DELETE 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitionLists/8'

> DELETE /api/admin/enterprises/1/appslib/templateDefinitionLists/8 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 204 Sin Contenido
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NDY1NjY4NTo2YTU2MTJhMmJmNjA3MWU5YTZhZDUyMjc3ZDA0YjU5MjpBQklRVU8; Expires=Fri, 01-Feb-2013 18:50:56 GMT; Path=/api
< Set-Cookie: JSESSIONID=FB9EE05EEFD7100841E47FE57E7DBC9A.nodeAlbert; Path=/api
< Date: Fri, 01 Feb 2013 18:20:56 GMT
<

Retrieve all the template definitions

This method retrieves all the Template Definitions for a given enterprise, including those the being used in any Template Definition List.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitions

Request Headers: Accept:application/vnd.abiquo.templatedefinitions+json; version=3.1;application/vnd.abiquo.templatedefinitions+xml; version=3.1; Content-type: ;

Response Message Body Entity: TemplateDefinitions Media Type

Retrieve all the template definitions example
curl --verbose -u user:password -X GET 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions'

> GET /api/admin/enterprises/1/appslib/templateDefinitions HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NTY0NTAxODozYTc1YWNkZmQ4ZTEzODZlNTYxODk2YmVlZTAzMmUyYTpBQklRVU8; Expires=Fri, 01-Feb-2013 19:07:25 GMT; Path=/api
< Set-Cookie: JSESSIONID=8AD80A529AAAECBCFEB5B0537702C9B0.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinitions+xml;version=3.1
< Content-Length: 5544
< Date: Fri, 01 Feb 2013 18:37:25 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinitions> <templateDefinition> <link title="OS" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/9"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/110"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <id>110</id> <url> http://repository.com/centos5/centos5.ovf</url> <name>Centos 5.6 x86_64</name> <description>Centos 5. Log in as 'root' with password 'abiquo'.</description> <productName>Centos 5.6 x86_64</productName> <iconUrl> http://abiquo-repository.s3.amazonaws.com/centos5/centos.png</iconUrl> <diskFormatType>QCOW2_SPARSE</diskFormatType> <diskFileSize>614</diskFileSize> <osType>UNRECOGNIZED</osType> </templateDefinition> <templateDefinition> <link title="OS" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/9"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/111"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <id>111</id> <url> http://repository.com/ubuntu-9.04/ubuntu-9.04-i386-sparse.1.5.ovf</url> <name>Ubuntu Linux 9.04 32 bits</name> <description>Ubuntu is a computer operating system based on the Debian Linux distribution. Ubuntu provides an up-to-date, stable operating system for the average user, with a strong focus on usability and ease-of-installation. Log in as 'root' with password 'abiquo'</description> <productName>Ubuntu Linux 9.04 32 bits</productName> <iconUrl> http://repository.com/s3direct/ubuntu-9.04/ubuntu_logo.png</iconUrl> <diskFormatType>VMDK_SPARSE</diskFormatType> <diskFileSize>764</diskFileSize> <osType>UBUNTU</osType> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>IDE</diskControllerType> </templateDefinition> </templateDefinitions>

Create a template definition

If you have an OVF Envelope document available in an HTTP URL(e.g http://foo.com/ovf/) you can use it to add as a template definition into Abiquo.Category and Icon links: you can add new icons and categories while creating a Template Definition by adding the icon path in the title field of the link and/or the category name in the title field. Template definitions created using this method do not belong to any template definition list.

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitions

Request Headers: Accept:application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1; Content-type: application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1;

Request Message Body Entity: TemplateDefinition Media Type
Response Message Body Entity: TemplateDefinition Media Type

Create a template definition example
curl --verbose -u user:password -X POST https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions \
-H 'Content-type: application/vnd.abiquo.templatedefinition+xml;version=3.1' \
-d '<templateDefinition>
<link href="https://portal.cloud.claranet.com/api/config/categories/7" rel="category" title="Operative Systems,base"/>
<url>http://foo.com/ovf/desc.ovf</url>
<productName>MyCustomTemplate</productName>
<description>Just a test</description>
<iconUrl>http://icons.repository.com/namenode.jpg</iconUrl>
<diskFileSize>2048</diskFileSize>
<diskFormatType>VMDK_FLAT</diskFormatType>
</templateDefinition>'

> POST /api/admin/enterprises/1/appslib/templateDefinitions HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> Content-type: application/vnd.abiquo.templatedefinition+xml;version=3.1
> Content-Length: 481
>
< HTTP/1.1 201 Creado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NTc1MTM0Njo3MTBlM2JlMWUxYmUyY2JjYWJjYWUyNWQ5NWU5YmJjODpBQklRVU8; Expires=Fri, 01-Feb-2013 19:09:11 GMT; Path=/api
< Location: https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115
< Set-Cookie: JSESSIONID=28839E79BAFE1DBA60104B1E9ADFA34B.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinition+xml;version=3.1
< Content-Length: 821
< Date: Fri, 01 Feb 2013 18:39:11 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinition> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link title="Operative Systems,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115"/> <id>115</id> <url>http://rs.bcn.repository.com:9000/ovf/10/desc.ovf</url> <description>Just a test</description> <productName>MyCustomTemplate</productName> <iconUrl>http://icons.repository.com/namenode.jpg</iconUrl> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>2048</diskFileSize> <osType>OTHER_64</osType> </templateDefinition>

Retrieve a template definition

Get the content of a Template Definition.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitions/{templateDefinition}

Request Headers: Accept:application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1; Content-type: ;
Response Message Body Entity: TemplateDefinition Media Type

Retrieve a template definition example
curl --verbose -u user:password -X GET https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115

> GET /api/admin/enterprises/1/appslib/templateDefinitions/115 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NTk4ODY5MDplZWFlYzI5MTU2NjM0ZDYxNWU0MjZiMTIxOGUxZGM3NTpBQklRVU8; Expires=Fri, 01-Feb-2013 19:13:08 GMT; Path=/api
< Set-Cookie: JSESSIONID=0D66747D8DCB2970CD998AD44FDE2B9B.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinition+xml;version=3.1
< Content-Length: 821
< Date: Fri, 01 Feb 2013 18:43:08 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinition> <link title="Operative Systems,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <id>115</id> <url>http://rs.bcn.repository.com:9000/ovf/10/desc.ovf</url> <description>Just a test</description> <productName>MyCustomTemplate</productName> <iconUrl>http://icons.repository.com/namenode.jpg</iconUrl> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>2048</diskFileSize> <osType>OTHER_64</osType> </templateDefinition>

Modify a template definition

Updates the content of a Template Definition. The new attribute values do not affect virtual machine templates that were already downloaded.

Synopsis: PUT https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitions/{templateDefinition}

Request Headers: Accept:application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1; Content-type: application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1;

Request Message Body Entity: TemplateDefinition Media Type
Response Message Body Entity: TemplateDefinition Media Type

Modify a template definition example
curl --verbose -u user:password -X PUT 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115' \
-H "Content-type:application/vnd.abiquo.templatedefinition+xml" -d \
'<templateDefinition>
<link title="Operative Systems,base" rel="category"
type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8" />
<link rel="edit"
type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115" />
<link rel="enterprise"
type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1" />
<id>115</id>
<url>http://rs.bcn.repository.com:9000/ovf/10/desc.ovf</url>
<description>Just a test</description>
<productName>MyCustomTemplate</productName>
<iconUrl>http://icons.repository.com/namenode.jpg</iconUrl>
<diskFormatType>RAW</diskFormatType>
<diskFileSize>2048</diskFileSize>
<osType>OTHER_64</osType>
</templateDefinition>'

> PUT /api/admin/enterprises/1/appslib/templateDefinitions/115 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> Content-type:application/vnd.abiquo.templatedefinition+xml
> Content-Length: 809
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NjE3NDYwMzoyZTE2MGNkZTE1NWI2OTVmODZlMjY3ZGE2ZGMxZDA0OTpBQklRVU8; Expires=Fri, 01-Feb-2013 19:16:14 GMT; Path=/api
< Set-Cookie: JSESSIONID=31632F339D478FED728417723A8D25F1.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.templatedefinition+xml;version=3.1
< Content-Length: 815
< Date: Fri, 01 Feb 2013 18:46:14 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <templateDefinition> <link title="Operative Systems,base" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/8"/> <link rel="edit" type="application/vnd.abiquo.templatedefinition+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <id>115</id> <url>http://rs.bcn.repository.com:9000/ovf/10/desc.ovf</url> <description>Just a test</description> <productName>MyCustomTemplate</productName> <iconUrl>http://icons.repository.com/namenode.jpg</iconUrl> <diskFormatType>RAW</diskFormatType> <diskFileSize>2048</diskFileSize> <osType>OTHER_64</osType> </templateDefinition>

Delete a template definition

If the current Template Definition being deleted is used in a Template Definition List, then the list is updated to exclude the deleted Template Definition. If the template is downloaded (a virtual machine template exists) then this method does NOT delete from the datacenter repository. It only makes the current template definition unavailable for downloading again.

Synopsis: DELETE https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/appslib/templateDefinitions/{templateDefinition}

Delete a template definition example
curl --verbose -u user:password -X DELETE 'https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/115'


> DELETE /api/admin/enterprises/1/appslib/templateDefinitions/115 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 204 Sin Contenido
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0NjI1OTg3ODowNThjZTc3YTZjY2EwMWI1NjllY2FlZDMzZmI1ZTVlYTpBQklRVU8; Expires=Fri, 01-Feb-2013 19:17:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=2EFA97C53E9FC2A3258C5F368B8EF745.nodeAlbert; Path=/api
< Date: Fri, 01 Feb 2013 18:47:39 GMT
<

Retrieve limits by datacenter

Retrieve the limits of a Datacenter given its identifier.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/limits
Request Headers: Accept:application/vnd.abiquo.limits+json; version=3.1;application/vnd.abiquo.limits+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

datacenter

false

 

Optional. Identifier of the datacenter. If informed only check for the
association with this datacenter (if it is allowed).


Response Message Body Entity: DatacentersLimits Media Type

Retrieve limits by datacenter example
curl -X GET https://portal.cloud.claranet.com/api/admin/datacenters/1/action/getlimits\
-H 'Accept: application/vnd.abiquo.limits+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/admin/datacenters/1/action/getlimits HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.limits+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:07 GMT
Set-Cookie: JSESSIONID=B43A8F690911D3B0A27E1CA0BBFFD8BF; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwNzI2ODpiZTExMjYwZDZmM2U3YTY0ZjE3NGVkNTE4NDFlNmZlNTpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:07 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.limits+xml;version=3.1
Content-Length: 4014

<?xml version="1.0" encoding="UTF-8"?> <limits> <limit> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits/1/action/virtualappliances" rel="action" title="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="datacenter" title="JC-b46300d9-bc6"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits/1/datacenter" rel="datacenterByLimit" title="JC-b46300d9-bc6" type="application/vnd.abiquo.datacenter+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits/1" rel="edit" type="application/vnd.abiquo.limit+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits/1/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/limits/1/hypervisors" rel="hypervisor" type="application/vnd.abiquo.hypervisortypes+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/2" rel="tier" title="Default Tier 2" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/3" rel="tier" title="Default Tier 3" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/4" rel="tier" title="Default Tier 4" type="application/vnd.abiquo.tier+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>1</id> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </limit> <limit> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/action/virtualappliances" rel="action" title="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1" rel="datacenter" title="JC-b46300d9-bc6"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/datacenter" rel="datacenterByLimit" title="JC-b46300d9-bc6" type="application/vnd.abiquo.datacenter+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2" rel="edit" type="application/vnd.abiquo.limit+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/hypervisors" rel="hypervisor" type="application/vnd.abiquo.hypervisortypes+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/2" rel="tier" title="Default Tier 2" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/3" rel="tier" title="Default Tier 3" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/datacenters/1/storage/tiers/4" rel="tier" title="Default Tier 4" type="application/vnd.abiquo.tier+xml"/> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <repositoryHard>0</repositoryHard> <repositorySoft>0</repositorySoft> </limit> </limits>

Get the list of external networks

Get the external networks available for the given limit.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks

Request Headers: Accept:application/vnd.abiquo.vlans+json; version=3.1;application/vnd.abiquo.vlans+xml; version=3.1; ; Content-type:;

Response Message Body Entity: VLANNetworks Media Type

Get the list of external networks example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks\
-H 'Accept: application/vnd.abiquo.vlans+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.vlans+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:09 GMT
Set-Cookie: JSESSIONID=0278DEB1B5A46794F1CA3C7318C1204C; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwOTcyNjoyMTdhYzVlNzY3YmU2MDRlZmU1YWRhMzEyNzFjYTRiZDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:09 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlans+xml;version=3.1
Content-Length: 2279
<?xml version="1.0" encoding="UTF-8"?> <networks> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/action/default" rel="getdefault" title="GET" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/action/default" rel="setinternalsdefault" title="PUT" type="application/vnd.abiquo.vlan+xml"/> <network> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2" rel="edit" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="ips" type="application/vnd.abiquo.externalips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/action/default" rel="setdefault" title="PUT"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration/1" rel="network_configuration" title="10.0.0.0/24" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <address>10.0.0.0</address> <dhcpOptions/> <gateway>10.0.0.1</gateway> <id>2</id> <mask>24</mask> <name>ExternalNetwork</name> <tag>7</tag> <type>EXTERNAL</type> </network> <network> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/3" rel="edit" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/3/ips" rel="ips" type="application/vnd.abiquo.unmanagedips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/3/action/default" rel="setdefault" title="PUT"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration/1" rel="network_configuration" title="10.0.0.0/24" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <address>10.0.1.0</address> <dhcpOptions/> <gateway>10.0.1.1</gateway> <id>3</id> <mask>24</mask> <name>UnmanagedNetwork</name> <tag>8</tag> <type>UNMANAGED</type> </network> <network> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/9" rel="edit" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/9/ips" rel="ips" type="application/vnd.abiquo.unmanagedips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/9/action/default" rel="setdefault" title="PUT"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration/1" rel="network_configuration" title="10.0.0.0/24" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <address>10.0.1.0</address> <dhcpOptions/> <gateway>10.0.1.1</gateway> <id>9</id> <mask>24</mask> <name>Unmanaged network Updated</name> <primaryDNS>8.8.8.8</primaryDNS> <secondaryDNS>8.8.8.8</secondaryDNS> <tag>8</tag> <type>UNMANAGED</type> </network> </networks>

Get external network details

Retrieve information of the external network.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}
Request Headers: Accept:application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1;  Content-type:;
Response Message Body Entity: VLANNetwork Media Type

Get external network details example
curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2\
-H 'Accept: application/vnd.abiquo.vlan+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.vlan+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=E4DAA3C78D55BF761C8AC5098E1A05E3; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3Mjc0ODozM2VjMzkwMDJiNWQyYTBmODMwOWViNTg3ZWJiODc1MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
Content-Length: 646
<?xml version="1.0" encoding="UTF-8"?>
<network>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2" rel="edit" type="application/vnd.abiquo.vlan+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="ips" type="application/vnd.abiquo.externalips+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/action/default" rel="setdefault" title="PUT"/>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration/1" rel="network_configuration" title="10.0.0.0/24" type="application/vnd.abiquo.networkconfiguration+xml"/>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/>
<address>10.0.0.0</address>
<dhcpOptions/>
<gateway>10.0.0.1</gateway>
<id>2</id>
<mask>24</mask>
<name>ExternalNetwork</name>
<tag>7</tag>
<type>EXTERNAL</type>
</network>

Get external network IP

Retrieve a single IP from the given external network.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips/{ips}
Request Headers: Accept:application/vnd.abiquo.externalip+json; version=3.1;application/vnd.abiquo.externalip+xml; version=3.1; Content-type: ;
Response Message Body Entity: AbstractIp Media Type

Get external network IP example
curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips/255\
-H 'Accept: application/vnd.abiquo.externalip+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips/255 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.externalip+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=CD8B8EA258379E738BC8BCFA5F506EE4; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3MjU4OTo5YmEwMGY1OGYyYjhmYWQ5ZDBlNjYyNjRjODM0MTQyZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.externalip+xml;version=3.1
Content-Length: 1341
<?xml version="1.0" encoding="UTF-8"?> <externalip> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2" rel="externalnetwork" title="ExternalNetwork" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="ips" type="application/vnd.abiquo.externalips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips/255" rel="self" title="externalip" type="application/vnd.abiquo.externalip+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1" rel="virtualappliance" title="Virtual AppAloha updated" type="application/vnd.abiquo.virtualappliance+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="Aloha updated" type="application/vnd.abiquo.virtualdatacenter+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1" rel="virtualmachine" title="ABQ_5ca657fa-ed61-4aa4-95b9-cd76d46ed63c" type="application/vnd.abiquo.virtualmachine+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration/1" rel="network_configuration" title="10.0.0.0/24" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>255</id> <ip>10.0.0.1</ip> <mac>00:50:56:2b:c6:60</mac> <name>0050562bc660_host</name> <networkName>ExternalNetwork</networkName> <available>true</available> <quarantine>false</quarantine> </externalip>

Get external network list of IPs

Retrieve a list of IPs in an external network. See the'Request Parameters' section for information on how to filter the search.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips

Request Headers: Accept:application/vnd.abiquo.externalips+json; version=3.1;application/vnd.abiquo.externalips+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve.

by

false

ip

How to order the search. Available values are: {IP,QUARANTINE, MAC, LEASE, VLAN,
VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE,ENTERPRISENAME}

has

false

 

a way to filter the search. It can be filtered by: IP address, MAC address,
network name, Virtual Machine name, Virtual Appliance name or Enterprise Name

limit

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascendant-> true,descendant -> false). Ascendant by
default.

free

false

 

set if we should return all the IPs (default) or only the available ones.


Response Message Body Entity: AbstractIps Media Type

Get external network list of IPs example
curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips?limit=0\
-H 'Accept: application/vnd.abiquo.externalips+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips?limit=0 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.externalips+xml;version=3.1

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Wed, 16 Jan 2013 14:11:19 GMT
Set-Cookie: auth=YWRtaW46MTM1ODM0NzI3OTkzOTpiYTI2ZDMxYTZhNDJlMDRhNzA2YTZmMDU4MzJiMGQ1MjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:41:19 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.externalips+xml;version=3.1
<?xml version="1.0" encoding="UTF-8"?> <externalips> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="first"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips?startwith=0" rel="last"/> <totalSize>254</totalSize> <externalip> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2" rel="externalnetwork" title="ExternalNetwork" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="ips" type="application/vnd.abiquo.externalips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips/255" rel="self" title="externalip" type="application/vnd.abiquo.externalip+xml"/> <id>255</id> <ip>10.0.0.1</ip> <networkName>ExternalNetwork</networkName> <available>true</available> <quarantine>false</quarantine> </externalip> <externalip> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2" rel="externalnetwork" title="ExternalNetwork" type="application/vnd.abiquo.vlan+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips" rel="ips" type="application/vnd.abiquo.externalips+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/limits/2/externalnetworks/2/ips/256" rel="self" title="externalip" type="application/vnd.abiquo.externalip+xml"/> <id>256</id> <ip>10.0.0.2</ip> <networkName>ExternalNetwork</networkName> <available>true</available> <quarantine>false</quarantine> </externalip> </externalips>

Retrieve all datacenter repositories

Retrieve all the datacenter repositories for an allowed datacenter of the current enterprise. See EnterpriseLimitsByDatacentersResource.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories
Request Headers: Accept:application/vnd.abiquo.datacenterrepositories+json; version=3.1;application/vnd.abiquo.datacenterrepositories+xml; version=3.1; Content-type: ;
Response Message Body Entity: DatacenterRepositories Media Type

Retrieve all datacenter repositories example
curl --verbose -X GET -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories
> GET /api/admin/enterprises/1/datacenterrepositories HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MjgzNjUwNzpiOTJhNDEyMTg3OGY1ZWM2Mzg1N2JhOWIzNzNlOGZiYTpBQklRVU8; Expires=Fri, 01-Feb-2013 18:20:36 GMT; Path=/api
< Set-Cookie: JSESSIONID=8E7FC32DB36A5AFB74E12EBF00AB18AB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.datacenterrepositories+xml;version=3.1
< Content-Length: 1138
< Date: Fri, 01 Feb 2013 17:50:36 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <datacenterRepositories> <datacenterRepository> <link rel="applianceManagerRepositoryUri" href="http://10.60.1.223:80/am/erepos/1"/> <link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/2"/> <link rel="edit" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="refresh" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2/actions/refresh"/> <link rel="virtualmachinetemplates" type="application/vnd.abiquo.virtualmachinetemplates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates"/> <name>virtual image repo</name> <repositoryLocation> 10.60.1.223:/opt/myownrepository</repositoryLocation> <repositoryCapacityMb>0</repositoryCapacityMb> <repositoryRemainingMb>0</repositoryRemainingMb> </datacenterRepository> </datacenterRepositories>

Retrieve a datacenter repository

Get information about a datacenter repository, and optionally synchronize with the repository filesystem.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}
Request Headers: Accept:application/vnd.abiquo.datacenterrepository+json; version=3.1;application/vnd.abiquo.datacenterrepository+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

refresh

false

 

communicate with the datacenter services to add new virtual machine templates
present in the repository filesystem but not in the abiquo API. @deprecated use
''refreshDatacenterRepository''

usage

false

 

communicate with the datacenter services in order to include the
repository filesytem usage.

Request Message Body Entity:
Response Message Body Entity: DatacenterRepository Media Type

Retrieve a datacenter repository example
curl --verbose -u user:password -X GET 'https://portal.cloud.claranet.com/api//admin/enterprises/1/datacenterrepositories/2'

> GET /api//admin/enterprises/1/datacenterrepositories/2 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MzIxNDg2ODphNmRjMDcxZmY3YTJjMjdhOGNkMmMyN2M2OWRjMTJhNDpBQklRVU8; Expires=Fri, 01-Feb-2013 18:26:54 GMT; Path=/api
< Set-Cookie: JSESSIONID=C8167EC2FFE8BBF22509974B07E3EBE3.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.datacenterrepository+xml;version=3.1
< Content-Length: 1089
< Date: Fri, 01 Feb 2013 17:56:54 GMT
<
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <datacenterRepository> <link rel="applianceManagerRepositoryUri" href="http://10.60.1.223:80/am/erepos/1"/> <link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/2"/> <link rel="edit" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="refresh" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2/actions/refresh"/> <link rel="virtualmachinetemplates" type="application/vnd.abiquo.virtualmachinetemplates+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates"/> <name>virtual image repo</name> <repositoryLocation> 10.60.1.223:/opt/myownrepository</repositoryLocation> <repositoryCapacityMb>0</repositoryCapacityMb> <repositoryRemainingMb>0</repositoryRemainingMb> </datacenterRepository>

Refresh a datacenter repository to detect new virtual machine templates

Perform a request inside the datacenter (ApplianceManager service) in order to detect and register new virtual machine templates in the repository filesystem (templates that were added without Abiquo intervention).

Synopsis: PUT https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/actions/refresh

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: ;

Response Message Body Entity: AcceptedRequest Media Type

Refresh a datacenter repository to detect new virtual machine templates example
curl --verbose -u user:password -X PUT "http://user:password@portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/actions/refresh"
* About to connect() to portal.cloud.claranet.com port 443 (#0)
* Trying portal.cloud.claranet.com... connected
* Server auth using Basic with user 'admin'
> PUT /api/admin/enterprises/1/datacenterrepositories/1/actions/refresh HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NjkwNDY3Mjg2MTplMjZkZmVmMmMyZjJhZjVhNTQ2OWM3OTFkZWYwZDZiNDpBQklRVU8; Expires=Mon, 19-Aug-2013 09:31:12 GMT; Path=/api
< Set-Cookie: JSESSIONID=A2A4063A32899DA74E9AE8C2A9BCDD48.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=3.1
< Content-Length: 413
< Date: Mon, 19 Aug 2013 09:01:13 GMT
<
* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <acceptedrequest> <link rel="status" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/tasks/24cc61ac-a7b9-49ca-9540-2dada570a802"/> <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message> </acceptedrequest>

Retrieve all virtual machine templates

Returns all virtual machine templates.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates

Request Headers: Accept:application/vnd.abiquo.virtualmachinetemplates+json; version=3.1;application/vnd.abiquo.virtualmachinetemplates+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

categoryName

false

 

name of a category

hypervisorTypeName

false

 

type of an hypervisor

virtualdatacenter

false

 

identifier of a virtual datacenter

stateful

false

 

string value to inclued persistent templates, it can be ALL, USED or NOTUSED

imported

false

false

boolean to include imported templates

ostype

false

 

comma separated value, optionally filter by operating systems (null for no filter)

64bits

false

 

optionally filter by x64 architecture. It requires''ostype'' param set to null
(null for any filter)

startwith

false

0

first element to retrieve

by

false

id

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

source

false

LOCAL

LOCAL: only retrieve templates in the database
REMOTE: (public cloud only) search in the provider, it doesn't contain already LOCAL templates
ALL: (public cloud only) both LOCAL and REMOTE templates,may contains duplicated templates (local and remote representation for the same template)


Response Message Body Entity: VirtualMachineTemplates Media Type

Retrieve all virtual machine templates example
curl --verbose -u user:password portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -X GET -H "accept:application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2NjQ4ODk4NTo1N2Q0NmE5NDFhMTUyYmE0ZDBiMzg2OTE1MWM0NGJmMDpBQklRVU8; Expires=Wed, 30-Jan-2013 17:21:28 GMT; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1
< Transfer-Encoding: chunked
< Date: Wed, 30 Jan 2013 16:51:29 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachineTemplates> <link rel="first" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates?limit=25&amp;by=id"/> <link rel="last" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates?startwith=0&amp;limit=25&amp;by=id"/> <totalSize>25</totalSize> <virtualMachineTemplate> <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/> <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/conversions"/> <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/> <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/> <link rel="diskfile" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=diskFile"/> <link title="Abiquo KVM" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="ovfdocument" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=envelope"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/tasks"/> <link rel="template" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F71%252Fdesc.ovf"/> <link rel="templatedefinition" href="http://rs.bcn.repository.com:9000/ovf/71/desc.ovf"/> <link rel="templatestatus" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=status"/> <id>15</id> <name>Abiquo KVM</name> <description/> <osType>UNRECOGNIZED</osType> <osVersion/> <path>1/ovf/71/KVM-Recursion.qcow2</path> <diskFormatType>QCOW2_SPARSE</diskFormatType> <diskFileSize>320798720</diskFileSize> <cpuRequired>1</cpuRequired> <ramRequired>1024</ramRequired> <hdRequired>4294967296</hdRequired> <shared>false</shared> <state>DONE</state> <creationDate>2013-01-30T17:51:18+01:00</creationDate> <creationUser>SYSTEM</creationUser> <chefEnabled>false</chefEnabled> <iconUrl>http://rs.bcn.repository.com:9000/public/icons/q.png</iconUrl> <loginUser>user</loginUser> <loginPassword>password</loginPassword> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>SCSI</diskControllerType> </virtualMachineTemplate> <virtualMachineTemplate> <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/> <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19/conversions"/> <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/> <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/> <link rel="diskfile" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=diskFile"/> <link title="Abiquo VirtualBox Node v2" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="ovfdocument" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=envelope"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19/tasks"/> <link rel="template" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F53%252Fdesc.ovf"/> <link rel="templatedefinition" href="http://rs.bcn.repository.com:9000/ovf/53/desc.ovf"/> <link rel="templatestatus" href="https://portal.cloud.claranet.com/am/erepos/1/templates/rs.bcn.repository.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=status"/> <id>19</id> <name>Abiquo VirtualBox Node v2</name> <description>Abiquo VirtualBox Node</description> <osType>UNRECOGNIZED</osType> <osVersion/> <path>1/ovf/53/abiquo-vbox-v2.qcow2</path> <diskFormatType>QCOW2_SPARSE</diskFormatType> <diskFileSize>381400576</diskFileSize> <cpuRequired>1</cpuRequired> <ramRequired>512</ramRequired> <hdRequired>4294967296</hdRequired> <shared>false</shared> <state>DONE</state> <creationDate>2013-01-30T17:51:18+01:00</creationDate> <creationUser>SYSTEM</creationUser> <chefEnabled>false</chefEnabled> <iconUrl>http://rs.bcn.repository.com:9000/public/icons/q.png</iconUrl> <loginUser>user</loginUser> <loginPassword>password</loginPassword> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>SCSI</diskControllerType> </virtualMachineTemplate> </virtualMachineTemplates>

Create a new persistent template

This functionality creates a new persistent template from an existing template. To create the persistent template, the disk of the existing template will be dumped on a volume. the response sent to this method contains: - two properties: - the name for the new volume - the name for the new template - three required links: - the link of the original template, which has the disk to dump to the volume - the link of the virtual datacenter, where the template will be accessible - a link with the information about the storage device where the disk will be dumped, which could be a link to a specific volume or a link to a tier where a new volume will be created.

Important: this process requires a RAW conversion of the original template. If this conversion does not exist, it will be created as the first step of the process.

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetemplatepersistent+json;version=3.1;application/vnd.abiquo.virtualmachinetemplatepersistent+xml;version=3.1;
Request Parameters:

Request Message Body Entity: VirtualMachineTemplatePersistent Media Type
Response Message Body Entity: AcceptedRequest Media Type

Create a new persistent template example
curl --verbose -u user:password -X POST portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -H "content-type:application/vnd.abiquo.virtualmachinetemplatepersistent+xml;version=3.1" -H "accept:application/vnd.abiquo.acceptedrequest+xml;version=3.1" -d @persistent.xml

> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.4.4 libidn/1.23 librtmp/2.4
> Host: portal.cloud.claranet.com
> content-type:application/vnd.abiquo.virtualmachinetemplatepersistent+xml;version=3.1
> accept:application/vnd.abiquo.acceptedrequest+xml;version=3.1
> Content-Length: 624


< HTTP/1.1 202 Aceptado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU0MDI0ODQzOTo2ZjAzNmU4ZmIyNjFkYzgzZDJhNTYyNTY4NDUwYjNhMTpBQklRVU8; Expires=Wed, 30-Jan-2013 10:04:08 GMT; Path=/api
< Set-Cookie: JSESSIONID=57AF984D8C3558456417F2CEFEBAE866; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=3.1
< Content-Length: 441
< Date: Wed, 30 Jan 2013 09:34:10 GMT


<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <acceptedrequest> <link rel="status" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/29/tasks/db8de1ea-169b-4344-bdef-0bf5117d5fb2"/> <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message> </acceptedrequest>

Request creation of a new virtual machine template in the datacenter repository

There are two ways to create a new virtual machine template:Download: use a ''TemplateDefinition'' link in the VirtualMachineTemplateRequestDto Promote: use an instance''VirtualMachineTemplate'' link and the ''promotedName'' in VirtualMachineTemplateRequestDto

Both methods pre-create the virtual machine template and return a task to track the progress.

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetemplaterequest+json;version=3.1;application/vnd.abiquo.virtualmachinetemplaterequest+xml;version=3.1;
Request Parameters:

Request Message Body Entity: VirtualMachineTemplateRequest Media Type
Response Message Body Entity: AcceptedRequest Media Type

Request creation of a new virtual machine template in the datacenter repository example
// creating a template from a template definition link

curl -X POST "https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates" \
-H 'Content-Type: application/vnd.abiquo.virtualmachinetemplaterequest+xml;version=3.1' \
-H 'Accept: application/vnd.abiquo.acceptedrequest+xml;version=3.1' \
-d '<virtualmachinetemplaterequest>
<link rel="templateDefinition" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/appslib/templateDefinitions/5"/>
</virtualmachinetemplaterequest>' -u user:password

="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link rel="status" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5"/>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

// creating a template from a template link

curl -X POST "https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates" \
-H 'Content-Type: application/vnd.abiquo.virtualmachinetemplaterequest+xml;version=3.1' \
-H 'Accept: application/vnd.abiquo.acceptedrequest+xml;version=3.1' \
-d '<virtualmachinetemplaterequest>
<link rel="virtualmachinetemplate" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/10"/>
<promotedName>myVeryOwnTemplate</promotedName>
</virtualmachinetemplaterequest>' -u user:password

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link rel="status" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/11/tasks/1de13d2e-6a06-4357-93e2-2f36c7c8f4ee"/>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

//You can track the download progress of the task by using the ''taskextended'' media type. Look at the ''progress'' attibute or ''errorCause'' //for failed downloads.

curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5 \
-H 'Accept: application/vnd.abiquo.taskextended+xml;version=3.1' \
-u user:password

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<taskextended>
<link rel="parent" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks" />
<link rel="self" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5" />
<ownerId>9</ownerId>
<state>STARTED</state>
<taskId>767987c3-5363-4356-9293-1b04abe75eb5</taskId>
<timestamp>1352112228</timestamp>
<type>DOWNLOAD</type>
<userId>admin</userId>
<jobsExtended>
<jobextended>
<description>Download task's download on virtual machine
template with id 9</description>
<id>acdc8daa-128f-4259-b29d-16a7eab6284f</id>
<parentTaskId>
767987c3-5363-4356-9293-1b04abe75eb5</parentTaskId>
<rollbackState>UNKNOWN</rollbackState>
<state>STARTED</state>
<timestamp>1352112448</timestamp>
<type>DOWNLOAD</type>
<progress>5</progress>
</jobextended>
</jobsExtended>
</taskextendedTo cancel the download task delete the precreated virtual machine template.

Install template in datacenterrepository based on TemplateDefinition representation

Request a virtual machine template download into a datacenter repository.

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.templatedefinition+json; version=3.1;application/vnd.abiquo.templatedefinition+xml; version=3.1;

Request Message Body Entity: TemplateDefinition Media Type
Response Message Body Entity: AcceptedRequest Media Type

Install template in datacenterrepository based on TemplateDefinition representation example
curl --verbose -u user:password -X POST portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -H "content-type:application/vnd.abiquo.templatedefinition+xml;version=3.1" -H "accept:application/vnd.abiquo.acceptedrequest+xml;version=3.1" -d @dtos/templatedefinition.xml


> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.acceptedrequest+xml;version=3.1
> content-type:application/vnd.abiquo.templatedefinition+xml;version=3.1
> Content-Length: 525


< HTTP/1.1 202 Aceptado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM2MzI1ODQ0MTgxMTpmZjIwZmY2NGE4Y2YwYjdhN2JlZWVmNGQ3YzFhNjI3YTpBQklRVU8; Expires=Thu, 14-Mar-2013 10:54:01 GMT; Path=/api
< Set-Cookie: JSESSIONID=5E1195809DDA3F7570F30B370B3079A1; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=3.1
< Content-Length: 439
< Date: Thu, 14 Mar 2013 10:24:02 GMT


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link rel="status" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/2/tasks/f5cf66c4-ce19-436f-9f40-f3535f2f28f4"/>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

Retrieve a task for a virtual machine template

Displays a specific task on the virtual machine template.Tasks are a set of jobs (operations on hypervisors). Any of these tasks may still be in progress. Every task has a UUID.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/tasks/{id}

Request Headers: Accept:application/vnd.abiquo.task+json; version=3.1;application/vnd.abiquo.task+xml; version=3.1;  Content-type:;

Response Message Body Entity: Task Media Type

Retrieve a task for a virtual machine template example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d -X GET -H "accept:application/vnd.abiquo.task+xml;version=3.1"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.task+xml;version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzIyNzY5Mzo3NWRkZmY4ZDUyM2Q5YmFmNDJhNWJhZjI3NWNhMDE1ODpBQklRVU8; Expires=Thu, 31-Jan-2013 10:13:47 GMT; Path=/api
< Set-Cookie: JSESSIONID=E55F6C171504DFD98EEA70EC3C3AF7EB; Path=/api
< Content-Type: application/vnd.abiquo.task+xml;version=3.1
< Content-Length: 1196
< Date: Thu, 31 Jan 2013 09:43:47 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <task> <link rel="parent" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/> <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/> <link rel="self" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/> <creationTimestamp>1359624796</creationTimestamp> <jobs> <job> <creationTimestamp>1359624796</creationTimestamp> <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description> <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id> <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1359624815</timestamp> <type>DUMP_DISK_TO_VOLUME</type> </job> </jobs> <ownerId>26</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId> <timestamp>1359624815</timestamp> <type>MAKE_PERSISTENT</type> <userId>admin</userId> </task>

Retrieve a virtual machine template

Returns a virtual machine template.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}
Request Headers: Accept:application/vnd.abiquo.virtualmachinetemplate+json; version=3.1;application/vnd.abiquo.virtualmachinetemplate+xml; version=3.1; Content-type: ;

Response Message Body Entity: VirtualMachineTemplate Media Type

Retrieve a virtual machine template example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X GET -H "accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2Njk3MDQ3Mzo0MDEzZTM4YjI0M2FhODgxODlkOWRjZWI2ZTIyN2M2ZjpBQklRVU8; Expires=Wed, 30-Jan-2013 17:29:30 GMT; Path=/api
< Set-Cookie: JSESSIONID=9A2DDF016A4D0C96FD255BCC5C96B04F; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1
< Content-Length: 2758
< Date: Wed, 30 Jan 2013 16:59:30 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachineTemplate> <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/> <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/conversions"/> <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/> <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/> <link rel="diskfile" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=diskFile"/> <link title="m0n0wall" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="ovfdocument" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=envelope"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/tasks"/> <link rel="template" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf"/> <link rel="templatedefinition" href="http://promoted/myVeryOwnTemplate/myVeryOwnTemplate.ovf"/> <link rel="templatestatus" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=status"/> <id>8</id> <name>m0n0wall</name> <description>m0n0wall is a project aimed at creating a complete, embedded firewall software package that, when used together with an embedded PC, provides all the important features of commercial firewall boxes (including ease of use) at a fraction of the price (free</description> <osType>LINUX_2_6</osType> <path>1/promoted/myVeryOwnTemplate/myVeryOwnTemplate.vmdk</path> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>27262976</diskFileSize> <cpuRequired>1</cpuRequired> <ramRequired>128</ramRequired> <hdRequired>27262976</hdRequired> <shared>false</shared> <state>DONE</state> <creationDate>2013-01-30T17:51:17+01:00</creationDate> <creationUser>SYSTEM</creationUser> <chefEnabled>false</chefEnabled> <iconUrl>http://abispace.s3.amazonaws.com/m0n0wall/m0n0wall_logo.png</iconUrl> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>IDE</diskControllerType> </virtualMachineTemplate>

Retrieve all tasks

Displays the tasks on the virtual machine template. Tasks are a set of jobs (operations). Any of these tasks may still be in progress.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/tasks

Request Headers: Accept:application/vnd.abiquo.tasks+json; version=3.1;application/vnd.abiquo.tasks+xml; version=3.1; Content-type: ;

Response Message Body Entity: Tasks Media Type

Retrieve all tasks example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks -X GET -H "accept:application/vnd.abiquo.tasks+xml;version=3.1"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.tasks+xml;version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzEzMjM1NDpkNzM0NzJmNTRjMTliNTA1MGY1NDM1ODk3YjViYTYwNjpBQklRVU8; Expires=Thu, 31-Jan-2013 10:12:12 GMT; Path=/api
< Set-Cookie: JSESSIONID=D6EA26DAEDF45109097C03E9C2E79804; Path=/api
< Content-Type: application/vnd.abiquo.tasks+xml;version=3.1
< Content-Length: 1461
< Date: Thu, 31 Jan 2013 09:42:12 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <tasks> <link rel="self" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/> <link rel="parent" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/> <task> <link rel="parent" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/> <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/> <link rel="self" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/> <creationTimestamp>1359624796</creationTimestamp> <jobs> <job> <creationTimestamp>1359624796</creationTimestamp> <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description> <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id> <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1359624815</timestamp> <type>DUMP_DISK_TO_VOLUME</type> </job> </jobs> <ownerId>26</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId> <timestamp>1359624815</timestamp> <type>MAKE_PERSISTENT</type> <userId>admin</userId> </task> </tasks>

Modify a vitual machine template

Modifies a virtual machine template.

There are the possibility to modify the recommended hardware profiles by adding the proper links. HardwareProfiles page should tell how to retrieve them.

Synopsis: PUT https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}

Request Headers: Accept:application/vnd.abiquo.virtualmachinetemplate+json; version=3.1;application/vnd.abiquo.virtualmachinetemplate+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetemplate+json; version=3.1;application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1;

Request Message Body Entity: VirtualMachineTemplate Media Type
Response Message Body Entity: VirtualMachineTemplate Media Type

Modify a vitual machine template example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X PUT -H "accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1" -H "content-type:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1" -d @dtos/template.xml

> PUT /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1
> content-type:application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1
> Content-Length: 2987

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2NzUzMTk3OTo4YzUzMjVkNzRlZTc0NWU3MDUzOWQ3MTlkYjVhNzgyNDpBQklRVU8; Expires=Wed, 30-Jan-2013 17:38:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=FBCB7CCE046FB0F716D8784DAB14BBCF; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplate+xml;version=3.1
< Content-Length: 2755
< Date: Wed, 30 Jan 2013 17:08:52 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachineTemplate> <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/> <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/conversions"/> <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/> <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/> <link rel="diskfile" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=diskFile"/> <link title="m0n0wall updated" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="ovfdocument" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=envelope"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/tasks"/> <link rel="template" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf"/> <link rel="templatedefinition" href="http://promoted/myVeryOwnTemplate/myVeryOwnTemplate.ovf"/> <link rel="templatestatus" href="https://portal.cloud.claranet.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=status"/> <link rel="hardwareprofile" href="https://portal.cloud.claranet.com/api/cloud/locations/1/hardwareprofiles/6" title="t1.micro"/> <link rel="hardwareprofile" href="https://portal.cloud.claranet.com/api/cloud/locations/1/hardwareprofiles/8" title="t2.small"/> <id>8</id> <name>m0n0wall updated</name> <description>m0n0wall is a project aimed at creating a complete, embedded firewall software package that, when used together with an embedded PC, provides all the important features of commercial firewall boxes (including ease of use) at a fraction of the price (free</description> <osType>LINUX_2_6</osType> <path>1/promoted/myVeryOwnTemplate/myVeryOwnTemplate.vmdk</path> <diskFormatType>VMDK_FLAT</diskFormatType> <diskFileSize>27262976</diskFileSize> <cpuRequired>1</cpuRequired> <ramRequired>128</ramRequired> <hdRequired>27262976</hdRequired> <shared>false</shared> <creationDate>2013-01-30T17:51:17+01:00</creationDate> <creationUser>SYSTEM</creationUser> <chefEnabled>false</chefEnabled> <iconUrl>http://abispace.s3.amazonaws.com/m0n0wall/m0n0wall_logo.png</iconUrl> <ethernetDriverType>E1000</ethernetDriverType> <diskControllerType>IDE</diskControllerType> </virtualMachineTemplate>

Delete a virtual machine template

Deletes a virtual machine template.

Synopsis: DELETE https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}

Request Headers: Accept: ; Content-type: ;

Delete a virtual machine template example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X DELETE

> DELETE /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*

< HTTP/1.1 204 No Content

Make unavailable a virtual machine template

If the virtual machine template is in use (instances or virtual machines) it can't be deleted, but it can be marked as unavailable, this will remove the template disk file from the repository filesystem but keept the API reference as a virtual machine template with state = UNAVAILABLE

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/deletefile

Request Headers: Accept: ; Content-type: ;

Delete a virtual machine template example
curl --verbose -u user:password -X POST "http://user:password@portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/deletefile"
* About to connect() to portal.cloud.claranet.com port 443 (#0)
* Trying portal.cloud.claranet.com... connected
* Server auth using Basic with user 'admin'
> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/deletefile HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 204 No Content

Retrieve a task including additional job info (progress,errorCause) for a virtual machine template

Displays a specific task on the virtual machine template.Tasks are a set of jobs (operations on hypervisors). Any of these tasks may still be in progress. Every task has a UUID. Job includes downloading progress or error cause.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/tasks/{id}

Request Headers: Accept:application/vnd.abiquo.taskextended+json; version=3.1;application/vnd.abiquo.taskextended+xml; version=3.1; Content-type: ;

Response Message Body Entity: TaskExtended Media Type

Retrieve a task including additional job info (progress,errorCause) for a virtual machine template example
curl --verbose -u user:password https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d -X GET -H "accept:application/vnd.abiquo.taskextended+xml;version=3.1"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> accept:application/vnd.abiquo.taskextended+xml;version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzI5NjA1NTo2YzE0MzE5MzU3MmU1YzViNjgxODY1ZDlmNmMxN2E5ZTpBQklRVU8; Expires=Thu, 31-Jan-2013 10:14:56 GMT; Path=/api
< Set-Cookie: JSESSIONID=CF17A6EF50AD63A1DA78F1C969373AC9; Path=/api
< Content-Type: application/vnd.abiquo.taskextended+xml;version=3.1
< Content-Length: 1146
< Date: Thu, 31 Jan 2013 09:44:56 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <taskextended> <link rel="parent" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/> <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/> <link rel="self" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/> <ownerId>26</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId> <timestamp>1359624815</timestamp> <type>MAKE_PERSISTENT</type> <userId>admin</userId> <jobsExtended> <jobextended> <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description> <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id> <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1359624815</timestamp> <type>DUMP_DISK_TO_VOLUME</type> </jobextended> </jobsExtended> </taskextended>

Retrieve the virtual machine templates instances using the current template

Returns all the virtual machine templates instances of the current (master) virtual machine template

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/instances

Request Headers: Accept:application/vnd.abiquo.virtualmachinetemplates+json; version=3.1;application/vnd.abiquo.virtualmachinetemplates+xml; version=3.1; Content-type: ;

Response Message Body Entity: VirtualMachineTemplates Media Type

Retrieve all virtual machine templates example
curl --verbose -u user:password -X GET "http://user:password@portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances"
* About to connect() to portal.cloud.claranet.com port 443 (#0)
* Trying portal.cloud.claranet.com... connected
* Server auth using Basic with user 'admin'
> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NjkwNTc3NDk0NTo4N2UyMTc0ZDIzNzJmOTg3YTQ1ZWVjOTJmYTM0MDg5NjpBQklRVU8; Expires=Mon, 19-Aug-2013 09:49:34 GMT; Path=/api
< Set-Cookie: JSESSIONID=6E222337A478712A8794E8DFF97EF1AB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1
< Content-Length: 3408
< Date: Mon, 19 Aug 2013 09:19:34 GMT
<
="1.0" encoding="UTF-8" standalone="yes"?><virtualMachineTemplates><virtualMachineTemplate><link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/><link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/><link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/><link title="27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9"/><link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks"/><link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/><link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/conversions"/><link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/action/virtualmachines"/><link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/><link rel="template" href="http://foo.com/ovf/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="templatedefinition" href="/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="template" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><id>9</id><name>27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core</name><description>root : abiquo</description><osType>UNRECOGNIZED</osType><osVersion></osVersion><path>/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2</path><diskFormatType>QCOW2_SPARSE</diskFormatType><diskFileSize>12976128</diskFileSize><cpuRequired>1</cpuRequired><ramRequired>64</ramRequired><hdRequired>104857600</hdRequired><shared>false</shared><state>DONE</state><creationDate>2013-08-19T11:19:25+02:00</creationDate><creationUser* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
>SYSTEM</creationUser><chefEnabled>false</chefEnabled><iconUrl>http://rs.bcn.repository.com:9000/public/icons/tinycore.png</iconUrl><loginUser>user</loginUser><loginPassword>password</loginPassword><ethernetDriverType>E1000</ethernetDriverType><diskControllerType>SCSI</diskControllerType></virtualMachineTemplate></virtualMachineTemplates

Retrieve the virtual machine using the current template

Returns all the virtual machine with relation to the current virtual machine template

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/virtualmachines

Request Headers: Accept:application/vnd.abiquo.virtualmachine+json; version=3.1;application/vnd.abiquo.virtualmachine+xml; version=3.1; Content-type: ;

Response Message Body Entity: VirtualMachineTemplates Media Type

Retrieve all virtual machine templates example
curl --verbose -u user:password -X GET "http://user:password@portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances"
* About to connect() to portal.cloud.claranet.com port 443 (#0)
* Trying portal.cloud.claranet.com... connected
* Server auth using Basic with user 'admin'
> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NjkwNTc3NDk0NTo4N2UyMTc0ZDIzNzJmOTg3YTQ1ZWVjOTJmYTM0MDg5NjpBQklRVU8; Expires=Mon, 19-Aug-2013 09:49:34 GMT; Path=/api
< Set-Cookie: JSESSIONID=6E222337A478712A8794E8DFF97EF1AB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1
< Content-Length: 3408
< Date: Mon, 19 Aug 2013 09:19:34 GMT
<
="1.0" encoding="UTF-8" standalone="yes"?><virtualMachineTemplates><virtualMachineTemplate><link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com/api/admin/datacenters/1"/><link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/><link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com/api/config/categories/1"/><link title="27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9"/><link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks"/><link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1"/><link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/conversions"/><link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/action/virtualmachines"/><link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/><link rel="template" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="templatedefinition" href="1/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="template" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://foo.com/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><id>9</id><name>27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core</name><description>root : abiquo</description><osType>UNRECOGNIZED</osType><osVersion></osVersion><path>/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2</path><diskFormatType>QCOW2_SPARSE</diskFormatType><diskFileSize>12976128</diskFileSize><cpuRequired>1</cpuRequired><ramRequired>64</ramRequired><hdRequired>104857600</hdRequired><shared>false</shared><state>DONE</state><creationDate>2013-08-19T11:19:25+02:00</creationDate><creationUser* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
>SYSTEM</creationUser><chefEnabled>false</chefEnabled><iconUrl>http://rs.bcn.repository.com:9000/public/icons/tinycore.png</iconUrl><loginUser>user</loginUser><loginPassword>password</loginPassword><ethernetDriverType>E1000</ethernetDriverType><diskControllerType>SCSI</diskControllerType></virtualMachineTemplate></virtualMachineTemplates

Retrieve Users.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users
Request Headers: Accept:application/vnd.abiquo.users+json; version=3.1;application/vnd.abiquo.users+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

The first element to be retrieved of the filtered search.

limit

false

25

The number of entities to retrieve.

has

false

""

A way to filter the search.

by

false

name

Sort preference. Depends on the resource,this value affects different to the request.

asc

false

true

If the value of the 'by' parameter must be sorted in ascending way (true) or descending way(false)

connected

false

 

true to search for currently connected users


Response Message Body Entity: Users Media Type

Retrieve Users example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/users\
-H 'Accept: application/vnd.abiquo.users+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/users HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.users+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:07:09 GMT
Set-Cookie: JSESSIONID=23A4AF44796108B3CD478F70C1ADABE3; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzAzMDA0Nzo1NjdhNDNkN2ZlYmY2YjcwM2M0ZjgzODJlMDlhMWI3MjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:10 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.users+xml;version=3.1
Content-Length: 1903
<?xml version="1.0" encoding="UTF-8"?> <users> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users" rel="first"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users?startwith=0" rel="last"/> <totalSize>2</totalSize> <user> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/4" rel="edit" type="application/vnd.abiquo.user+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/roles/3" rel="role" type="application/vnd.abiquo.role+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/4/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <active>true</active> <authType>ABIQUO</authType> <description>JC-abfb9f4d-f88</description> <email>JC-2f9ab5bd-78a@claranet.com</email> <id>4</id> <locale>en_US</locale> <name>JC-9f0b8183-c41</name> <nick>jclouds-admin</nick> <password>21232f297a57a5a743894a0e4a801fc3</password> <surname>JC-cd8c3de1-d7f</surname> </user> <user> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3" rel="edit" type="application/vnd.abiquo.user+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/roles/4" rel="role" type="application/vnd.abiquo.role+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <active>true</active> <authType>ABIQUO</authType> <description>JC-40363169-f0d</description> <email>JC-fe4011a3-18e@claranet.com</email> <id>3</id> <locale>en_US</locale> <name>JC-f4135d8c-40b</name> <nick>jclouds</nick> <password>d6ed7ca0720aaba96e4674098d61aad9</password> <surname>JC-a6fa192c-219</surname> </user> </users>

Retrieve a User

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users/{user}
Request Headers: Accept:application/vnd.abiquo.user+json; version=3.1;application/vnd.abiquo.user+xml; version=3.1;  Content-type:;
Request Parameters:

Parameter

Required

Default Value

Description

name

false

false

Set to True if we only need to retrieve user name


Response Message Body Entity: User Media Type

Retrieve a User example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3\
-H 'Accept: application/vnd.abiquo.user+xml; version=3.1' \
-u user:password --verbose

GET https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.user+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:07:10 GMT
Set-Cookie: JSESSIONID=361ADA5DEB7B3E69831015901BDBDFEE; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzAzMDM3OTo4OTViNzJmMzZhN2Y3ZDlhNmYyYTY5MDM2NDYxYjIxYjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:10 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.user+xml;version=3.1
Content-Length: 864
<?xml version="1.0" encoding="UTF-8"?> <user> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3" rel="edit" type="application/vnd.abiquo.user+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/roles/4" rel="role" type="application/vnd.abiquo.role+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/2/users/3/action/virtualmachines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml"/> <active>true</active> <authType>ABIQUO</authType> <description>JC-40363169-f0d</description> <email>JC-fe4011a3-18e@claranet.com</email> <id>3</id> <locale>en_US</locale> <name>Manolo</name> <nick>jclouds</nick> <password>70e1376c34ea5293e62b1091f07c6bd1</password> <surname>JC-a6fa192c-219</surname> </user>

Retrieve all applications

Return the list of Applications you have available to work with.

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users/{user}/applications
 
Request Headers: Accept: application/vnd.abiquo.applications+json; version=3.1;application/vnd.abiquo.applications+xml; version=3.1;

Response Message Body Entity: Applications Media Type

Retrieve all applications example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications \
-H 'Accept: application/vnd.abiquo.applications+xml; version=3.1' \
-u user:password --verbose

> GET /api/admin/enterprises/1/users/2/applications HTTP/1.1
> User-Agent: curl/7.29.0
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.applications+xml; version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=63E47A07A4788102CDC1345169B9CFD2; Path=/api/; HttpOnly
< Content-Type: application/vnd.abiquo.applications+xml; version=3.1
< Content-Length: 7482

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<applications>
<application>
<link title="OAuth Example App" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1"/>
<link title="User" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>1</id>
<name>OAuth Example App</name>
<description>An example application</description>
<apiKey>abf987f3-7069-474f-be92-c2e96d43c138</apiKey>
<apiSecret>U8WUmRrGURhv5R2LRATAL4mRTaf4KOSLaFaAay2G</apiSecret>
</application>
<application>
<link title="Another App" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/2"/>
<link title="User" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>2</id>
<name>Another App</name>
<description>Another example application</description>
<apiKey>2efa34dd-3095-4243-8b33-8a46f08a0bb2</apiKey>
<apiSecret>CyJZizWK4LEz9JNxhkWoMMi65Fb6UmhAwgsI0RNI</apiSecret>
</application>
</applications>

Create an application

This method is the one that creates Applications

Synopsis: POST https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users/{user}/applications
 
Request Headers: Accept:application/vnd.abiquo.application+json; version=3.1;application/vnd.abiquo.application+xml; version=3.1; Content-type: application/vnd.abiquo.application+json; version=3.1;application/vnd.abiquo.application+xml; version=3.1;

Request Message Body Entity:  Application Media Type
Response Message Body Entity:   Application Media Type

Create an application example
$ curl -X POST https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications \
-H 'Accept: application/vnd.abiquo.application+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.application+xml; version=3.1' \
-d @application.xml \
-u user:password --verbose

> POST /api/admin/enterprises/1/users/2/applications HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.application+xml; version=3.1
> Content-type: application/vnd.abiquo.application+xml; version=3.1

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0MDI4MjAxMDo2ZWM1NzY2ZWMyMjQ2NjNjYjMyZTE3OTUzYjBhMWI4MzpBQklRVU8; Expires=Tue, 01-Oct-2013 15:11:22 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/2/applications/1
< Set-Cookie: JSESSIONID=A5BE28324F7B88138544443E78784441; Path=/api
< Content-Type: application/vnd.abiquo.application+xml;version=3.1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application>
<link title="OAuth Example App" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1"/>
<link title="User" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>1</id>
<name>OAuth Example App</name>
<description>An example application</description>
<apiKey>abf987f3-7069-474f-be92-c2e96d43c138</apiKey>
<apiSecret>U8WUmRrGURhv5R2LRATAL4mRTaf4KOSLaFaAay2G</apiSecret>
</application>

Retrieve an application

Return an Application if it exists

Synopsis: GET https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users/{user}/applications/{application}
 
Request Headers: Accept: application/vnd.abiquo.application+json; version=3.1;application/vnd.abiquo.application+xml; version=3.1;

Response Message Body Entity:  Application Media Type

Retrieve an application example
$ curl -X GET https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1 \
-H 'Accept: application/vnd.abiquo.application+xml; version=3.1' \
-u user:password --verbose

> GET /api/admin/enterprises/1/users/2/applications/1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.application+xml; version=3.1

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=63E47A07A4788102CDC1345169B9CFD2; Path=/api/; HttpOnly
< Content-Type: application/vnd.abiquo.application+xml; version=3.1
< Content-Length: 7482

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application>
<link title="OAuth Example App" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1"/>
<link title="User" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>1</id>
<name>OAuth Example App</name>
<description>An example application</description>
<apiKey>abf987f3-7069-474f-be92-c2e96d43c138</apiKey>
<apiSecret>U8WUmRrGURhv5R2LRATAL4mRTaf4KOSLaFaAay2G</apiSecret>
</application>

Delete an application

Return an Application if it exists

Synopsis: DELETE https://portal.cloud.claranet.com/api/admin/enterprises/{enterprise}/users/{user}/applications/{application}

Delete all applications example
$ curl -X DELETE https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1 \
-u user:password --verbose

> DELETE /api/admin/enterprises/1/users/2/applications/1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: portal.cloud.claranet.com
> Accept: */*

< HTTP/1.1 204 No Content
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=0A19306672AFC9C057C656591610350A; Path=/api/; HttpOnly

Retrieve all virtual datacenters

Return the list of Virtual Datacenters you have available to work with.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters

Request Headers: Accept: application/vnd.abiquo.virtualdatacenters+json; version=3.1;application/vnd.abiquo.virtualdatacenters+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

enterprise

false

 

identifier of an enterprise

datacenter

false

 

identifier of a datacenter

startwith

false

0

first element to retrieve

by

false

name

parameter for ordering. Valid values are:"id", "hypervisorType", "name", "vlan"

has

false

 

name to filter the results

limit

false

25

total number of elements in the result set

asc

false

true

true/false for ascending/descending order


Response Message Body Entity: VirtualDatacenters Media Type

Retrieve all virtual datacenters example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters\
-H 'Accept: application/vnd.abiquo.virtualdatacenters+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualdatacenters+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDYzODU4MTk2Mzo4YmE2OGFkNjRjOWYyODcxMzZjNDkzZjgwZDhlZWVmYzpBQklRVU8; Expires=Tue, 01-Oct-2013 14:43:01 GMT; Path=/api
< Set-Cookie: JSESSIONID=98E7F3F21C0F36C6A7B8FCB1C6AA8581; Path=/api
< Content-Type: application/vnd.abiquo.virtualdatacenters+xml;version=3.1
< Content-Length: 4445
< Date: Tue, 01 Oct 2013 14:13:01 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualDatacenters>
<virtualDatacenter>
<link title="BB_VDC_01" rel="edit" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<link title="private networks" rel="privatenetworks" type="application/vnd.abiquo.vlans+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks"/>
<link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/>
<link title="public networks" rel="network" type="application/vnd.abiquo.vlans+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network"/>
<link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/>
<link title="virtual appliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances"/>
<link title="default network" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="private ips" rel="privateips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/privateips"/>
<link title="external ips" rel="externalips" type="application/vnd.abiquo.externalips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/externalips"/>
<link title="unmanaged ips" rel="unmanagedips" type="application/vnd.abiquo.unmanagedips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/unmanagedips"/>
<link title="GET" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/defaultvlan"/>
<link title="PUT" rel="defaultvlan" type="application/vnd.abiquo.links+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/defaultvlan"/>
<link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/volumes"/>
<link title="disks" rel="disks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/disks"/>
<link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase"/>
<link title="ips purchased" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased"/>
<link title="volumes" rel="statefulcandidates" type="application/vnd.abiquo.volumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/volumes/action/statefulcandidates"/>
<link title="tiers" rel="tiers" type="application/vnd.abiquo.tiers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/tiers"/>
<link title="available templates" rel="templates" type="application/vnd.abiquo.virtualmachinetemplates+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/templates"/>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<id>3</id>
<hypervisorType>KVM</hypervisorType>
<name>BB_VDC_01</name>
<network>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<link title="default_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips"/>
<link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
<id>3</id>
<name>default_private_network</name>
<address>192.168.0.0</address>
<mask>24</mask>
<gateway>192.168.0.1</gateway>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>2</tag>
<type>INTERNAL</type>
<dhcpOptions/>
</network>
</virtualDatacenter>
</virtualDatacenters>

Retrieve a Virtual Datacenter

Retrieve a virtual datacenter.
Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}

Request Headers: Accept:application/vnd.abiquo.virtualdatacenter+json; version=3.1;application/vnd.abiquo.virtualdatacenter+xml; version=3.1;

Response Message Body Entity: VirtualDatacenter Media Type

Retrieve a Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4\
-H 'Accept: application/vnd.abiquo.virtualdatacenter+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/4 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualdatacenter+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0MDc1MDAyNToyYzJiZThhMzFiMGMzMDkxNzc1MDU4ZjZjZjlhN2ZkNTpBQklRVU8; Expires=Tue, 01-Oct-2013 15:19:10 GMT; Path=/api
< Set-Cookie: JSESSIONID=1F77319933C220E4635BDC7FF5DFEA43; Path=/api
< Content-Type: application/vnd.abiquo.virtualdatacenter+xml;version=3.1
< Content-Length: 4344
< Date: Tue, 01 Oct 2013 14:49:10 GMT
<

="1.0" encoding="UTF-8" standalone="yes"?>
<virtualDatacenter>
<link title="BCN_VDC_02" rel="edit" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4"/>
<link title="private networks" rel="privatenetworks" type="application/vnd.abiquo.vlans+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/privatenetworks"/>
<link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/>
<link title="public networks" rel="network" type="application/vnd.abiquo.vlans+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network"/>
<link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/>
<link title="virtual appliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances"/>
<link title="default network" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/privatenetworks/4"/>
<link title="private ips" rel="privateips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/privateips"/>
<link title="external ips" rel="externalips" type="application/vnd.abiquo.externalips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/externalips"/>
<link title="unmanaged ips" rel="unmanagedips" type="application/vnd.abiquo.unmanagedips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/unmanagedips"/>
<link title="GET" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/defaultvlan"/>
<link title="PUT" rel="defaultvlan" type="application/vnd.abiquo.links+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/defaultvlan"/>
<link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/volumes"/>
<link title="disks" rel="disks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/disks"/>
<link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/publicips/topurchase"/>
<link title="ips purchased" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/publicips/purchased"/>
<link title="volumes" rel="statefulcandidates" type="application/vnd.abiquo.volumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/volumes/action/statefulcandidates"/>
<link title="tiers" rel="tiers" type="application/vnd.abiquo.tiers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/tiers"/>
<link title="available templates" rel="templates" type="application/vnd.abiquo.virtualmachinetemplates+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/action/templates"/>
<cpuHard>20</cpuHard>
<cpuSoft>18</cpuSoft>
<ramHard>20480</ramHard>
<ramSoft>19456</ramSoft>
<hdHard>279172872</hdHard>
<hdSoft>279172872</hdSoft>
<storageHard>322122547</storageHard>
<storageSoft>289910292</storageSoft>
<vlansHard>2</vlansHard>
<vlansSoft>1</vlansSoft>
<publicIpsHard>2</publicIpsHard>
<publicIpsSoft>2</publicIpsSoft>
<id>4</id>
<hypervisorType>KVM</hypervisorType>
<name>BCN_VDC_02</name>
<network>
<link title="BCN_VDC_02" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4"/>
<link title="DefaultNetwork" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/privatenetworks/4"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/privatenetworks/4/ips"/>
<link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
<id>4</id>
<name>DefaultNetwork</name>
<address>192.168.2.0</address>
<mask>24</mask>
<gateway>192.168.2.1</gateway>
<type>INTERNAL</type>
<dhcpOptions/>
</network>
</virtualDatacenter>

Get the default VLAN used in the Virtual Datacenter

Get the default VLAN used in the Virtual Datacenter.
Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/defaultvlan

Request Headers: Accept: application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1;

Response Message Body Entity: VLANNetwork Media Type
Request Example:

$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/action/defaultvlan\
-H 'Accept: application/vnd.abiquo.vlan+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/action/defaultvlan HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlan+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0MTIyMDY5NDo1YTcxMGY4YzM3OGY5NGMzYzZkMGUzMTU1YTUwMzU5NjpBQklRVU8; Expires=Tue, 01-Oct-2013 15:27:00 GMT; Path=/api
< Set-Cookie: JSESSIONID=57CCDFF7F2476738BFCEB955F9FA0A6A; Path=/api
< Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
< Content-Length: 967
< Date: Tue, 01 Oct 2013 14:57:00 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<link title="default_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips"/>
<link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
<id>3</id>
<name>default_private_network</name>
<address>192.168.0.0</address>
<mask>24</mask>
<gateway>192.168.0.1</gateway>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>2</tag>
<type>INTERNAL</type>
<dhcpOptions/>
</network>

Returns all external IPs from a Virtual Datacenter

Returns all external IPs from a Virtual Datacenter; the result can be filtered and paginated.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/externalips

Request Headers: Accept: application/vnd.abiquo.externalips+json; version=3.1;application/vnd.abiquo.externalips+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

ip

ordering the request ("ip" by default)

has

false

 

filter the request (empty by default)

limit

false

25

number of elements to return

asc

false

true

order ascending or descending (asc by default)

all

false

false

retrieve all results (false by default)

Request Message Body Entity:
Response Message Body Entity: ExternalIps Media Type
Request Example:

$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/action/externalips\
-H 'Accept: application/vnd.abiquo.externalips+xml;version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/action/externalips HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.externalips+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0MjkwNTIxNTo3MTMwZmY0YTM3YmRkNDI0ZDZlNjQ0ZWE1ZTc1NWExZTpBQklRVU8; Expires=Tue, 01-Oct-2013 15:55:05 GMT; Path=/api
< Set-Cookie: JSESSIONID=113702D34556392A1D24A059D808ED13; Path=/api
< Content-Type: application/vnd.abiquo.externalips+xml;version=3.1
< Content-Length: 2351
< Date: Tue, 01 Oct 2013 15:25:05 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<externalips>
<link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/externalips?limit=25&amp;by=ip"/>
<link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/externalips?startwith=0&amp;limit=25&amp;by=ip"/>
<totalSize>3</totalSize>
<externalip>
<link title="B_Corporate_Network" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.externalips+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips"/>
<link title="10.10.10.2" rel="self" type="application/vnd.abiquo.externalip+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips/1022"/>
<id>1022</id>
<ip>10.10.10.2</ip>
<networkName>B_Corporate_Network</networkName>
<available>true</available>
<quarantine>false</quarantine>
</externalip>
<externalip>
<link title="B_Corporate_Network" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.externalips+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips"/>
<link title="10.10.10.3" rel="self" type="application/vnd.abiquo.externalip+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips/1023"/>
<id>1023</id>
<ip>10.10.10.3</ip>
<networkName>B_Corporate_Network</networkName>
<available>true</available>
<quarantine>false</quarantine>
</externalip>
<externalip>
<link title="B_Corporate_Network" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5"/>
<link title="ips" rel="ips" type="application/vnd.abiquo.externalips+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips"/>
<link title="10.10.10.4" rel="self" type="application/vnd.abiquo.externalip+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/5/ips/1024"/>
<id>1024</id>
<ip>10.10.10.4</ip>
<networkName>B_Corporate_Network</networkName>
<available>true</available>
<quarantine>false</quarantine>
</externalip>
</externalips>

Return all private IPs from a Virtual Datacenter

Return all private IPs from a Virtual Datacenter; the result can be filtered and paginated.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/privateips

Request Headers: Accept: application/vnd.abiquo.privateips+json; version=3.1;application/vnd.abiquo.privateips+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

 

first element to retrieve

by

false

ip

ordering the request ("ip" by default)

has

false

 

filter the request (empty by default)

limit

false

25

number of elements to return

asc

false

true

order ascending or descending (asc by default)

all

false

false

retrieve all results (false by default)

Request Message Body Entity:
Response Message Body Entity: PrivateIps Media Type
Request Example:

  Returns all private IPs from a Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/action/privateips\
-H 'Accept: application/vnd.abiquo.privateips+xml;version=3.1' \
-u user:password --verbose


> GET /api/cloud/virtualdatacenters/3/action/privateips HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.privateips+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0NTQyMjMzNDo4ODQ2ZjhjMGU3MmExMGVlNDM1OGMwZTcwNjI5ZDk3NDpBQklRVU8; Expires=Tue, 01-Oct-2013 16:37:02 GMT; Path=/api
< Content-Type: application/vnd.abiquo.privateips+xml;version=3.1
< Transfer-Encoding: chunked
< Date: Tue, 01 Oct 2013 16:07:02 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<privateips>
<link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/privateips?limit=25&amp;by=ip"/>
<link rel="next" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/privateips?startwith=25&amp;limit=25&amp;by=ip"/>
<link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/privateips?startwith=229&amp;limit=25&amp;by=ip"/>
<totalSize>254</totalSize>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/512"/>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<id>512</id>
<ip>192.168.0.1</ip>
<mac>52:54:00:CF:4A:96</mac>
<name>525400CF4A96_host</name>
<networkName>default_private_network</networkName>
</privateip>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/513"/>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<link title="bb_va_01" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3"/>
<link title="ABQ_aa2b0e03-6bff-443e-bf94-b988bb577fce" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines/4"/>
<id>513</id>
<ip>192.168.0.2</ip>
<mac>52:54:00:17:80:B8</mac>
<name>5254001780B8_host</name>
<networkName>default_private_network</networkName>
</privateip>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/514"/>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<id>514</id>
<ip>192.168.0.3</ip>
<mac>52:54:00:6A:D6:66</mac>
<name>5254006AD666_host</name>
<networkName>default_private_network</networkName>
</privateip>
<privateip>
<link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/>
<link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/515"/>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<id>515</id>
<ip>192.168.0.4</ip>
<mac>52:54:00:30:76:A7</mac>
<name>5254003076A7_host</name>
<networkName>default_private_network</networkName>
</privateip>
</privateips

Retrieve a public IP to be used in a Virtual Machine in the Virtual Datacenter

Get a public IP to be used in a Virtual Machine in the Virtual Datacenter.
Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased/{ip}

Request Headers: Accept: application/vnd.abiquo.publicip+json; version=3.1;application/vnd.abiquo.publicip+xml; version=3.1;

Response Message Body Entity: PublicIp Media Type

Retrieve a public IP to be used in a Virtual Machine in the Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/publicips/purchased/1276\
-H 'Accept: application/vnd.abiquo.publicip+xml;version=3.1' \
-u user:password --verbose
> GET /api/cloud/virtualdatacenters/3/publicips/purchased/1276 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicip+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0NjM2NjIwNzo3ZjU2ZTIyYTA5ZWJjMzM3Y2U5ZTczYzY0YmRjODIwZDpBQklRVU8; Expires=Tue, 01-Oct-2013 16:52:46 GMT; Path=/api
< Set-Cookie: JSESSIONID=B00BF7AFDEE82A7C78A3695BB35E4A82; Path=/api
< Content-Type: application/vnd.abiquo.publicip+xml;version=3.1
< Content-Length: 1063
< Date: Tue, 01 Oct 2013 16:22:46 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publicip>
<link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/>
<link title="purchased ips" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/purchased"/>
<link title="10.5.5.242" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1276"/>
<link title="PUT" rel="release" type="application/vnd.abiquo.publicip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1276"/>
<link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/>
<id>1276</id>
<ip>10.5.5.242</ip>
<mac>52:54:00:D2:63:BE</mac>
<name>525400D263BE_host</name>
<networkName>B_Public_Network</networkName>
<available>true</available>
<quarantine>false</quarantine>
</publicip>

Retrieve the list of purchased public IPs

Retrieve the list of purchased public IPs. These are the public IPs available to be used in any of the virtual machines defined in the Virtual Datacenter.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased

Request Headers: Accept: application/vnd.abiquo.publicips+json; version=3.1;application/vnd.abiquo.publicips+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

onlyavailable

false

false

 

startwith

false

0

first element to retrieve.

by

false

ip

how to order the search.

has

false

 

a way to filter the search.

limit

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascending-> true,descending -> false). ascending by
default.

vlanId

false

 

 

Request Message Body Entity:
Response Message Body Entity: PublicIps Media Type

Retrieve the list of purchased public IPs example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/publicips/purchased\
-H 'Accept: application/vnd.abiquo.publicips+xml;version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/publicips/purchased HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicips+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0NjE2NjM3MTozMTQ1MDI4ZTI3NzFiNjlkNTFmYjQ3ZjU1YmQ0ZmM0YTpBQklRVU8; Expires=Tue, 01-Oct-2013 16:49:26 GMT; Path=/api
< Set-Cookie: JSESSIONID=A7FF3DD77D3FC38524B77F4D902C2A77; Path=/api
< Content-Type: application/vnd.abiquo.publicips+xml;version=3.1
< Content-Length: 2367
< Date: Tue, 01 Oct 2013 16:19:26 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <publicips> <link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased?limit=25&amp;by=ip"/> <link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased?startwith=0&amp;limit=25&amp;by=ip"/> <totalSize>2</totalSize> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="purchased ips" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/purchased"/> <link title="10.5.5.242" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1276"/> <link title="PUT" rel="release" type="application/vnd.abiquo.publicip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1276"/> <link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <id>1276</id> <ip>10.5.5.242</ip> <mac>52:54:00:D2:63:BE</mac> <name>525400D263BE_host</name> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="purchased ips" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/purchased"/> <link title="10.5.5.243" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1277"/> <link title="PUT" rel="release" type="application/vnd.abiquo.publicip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1277"/> <link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <id>1277</id> <ip>10.5.5.243</ip> <mac>52:54:00:67:99:28</mac> <name>525400679928_host</name> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip> </publicips>

Retrieve the list of public IPs to be purchased by a Virtual Datacenter

Get a list of public IPs available to be purchased by a Virtual Datacenter. These are the public IPs offered by a Datacenter and available to be adquired by Virtual Datacenters.Until the IPs are purchased, they cannot be used by any Virtual Machine in the VDC.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase

Request Headers: Accept: application/vnd.abiquo.publicips+json; version=3.1;application/vnd.abiquo.publicips+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve.

by

false

ip

how to order the search.

has

false

 

a way to filter the search.

limit

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascending-> true,descending -> false). ascending by
default.

vlanId

false

 

 


Response Message Body Entity: PublicIps Media Type

Retrieve the list of public IPs to be purchased by a Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/publicips/topurchase\
-H 'Accept: application/vnd.abiquo.publicips+xml;version=3.1' \
-u user:password --verbose
> GET /api/cloud/virtualdatacenters/3/publicips/topurchase HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicips+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0Njc0NjkyNTo0OWI2YzI0YTQyMjBiMmFhMTNkZjliYWRiYWViYzZiYzpBQklRVU8; Expires=Tue, 01-Oct-2013 16:59:06 GMT; Path=/api
< Set-Cookie: JSESSIONID=C81C5397AAD079B8EE402507FFF4A9BD; Path=/api
< Content-Type: application/vnd.abiquo.publicips+xml;version=3.1
< Content-Length: 1911
< Date: Tue, 01 Oct 2013 16:29:07 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <publicips> <link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase?limit=25&amp;by=ip"/> <link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase?startwith=0&amp;limit=25&amp;by=ip"/> <totalSize>2</totalSize> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase"/> <link title="10.5.5.244" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1278"/> <link title="PUT" rel="purchased" type="purchase" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1278"/> <id>1278</id> <ip>10.5.5.244</ip> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase"/> <link title="10.5.5.245" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1279"/> <link title="PUT" rel="purchased" type="purchase" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1279"/> <id>1279</id> <ip>10.5.5.245</ip> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip> </publicips>

Retrieve a public IP to be purchased by a Virtual Datacenter

Retrieve a public IP to be purchased by a Virtual Datacenter.
Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase/{ip}

Request Headers: Accept: application/vnd.abiquo.publicip+json; version=3.1;application/vnd.abiquo.publicip+xml; version=3.1;

Response Message Body Entity: PublicIp Media Type

Retrieve a public IP to be purchased by a Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/publicips/topurchase/1278\
-H 'Accept: application/vnd.abiquo.publicips+xml;version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/publicips/topurchase/1278 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicip+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDcwNTMxNTQ1OTo1M2VlNWExMjYwZmE1N2ZkYmRlNzE4OTYzZjI0ZWExNDpBQklRVU8; Expires=Wed, 02-Oct-2013 09:15:15 GMT; Path=/api
< Set-Cookie: JSESSIONID=FC728E834E6FF200C88F6E4F5ED09C3F; Path=/api
< Content-Type: application/vnd.abiquo.publicip+xml;version=3.1
< Content-Length: 834
< Date: Wed, 02 Oct 2013 08:45:15 GMT
<
{ [data not shown]
100 834 100 834 0 0 4540 0 --:--:-- --:--:-- --:--:-- 4557
* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase"/> <link title="10.5.5.244" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1278"/> <link title="PUT" rel="purchased" type="purchase" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1278"/> <id>1278</id> <ip>10.5.5.244</ip> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip>

Retrieve the public VLANs used in a Virtual Datacenter

Returns all the VLAN data related to public VLANs that can be used by this Virtual Datacenter.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicvlans

Request Headers: Accept:application/vnd.abiquo.vlans+json; version=3.1;application/vnd.abiquo.vlans+xml; version=3.1; Content-type: ;

Response Message Body Entity: VLANNetworks Media Type

Retrieve the public VLANs used in a Virtual Datacenter example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/publicvlans \
-H 'Accept: application/vnd.abiquo.vlans+xml;version=3.1' \
-u user:password --verbose
> GET /api/cloud/virtualdatacenters/3/publicvlans HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlans+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0Nzg0Nzk2MjplNmFmOWFiNjM5MTI0M2MzZDFiMmExYzEyNjE4YzU4MzpBQklRVU8; Expires=Tue, 01-Oct-2013 17:17:27 GMT; Path=/api
< Set-Cookie: JSESSIONID=3D08A169172581D3185FDF0D9BE052FF; Path=/api
< Content-Type: application/vnd.abiquo.vlans+xml;version=3.1
< Content-Length: 1121
< Date: Tue, 01 Oct 2013 16:47:28 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <networks> <network> <link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/> <link title="B_Public_Network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="network services types" rel="networkservicetypes" type="application/vnd.abiquo.networkservicetypes+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <link title="public ips" rel="ips" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6/ips"/> <id>6</id> <name>B_Public_Network</name> <address>10.5.5.240</address> <mask>28</mask> <gateway>10.5.5.241</gateway> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <tag>99</tag> <type>PUBLIC</type> <dhcpOptions/> </network> </networks>

Retrieve a Public Network in a Virtualdatacenter

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicvlans/{publicvlan}

Request Headers: Accept: application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1;

Response Message Body Entity: VLANNetwork Media Type

Retrieve a VLANNetworkDto entity. example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/publicvlans/6 \
-H 'Accept: application/vnd.abiquo.vlan+xml;version=3.1' \
-u user:password --verbose
> GET /api/cloud/virtualdatacenters/3/publicvlans/6 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlan+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDY0Nzk3MDA5Mzo5YTNlZGQ4MDBhYzI4NDczZTQxYTQ4NWFkNGQ0OWVjMTpBQklRVU8; Expires=Tue, 01-Oct-2013 17:19:30 GMT; Path=/api
< Set-Cookie: JSESSIONID=D1FA7BF7F8F788AB4CA0C26B0A17644A; Path=/api
< Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
< Content-Length: 1100
< Date: Tue, 01 Oct 2013 16:49:30 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network>
<link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/>
<link title="B_Public_Network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/>
<link title="network services types" rel="networkservicetypes" type="application/vnd.abiquo.networkservicetypes+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes"/>
<link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
<link title="public ips" rel="ips" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6/ips"/>
<id>6</id>
<name>B_Public_Network</name>
<address>10.5.5.240</address>
<mask>28</mask>
<gateway>10.5.5.241</gateway>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>99</tag>
<type>PUBLIC</type>
<dhcpOptions/>
</network>

Retrieve Unmanaged IPs from the virtual datacenter

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/unmanagedips

Request Headers: Accept: application/vnd.abiquo.umanagedips+json; version=3.1;application/vnd.abiquo.umanagedips+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

 

first element to retrieve

by

false

ip

ordering the request ("ip" by default)

has

false

 

filter the request (empty by default)

limit

false

25

number of elements to return

asc

false

true

order ascending or descending (asc by default)

all

false

false

retrieve all results (false by default


Response Message Body Entity: UnmanagedIps Media Type

Retrieve a UnmanagedIpsDto entity. example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/action/unmanagedips \
-H 'Accept: application/vnd.abiquo.unmanagedips+xml;version=3.1' \
-u user:password --verbose
GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/action/unmanagedips HTTP/1.1

Accept: application/vnd.abiquo.unmanagedips+xml;version=3.1
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:07:19 GMT
Set-Cookie: JSESSIONID=A20259AB9B4F1000698868EDDBCAEF59; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzA0MDQxNTo5NDg0NjNmMzI0Y2M3YTc2MzAyOWIzZWFmZGU3OTZiODpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:20 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.unmanagedips+xml; version=3.1
Content-Length: 3832

<unmanagedips>
<link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/unmanagedips?limit=25&amp;by=ip"/><link rel="next" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/unmanagedips?startwith=25&amp;limit=25&amp;by=ip"/>
<link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1/action/unmanagedips?startwith=229&amp;limit=25&amp;by=ip"/>
<totalSize>254</totalSize>
<unmanagedip>
<link title="default_private_network" rel="internalnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1"/><link rel="ips" type="application/vnd.abiquo.unmanagedips+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1/ips"/>
<link title="unmanagedip" rel="self" type="application/vnd.abiquo.unmanagedip+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1/ips/1"/>
<link title="vdc" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/>
<id>1</id><ip>192.168.0.1</ip><mac>52:54:00:36:26:91</mac><name>525400362691_host</name><networkName>default_private_network</networkName><available>true</available><quarantine>false</quarantine>
</unmanagedip>
<unmanagedip>
<link title="default_private_network" rel="internalnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1"/><link rel="ips" type="application/vnd.abiquo.unmanagedips+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1/ips"/>
<link title="unmanagedip" rel="self" type="application/vnd.abiquo.unmanagedip+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/limits/1/externalnetworks/1/ips/2"/>
<link title="vdc" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/1"/>
<id>2</id><ip>192.168.0.2</ip><mac>52:54:00:c9:e6:79</mac><name>525400c9e679_host</name><networkName>default_private_network</networkName><available>true</available><quarantine>false</quarantine>
</unmanagedip>
<unmanagedips>

Retrieve a list of available virtual machine templates

Returns a list of virtual machine templates availables for the given datacenter. The idTemplate query parameter can be used to obtain only a single result in the templates list.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/templates

Request Headers: Accept: application/vnd.abiquo.virtualmachinetemplates+json; version=3.1;application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

categoryName

false

 

name of a catagory

idTemplate

false

 

id of a virtual machine template

stateful

false

 

boolean to include stateful templates

imported

false

false

 

ostype

false

 

 

64bits

false

 

 

startwith

false

0

 

by

false

id

 

has

false

 

 

limit

false

25

 

asc

false

true

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineTemplates Media Type

Retrieve a list of available virtual machine templates example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/action/templates?limit=2\
-H 'Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/action/templates?limit=2 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDcwNTA0NTc2Mzo0MzhmMDdhMjM0ZTg5ZGQ4NGQ2OGViMmI3NDYyNjkwMjpBQklRVU8; Expires=Wed, 02-Oct-2013 09:10:45 GMT; Path=/api
< Set-Cookie: JSESSIONID=23A1622C60EDC3595C85866BD4BDD29B; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=3.1
< Content-Length: 7151
< Date: Wed, 02 Oct 2013 08:40:45 GMT
<

="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplates>
<link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/templates?limit=2&amp;by=id"/>
<link rel="next" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/templates?startwith=2&amp;limit=2&amp;by=id"/>
<link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/action/templates?startwith=40&amp;limit=2&amp;by=id"/>
<totalSize>42</totalSize>
<virtualMachineTemplate>
<link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/>
<link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/>
<link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com:80/api/config/categories/1"/>
<link title="00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/21"/>
<link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/21/tasks"/>
<link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1"/>
<link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/21/conversions"/>
<link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/21/action/virtualmachines"/>
<link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/5"/>
<link rel="template" href="https://portal.cloud.claranet.com:80/am/erepos/1/templates/1/ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2"/>
<link rel="diskfile" href="https://portal.cloud.claranet.com:80//ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2"/>
<link rel="templatedefinition" href="1/ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2"/>
<link rel="template" href="https://portal.cloud.claranet.com:80/am/erepos/1/templates/1/ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2"/>
<link rel="diskfile" href="https://portal.cloud.claranet.com:80//ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2"/>
<id>21</id>
<name>00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core</name>
<description>root : abiquo</description>
<osType>UNRECOGNIZED</osType>
<osVersion></osVersion>
<path>1/ovf/305/00a5f25c-e9c5-4052-9dcb-20b7cfb72fed-snapshot-Core.qcow2</path>
<diskFormatType>QCOW2_SPARSE</diskFormatType>
<diskFileSize>12976128</diskFileSize>
<cpuRequired>1</cpuRequired>
<ramRequired>64</ramRequired>
<hdRequired>104857600</hdRequired>
<shared>false</shared>
<state>DONE</state>
<creationDate>2013-09-30T10:39:03+02:00</creationDate>
<creationUser>SYSTEM</creationUser>
<chefEnabled>false</chefEnabled>
<iconUrl>http://rs.bcn.repository.com:9000/public/icons/tinycore.png</iconUrl>
<loginUser>user</loginUser>
<loginPassword>password</loginPassword>
<ethernetDriverType>E1000</ethernetDriverType>
<diskControllerType>SCSI</diskControllerType>
</virtualMachineTemplate>
<virtualMachineTemplate>
<link title="BCN Datacenter" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1"/>
<link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/>
<link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="https://portal.cloud.claranet.com:80/api/config/categories/1"/>
<link title="01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/23"/>
<link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/23/tasks"/>
<link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1"/>
<link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/23/conversions"/>
<link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/23/action/virtualmachines"/>
<link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/5"/>
<link rel="template" href="https://portal.cloud.claranet.com:80/am/erepos/1/templates/1/ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2"/>
<link rel="diskfile" href="https://portal.cloud.claranet.com:80//ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2"/>
<link rel="templatedefinition" href="1/ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2"/>
<link rel="template" href="https://portal.cloud.claranet.com:80/am/erepos/1/templates/1/ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2"/>
<link rel="diskfile" href="https://portal.cloud.claranet.com:80//ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2"/>
<id>23</id>
<name>01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core</name>
<description>root : abiquo</description>
<osType>UNRECOGNIZED</osType>
<osVersion></osVersion>
<path>1/ovf/305/01af7452-661a-436e-b96c-2cad7e4c6717-snapshot-Core.qcow2</path>
<diskFormatType>QCOW2_SPARSE</diskFormatType>
<diskFileSize>12976128</diskFileSize>
<cpuRequired>1</cpuRequired>
<ramRequired>64</ramRequired>
<hdRequired>104857600</hdRequired>
<shared>false</shared>
<state>DONE</state>
<creationDate>2013-09-30T10:39:03+02:00</creationDate>
<creationUser>SYSTEM</creationUser>
<chefEnabled>false</chefEnabled>
<iconUrl>https://portal.cloud.claranet.com/public/icons/tinycore.png</iconUrl>
<loginUser>user</loginUser>
<loginPassword>password</loginPassword>
<ethernetDriverType>E1000</ethernetDriverType>
<diskControllerType>SCSI</diskControllerType>
</virtualMachineTemplate>
</virtualMachineTemplates>
</virtualMachineTemplates

Purchase a public IP to be used in a Virtual Machine in the Virtual Datacenter

Purchase/acquire a public IP to be used in a Virtual Machine in the Virtual Datacenter.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased/{ip}

Request Headers: Accept:application/vnd.abiquo.publicip+json; version=3.1;application/vnd.abiquo.publicip+xml; version=3.1; Content-type:  application/vnd.abiquo.publicip+json;version=3.1; application/vnd.abiquo.publicip+xml;version=3.1;

Response Message Body Entity: PublicIp Media Type

Purchase a public IP to be used in a Virtual Machine in the Virtual Datacenter example
$ curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/publicips/purchased/1278 \
-H 'Accept: application/vnd.abiquo.publicip+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.publicip+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


> PUT /api/cloud/virtualdatacenters/3/publicips/purchased/1278 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicip+xml; version=3.1
> Content-type: application/vnd.abiquo.publicip+xml; version=3.1
> Content-Length: 870
>

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDcwNTg3MTA3OTpmODY3YWI1Y2MwMWU3MTE0NGM4MjJiNTAyM2EyZTcwODpBQklRVU8; Expires=Wed, 02-Oct-2013 09:24:31 GMT; Path=/api
< Set-Cookie: JSESSIONID=171E87B7E05A42DA60C74FA10A8B86B6; Path=/api
< Content-Type: application/vnd.abiquo.publicip+xml;version=3.1
< Content-Length: 1063
< Date: Wed, 02 Oct 2013 08:54:31 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="purchased ips" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/purchased"/> <link title="10.5.5.244" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1278"/> <link title="PUT" rel="release" type="application/vnd.abiquo.publicip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1278"/> <link title="BB_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <id>1278</id> <ip>10.5.5.244</ip> <mac>52:54:00:B6:63:F1</mac> <name>525400B663F1_host</name> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip>

Release a public IP that will not be used any more in the Virtual Datacenter

Release a public IP that will not be used any more in the Virtual Datacenter.
Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase/{ip}

Request Headers: Accept:application/vnd.abiquo.publicip+json; version=3.1;application/vnd.abiquo.publicip+xml; version=3.1; Content-type:  application/vnd.abiquo.publicip+json;version=3.1; application/vnd.abiquo.publicip+xml;version=3.1;

Response Message Body Entity: PublicIp Media Type

Release a public IP that will not be used any more in the Virtual Datacenter example
$ curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/publicips/topurchase/1278 \
-H 'Accept: application/vnd.abiquo.publicip+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.publicip+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose
> PUT /api/cloud/virtualdatacenters/3/publicips/topurchase/1278 HTTP/1.1
>
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.publicip+xml; version=3.1
> Content-type: application/vnd.abiquo.publicip+xml; version=3.1
> Content-Length: 870
>

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDcwNjA1NjA1NzpiNGQ4YjM4YWFlMTQzM2EzNmEwNGRmODkyNzU5ZjViYTpBQklRVU8; Expires=Wed, 02-Oct-2013 09:27:36 GMT; Path=/api
< Set-Cookie: JSESSIONID=B28DE5F6D37A4493B34D0E267ACE9DD1; Path=/api
< Content-Type: application/vnd.abiquo.publicip+xml;version=3.1
< Content-Length: 834
< Date: Wed, 02 Oct 2013 08:57:36 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <publicip> <link title="B_Public_Network" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/network/6"/> <link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase"/> <link title="10.5.5.244" rel="edit" type="application/vnd.abiquo.publicips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/topurchase/1278"/> <link title="PUT" rel="purchased" type="purchase" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/publicips/purchased/1278"/> <id>1278</id> <ip>10.5.5.244</ip> <networkName>B_Public_Network</networkName> <available>true</available> <quarantine>false</quarantine> </publicip>

Retrieve all hard disks

Returns the list of all hard disks

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/disks

Request Headers: Accept:application/vnd.abiquo.harddisks+json; version=3.1;application/vnd.abiquo.harddisks+xml; version=3.1; Content-type: ;

Response Message Body Entity: DisksManagement Media Type

Retrieve all hard disks example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks \
-H 'Accept: application/vnd.abiquo.harddisks+xml;version=3.1' \
-u user:pass --verbose

GET /api/cloud/virtualdatacenters/1/disks HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
Accept: application/vnd.abiquo.harddisks+xml;version=3.1

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: auth=YWRtaW46MTM0NDMzMDQyODkxMToyZjNlNzZhYTZkMGJhNWU5OTU1MmYxOTUyMzJmZDM4MjpBQklRVU8; Expires=Tue, 07-Aug-2012 09:07:08 GMT; Path=/api
Set-Cookie: JSESSIONID=6DBD4F9B5144E8881736432751603EA3; Path=/api
Content-Type: application/vnd.abiquo.harddisks+xml;version=3.1
Content-Length: 728
Date: Tue, 07 Aug 2012 08:37:08 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <disks> <disk> <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks/255"/> <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1"/> <sequence>0</sequence> <sizeInMb>20</sizeInMb> </disk> <disk> <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks/256"/> <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1"/> <sequence>1</sequence> <sizeInMb>1024</sizeInMb> </disk> </disks>

Create a hard disk

This method creates a hard disk in a virtual datacenter available for use on any virtual machine.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/disks

Request Headers: Accept:application/vnd.abiquo.harddisk+json; version=3.1;application/vnd.abiquo.harddisk+xml; version=3.1; Content-type:  application/vnd.abiquo.harddisk+json;version=3.1; application/vnd.abiquo.harddisk+xml;version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force to create.

Request Message Body Entity: DiskManagement Media Type
Response Message Body Entity: DiskManagement Media Type

Create a hard disk example
$ curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks\
-H 'Accept: application/vnd.abiquo.harddisk+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.harddisk+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.harddisk+xml;version=3.1
Content-Type: application/vnd.abiquo.harddisk+xml;version=3.1
Content-Length: 99


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:10:58 GMT
Location: https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks/4074
Set-Cookie: JSESSIONID=B449985ADBC3F7953F5CD7B636C1DFB6; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzI1ODYwODpiNGY3MmQ0OTAwMDI3ZmU0NDU3NTg0ZWY4MDU1YzhkNjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:58 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.harddisk+xml;version=3.1
Content-Length: 388

<?xml version="1.0" encoding="UTF-8"?> <disk> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/disks/4074" rel="edit" type="application/vnd.abiquo.harddisk+xml"/> <sequence>0</sequence> <sizeInMb>64</sizeInMb> </disk>

Create new private network

Create a new private network.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks

Request Headers: Accept:application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1; Content-type:  application/vnd.abiquo.vlan+json;version=3.1; application/vnd.abiquo.vlan+xml; version=3.1;

Request Message Body Entity:
VLANNetwork Media Type
Response Message Body Entity: VLANNetwork Media Type

Create new private network example
curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks\
-H 'Accept: application/vnd.abiquo.vlan+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.vlan+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose

> POST /api/cloud/virtualdatacenters/3/privatenetworks HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlan+xml; version=3.1
> Content-type: application/vnd.abiquo.vlan+xml; version=3.1
> Content-Length: 369
>

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDc5NDI3NTc3MzozMTAwYjhmYTI2MWViMDRhZjg3ZDVkMTU2ZTM4NTM2ZjpBQklRVU8; Expires=Thu, 03-Oct-2013 09:57:55 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/9
< Set-Cookie: JSESSIONID=330B14178C7BDD1A0D148DB65A3A920A; Path=/api
< Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
< Content-Length: 942
< Date: Thu, 03 Oct 2013 09:27:56 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <network> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="A_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/9"/> <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/9/ips"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>9</id> <name>A_private_network</name> <address>192.168.4.0</address> <mask>30</mask> <gateway>192.168.4.1</gateway> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <type>INTERNAL</type> <dhcpOptions/> </network>

Get list of private networks

Returns the list of private networks created in a virtual datacenter.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks
,
Request Headers: Accept: application/vnd.abiquo.vlans+json; version=3.1;application/vnd.abiquo.vlans+xml; version=3.1;

Response Message Body Entity: VLANNetworks Media Type

Get list of private networks example
curl -X GET https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks\
-H 'Accept: application/vnd.abiquo.vlans+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/privatenetworks HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlans+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDcyMjkzMjA3Mjo3Yjg1YmFkZjkyM2YzZDYxNDM3MzVhOWM5YjNmOWI2NDpBQklRVU8; Expires=Wed, 02-Oct-2013 14:08:52 GMT; Path=/api
< Set-Cookie: JSESSIONID=263AD2F11D4229095212EBCFEB8E9B97; Path=/api
< Content-Type: application/vnd.abiquo.vlans+xml;version=3.1
< Content-Length: 1874
< Date: Wed, 02 Oct 2013 13:38:52 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <networks> <network> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="B_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/8"/> <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/8/ips"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>8</id> <name>B_private_network</name> <address>192.168.5.0</address> <mask>30</mask> <gateway>192.168.5.1</gateway> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <type>INTERNAL</type> <dhcpOptions/> </network> <network> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="default_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/> <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>3</id> <name>default_private_network</name> <address>192.168.0.0</address> <mask>24</mask> <gateway>192.168.0.1</gateway> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <tag>2</tag> <type>INTERNAL</type> <dhcpOptions/> </network> </networks>

Delete private network

Delete a private network. Successful delete returns 204 No Content. we will not allow you to delete a private network if:Virtual Machines are using any of its IPs; or it is the last private network in the Virtual Datacenter - returns 409 Conflict.

Synopsis: DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}

Delete private network example
curl -X DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/8\
-u user:password --verbose

> DELETE /api/cloud/virtualdatacenters/3/privatenetworks/8 HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*
>
< HTTP/1.1 204 No Content
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDc5NTIwNjQ5MTo4YTE3ODg0ZmMxZjk0NTY2ODFkYjE2MmJlYTkyZWE2NDpBQklRVU8; Expires=Thu, 03-Oct-2013 10:13:26 GMT; Path=/api
< Set-Cookie: JSESSIONID=3F0EE09236FCB30CCBE88471D35A0460; Path=/api
< Date: Thu, 03 Oct 2013 09:43:26 GMT
<

Retrieve a single private network

Retrieve information of a single private network.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}
Request Headers: Accept:application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1;  Content-type:-;

Response Message Body Entity: VLANNetwork Media Type

Retrieve a single private network example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/10\
-H 'Accept: application/vnd.abiquo.vlan+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/privatenetworks/10 HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.vlan+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDc5NTUwNjU3OTpiY2U3MjMxNDkwNzIxNDk4NDRiOTMwZWZiODMzYjcwNTpBQklRVU8; Expires=Thu, 03-Oct-2013 10:18:26 GMT; Path=/api
< Set-Cookie: JSESSIONID=3BB786E5E574B7125D193D36BBEF833F; Path=/api
< Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
< Content-Length: 945
< Date: Thu, 03 Oct 2013 09:48:26 GMT
<
{ [data not shown]
100 945 100 945 0 0 13658 0 --:--:-- --:--:-- --:--:-- 13897
* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <network> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="C_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/10"/> <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/10/ips"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <id>10</id> <name>C_private_network</name> <address>192.168.3.0</address> <mask>30</mask> <gateway>192.168.3.1</gateway> <primaryDNS/> <secondaryDNS/> <sufixDNS/> <type>INTERNAL</type> <dhcpOptions/> </network>

Update private network data

Updates information of a Private Network. You cannot change the basic network characteristics (network address, gateway,netmask). Some of the attributes can be modified if no Virtual Machines are using IPs in the network. To make a network the default for a virtual datacenter, see the separate request for this purpose.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}

Request Headers: Accept:application/vnd.abiquo.vlan+json; version=3.1;application/vnd.abiquo.vlan+xml; version=3.1; Content-type:  application/vnd.abiquo.vlan+json;version=3.1; application/vnd.abiquo.vlan+xml; version=3.1;

Request Message Body Entity: VLANNetwork Media Type
Response Message Body Entity: VLANNetwork Media Type

Update private network data example
curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/3\
-H 'Accept: application/vnd.abiquo.vlan+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.vlan+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose

> PUT /api/cloud/virtualdatacenters/3/privatenetworks/3 HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*
> Content-type: application/vnd.abiquo.vlan+xml; version=3.1
> Content-Length: 375
>

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgwMDgxMTg3NDowMGJmMjlmMWM2NjYwMzE1ZTNkNmUwMDk4MGMyN2VhMzpBQklRVU8; Expires=Thu, 03-Oct-2013 11:46:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E364A9160AE1549FDC1F0DD0E65C3B49; Path=/api
< Content-Type: application/vnd.abiquo.vlan+xml;version=3.1
< Content-Length: 980
< Date: Thu, 03 Oct 2013 11:16:51 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <network> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="default_private_network" rel="edit" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/> <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips"/> <link title="Service Network" rel="networkservicetype" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/networkservicetypes/1"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>3</id> <name>default_private_network</name> <address>192.168.0.0</address> <mask>24</mask> <gateway>192.168.0.1</gateway> <primaryDNS>8.8.8.8</primaryDNS> <secondaryDNS>8.8.4.4</secondaryDNS> <sufixDNS/> <tag>2</tag> <type>INTERNAL</type> <dhcpOptions/> </network>

Return a single IP address

Return information of a single IP address from a private network.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips/{ip}
,
Request Headers: Accept:application/vnd.abiquo.privateip+json; version=3.1;application/vnd.abiquo.privateip+xml; version=3.1; Content-type: -;

Response Message Body Entity: PrivateIp Media Type

Return a single IP address example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/536\
-H 'Accept: application/vnd.abiquo.privateip+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/privatenetworks/3/ips/536 HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.privateip+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgwNjk3NTk2ODo2OTBhMDM2MzRkN2IyMWMwZDExMTZkNTY0NWM2NjUzNjpBQklRVU8; Expires=Thu, 03-Oct-2013 13:29:35 GMT; Path=/api
< Set-Cookie: JSESSIONID=A55473432E476BB1D066B8E45BAC2B9A; Path=/api
< Content-Type: application/vnd.abiquo.privateip+xml;version=3.1
< Content-Length: 719
< Date: Thu, 03 Oct 2013 12:59:35 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <privateip> <link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/> <link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/536"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration/1" rel="network_configuration" title="192.168.4.1" type="application/vnd.abiquo.networkconfiguration+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/configuration" rel="network_configuration" title="network_configuration" type="application/vnd.abiquo.networkconfiguration+xml"/> <id>536</id> <ip>192.168.0.25</ip> <mac>52:54:00:6D:1D:65</mac> <name>5254006D1D65_host</name> <networkName>default_private_network</networkName> </privateip>

Create a private IP

Creates a private IP.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips
 
Request Headers: Accept: application/vnd.abiquo.privateip+json; version=3.1;application/vnd.abiquo.privateip+xml; version=3.1; Content-type:  application/vnd.abiquo.privateip+json;version=3.1; application/vnd.abiquo.privateip+xml;version=3.1;

Request Message Body Entity: private ip Media Type
Response Message Body Entity: private ip Media Type

Create new private network example
curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/9/ips\
-H 'Accept: application/vnd.abiquo.privateip+json' \
-H 'Content-Type: application/vnd.abiquo.privateip+json' \
-d @entity.xml \
-u user:password --verbose

> POST /api/cloud/virtualdatacenters/3/privatenetworks/9/ips HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.privateip+json
> Content-type: application/vnd.abiquo.privateip+json
> Content-Length: 369
>

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDc5NDI3NTc3MzozMTAwYjhmYTI2MWViMDRhZjg3ZDVkMTU2ZTM4NTM2ZjpBQklRVU8; Expires=Thu, 03-Oct-2013 09:57:55 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/9/ips
< Set-Cookie: JSESSIONID=330B14178C7BDD1A0D148DB65A3A920A; Path=/api
< Content-Type: application/vnd.abiquo.privateip+json
< Content-Length: 942
< Date: Thu, 03 Oct 2013 09:27:56 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
{"links":[{"title":"external","rel":"privatenetwork","type":"applicati
on/vnd.abiquo.privateip+json","href":"https://ssedano.net:443/api/cloud/virtualdatacenters/3/privatenetworks/9"}],"ip":"192
.168.1.4","networkName":"name","ipv6":false,"available":true,"quarantine":false}

Return a list of IP addresses

Return a list of IP addresses from a private network.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips

Request Headers: Accept: application/vnd.abiquo.privateips+json; version=3.1;application/vnd.abiquo.privateips+xml; version=3.1;  Content-type: ;

Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

ip

ordering the request. Valid values are {IP,QUARANTINE, MAC, LEASE, VLAN,
VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE,ENTERPRISENAME}

has

false

 

filter the request by: ip value, mac value, vlan name,virtual machine name or
virtual appliance name

limit

false

25

number of elements to return

asc

false

true

order ascending or descending

free

false

false

if true, return only the available IPs not used by any virtual machine; if false, return all IPs


Response Message Body Entity: PrivateIps Media Type

Return a list of IP addresses example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/privatenetworks/3/ips?limit=2&free=true\
-H 'Accept: application/vnd.abiquo.privateips+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/privatenetworks/3/ips?limit=2&free=true HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.privateips+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgwODg1MDg5MDo2NWNiNjZmNGUyZDY5NmQ0MmI1MDVmN2JmMTVmMGVlNTpBQklRVU8; Expires=Thu, 03-Oct-2013 14:00:50 GMT; Path=/api
< Set-Cookie: JSESSIONID=2C3DE1379128660042D5E7470BCA20B6; Path=/api
< Content-Type: application/vnd.abiquo.privateips+xml;version=3.1
< Content-Length: 1818
< Date: Thu, 03 Oct 2013 13:30:50 GMT
<
{ [data not shown]
100 1818 100 1818 0 0 38673 0 --:--:-- --:--:-- --:--:-- 39521
* Connection #0 to host portal.cloud.claranet.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <privateips> <link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips?limit=2&amp;by=ip"/> <link rel="next" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips?startwith=2&amp;limit=2&amp;by=ip"/> <link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips?startwith=251&amp;limit=2&amp;by=ip"/> <totalSize>253</totalSize> <privateip> <link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/> <link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/512"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <id>512</id> <ip>192.168.0.1</ip> <mac>52:54:00:CF:4A:96</mac> <name>525400CF4A96_host</name> <networkName>default_private_network</networkName> </privateip> <privateip> <link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3"/> <link title="privateip" rel="self" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/514"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <id>514</id> <ip>192.168.0.3</ip> <mac>52:54:00:6A:D6:66</mac> <name>5254006AD666_host</name> <networkName>default_private_network</networkName> </privateip> </privateips>

Retrieve all virtual appliances

This resource allow the user to filter out and paginate

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances

Request Headers: Accept:application/vnd.abiquo.virtualappliances+json; version=3.1;application/vnd.abiquo.virtualappliances+xml; version=3.1; Content-type:-;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

offset

limit

false

25

number of items to retrieve

by

false

name

by default ordered by name

has

false

 

name filter

asc

false

true

whether the sorting of the list is ascending or descending

expand

false

 

nodes to expand


Response Message Body Entity: VirtualAppliances Media Type

Retrieve all virtual appliances example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances\
-H 'Accept: application/vnd.abiquo.virtualappliances+xml; version=3.1' \
-u user:password --verbose


> GET /api/cloud/virtualdatacenters/3/virtualappliances HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualappliances+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgwOTg3OTcxNjpjYjRkN2NlZDI3OTM0YTdhMzhhZmViYmIyNGI4MDM1ZjpBQklRVU8; Expires=Thu, 03-Oct-2013 14:17:59 GMT; Path=/api
< Set-Cookie: JSESSIONID=987EEE5E04AEBB3ADC469EC3FDECDD68; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliances+xml;version=3.1
< Content-Length: 3861
< Date: Thu, 03 Oct 2013 13:47:59 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliances> <link rel="first" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances?limit=25&amp;by=name"/> <link rel="last" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances?startwith=0&amp;limit=25&amp;by=name"/> <totalSize>2</totalSize> <virtualAppliance> <link title="bb_va_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/layers"/> <id>3</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>bb_va_01</name> <nodeconnections>&lt;connections/&gt;</nodeconnections> <publicApp>0</publicApp> <state>DEPLOYED</state> </virtualAppliance> <virtualAppliance> <link title="bb_va_02" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/layers"/> <id>5</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>bb_va_02</name> <nodeconnections>&lt;connections/&gt;</nodeconnections> <publicApp>0</publicApp> <state>NOT_DEPLOYED</state> </virtualAppliance> </virtualAppliances>

Create a virtual appliance

This resource creates a Virtual Appliance within a Virtual Datacenter. The only parameter that we can set is the name and this is the only required data in the XML file to create a virtual appliance.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances

Request Headers: Accept:application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1; Content-type: application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1;

Request Message Body Entity: VirtualAppliance Media Type
Response Message Body Entity: VirtualAppliance Media Type

Create a virtual appliance example
curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances\
-H 'Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.virtualappliance+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose

> POST /api/cloud/virtualdatacenters/3/virtualappliances HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*
> Content-type: application/vnd.abiquo.virtualappliance+xml; version=3.1
> Content-Length: 118
>

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgxMDQ1MzYzMjo2YWI0YWE4MzUxZGYyNmI0ZDBmYTM3NWI1ZWVlOWUyMDpBQklRVU8; Expires=Thu, 03-Oct-2013 14:27:33 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6
< Set-Cookie: JSESSIONID=55C36367FC89F2342D0CC1203A6B9612; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliance+xml;version=3.1
< Content-Length: 1751
< Date: Thu, 03 Oct 2013 13:57:33 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliance> <link title="D_VAPP_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/layers"/> <id>6</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>D_VAPP_01</name> <publicApp>0</publicApp> <state>NOT_DEPLOYED</state> </virtualAppliance>

Copy a Virtual Appliance to another or the same Virtual Datacenter

Copies a Virtual Appliance to another Virtual Datacenter or the same one.

To perform this request you do not need to send a whole virtual appliance entity. You can send a virtual appliance entity with only the virtual appliance link with rel="original" for the source virtual appliance. Be sure to include the correct Content-type header - note that the Content-type is"vnd.cp-virtualappliance+xml" - it does not include "abiquo". To create the original link, copy the rel="edit" link of the virtual appliance and change the rel value to original.

Some preconditions must be met:

  • The state of the virtual appliance must be NOT_ALLOCATED. This means that none of its virtual machines can exist in the hypervisor or have a hypervisor assigned. In other words all the virtual machines must be in state NOT_ALLOCATED.
  • All of the virtual machines within the virtual appliance must be deployable in the target virtual datacenter. This means that either the virtual machine template must be of the same base format or it must have a finished conversion of that format.

If there are volumes attached to any of the virtual machines,they will be copied to the target virtualdatacenter.

The name of the newly created virtual appliance will be the same as the original plus _ (Copy)__

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances

Request Headers: Accept:application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1; Content-type: application/vnd.cp-virtualappliance+xml;version=3.1; application/vnd.cp-virtualappliance+json;version=3.1;

Request Message Body Entity: VirtualAppliance Media Type
Response Message Body Entity: VirtualAppliance Media Type

Copy a Virtual Appliance to another or the same Virtual Datacenter example
curl --verbose \
-X POST \
-u user:password \
-H 'Accept: application/vnd.abiquo.virtualappliance+xml' \
-H 'Content-type: application/vnd.cp-virtualappliance+xml' \
-d '<virtualAppliance>
<link title="D_VAPP_01" rel="source"\
type="application/vnd.abiquo.virtualappliance+xml" \ href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7"/> \
</virtualAppliance>' \
'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances'


> POST /api/cloud/virtualdatacenters/4/virtualappliances HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1
> Content-type: application/vnd.cp-virtualappliance+xml; version=3.1
> Content-Length: 207
>

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgxNDY1MTYwNDo2MTViY2RkN2FiY2Q0YjFiZWJiYzAwZjQ1NmJiN2YxNzpBQklRVU8; Expires=Thu, 03-Oct-2013 15:37:31 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7
< Set-Cookie: JSESSIONID=7549C480B9554EE689CCA0927D09CA12; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliance+xml;version=3.1
< Content-Length: 1724
< Date: Thu, 03 Oct 2013 15:07:31 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliance> <link title="D_VAPP_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7"/> <link title="A_VDC_02" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7/layers"/> <id>7</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>D_VAPP_01</name> <publicApp>0</publicApp> </virtualAppliance>

Move a Virtual Appliance to another Virtual Datacenter

Moves a Virtual Appliance to another Virtual Datacenter.

To perform this request you do not need to send a whole virtual appliance entity. You can send a virtual appliance entity with only the virtual appliance link with rel="source" for the source virtual appliance. Be sure to include the correct Content-type header - note that the Content-type is"vnd.mv-virtualappliance+xml" - it does not include "abiquo". To create the original link, copy the rel="edit" link of the virtual appliance and change the rel value to source. 

Some preconditions must be met:

  • The state of the virtual appliance must be NOT_ALLOCATED. This means that none of its virtual machines exist in the hypervisor or have a hypervisor assigned. In other words all the virtual machines must be in state NOT_ALLOCATED.
  • All of the virtual machines whithin the virtual appliance must be deployable in the target virtual datacenter. This means that either the virtual machine template must be of the same base format or it must have a finished conversion of that format.

If there are volumes attached to any of the virtual machines,they will also be moved to the target virtualdatacenter.

The network configuration is not moved to the target virtual datacenter. Instead we will assign an available IP in the target virtual datacenter to the virtual machines.

If the virtual appliance being moved is an ESX or ESXi hypervisor type and it is being moved to a virtual datacenter with a different virtualization technology all of the extra hard disks that may be on any virtual machine will be deleted. Otherwise the hard disks will be moved. Please contact us if you are concerned about this before executing this API call.

If the target virtual datacenter is the same as the origin, an error is thrown.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances

Request Headers: Accept:application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1; Content-type: application/vnd.mv-virtualappliance+xml;version=3.1; application/vnd.mv-virtualappliance+json;version=3.1;

Request Message Body Entity: VirtualAppliance Media Type
Response Message Body Entity: VirtualAppliance Media Type

Move a Virtual Appliance to another Virtual Datacenter example
curl --verbose \
-X POST \
-u user:password \
-H 'Accept: application/vnd.abiquo.virtualappliance+xml' \
-H 'Content-type: application/vnd.mv-virtualappliance+xml' \
-d '<virtualAppliance>
<link title="D_VAPP_01" rel="source"\
type="application/vnd.abiquo.virtualappliance+xml" \ href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/4/virtualappliances/7"/> \
</virtualAppliance>' \
'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances'

> POST /api/cloud/virtualdatacenters/3/virtualappliances HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1
> Content-type: application/vnd.mv-virtualappliance+xml; version=3.1
> Content-Length: 205


< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgxNjA5MTQ3ODpiZmNiZDBjN2JkYmQxNzNiZDNlYmY0YmIzZjNmMmFlNzpBQklRVU8; Expires=Thu, 03-Oct-2013 16:01:31 GMT; Path=/api
< Location: https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7
< Set-Cookie: JSESSIONID=D1E9BB3792A812AC17D7B9B08D16C75A; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliance+xml;version=3.1
< Content-Length: 1751
< Date: Thu, 03 Oct 2013 15:31:31 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliance> <link title="D_VAPP_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/7/layers"/> <id>7</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>D_VAPP_01</name> <publicApp>0</publicApp> <state>NOT_DEPLOYED</state> </virtualAppliance>

Virtual Appliance and Virtual Machine Definitions and States

A virtual appliance is a pre-configured software stack comprising one or more virtual machines. Each virtual machine is an independently installable run-time entity comprising an operating system, applications and other application-specific data.

A virtual appliance is not a mere aggregation of virtual machines. Some high level operations can be performed on it,which act on its virtual machines.

A virtual appliances holds basic information: a name, a reference to its parent (Virtual Datacenter), and the enterprise to which it belongs, as well as the owner (User) who created it.

A virtual appliance also has a state, which indicates the actions that can be performed on it. The state is inferred from the state of its virtual machines. This means that we do not persist this information anywhere in the application. In this way Abiquo does not need to constantly synchronize the state of the virtual appliance.

  • DEPLOYED All the virtual machines exist in the hypervisor and none are in the UNKNOWN or LOCKED states
  • NOT__DEPLOYED No virtual machines Or none of the virtual machines exist in the hypervisor and none are in the UNKNOWN or LOCKED states
  • NEEDS__SYNC Some virtual machines exist in the hypervisor and some do not and none are in the UNKNOWN or LOCKED states
  • LOCKED One or more of the virtual machines are in LOCKED state and none are in the UNKNOWN state
  • UNKNOWN One or more of the virtual machines is in the UNKNOWN state

In addition, a virtual machine is the instance of a virtual machine template in a hypervisor. One of the main differences between the API and the Abiquo Flex client is the granularity of the operations. That is, we can now have a virtual machine without it even being associated with any physical machine. This is reflected in the new virtual machine states.

This media type will retrieve the information about the node. This node entity is needed for the client.

This state represents the current status of the virtual machine and indicates which actions can be performed on it. When the virtual machine exists in the hypervisor we refer to these actions as Transitions.

  • NOT_ALLOCATED The virtual machine only exists and it is not yet assigned to a physical machine
  • ALLOCATED The virtual machine does not exist in the hypervisor but it is assigned to a physical machine
  • CONFIGURED The virtual machine exists in the hypervisor
  • ON The virtual machine exists in the hypervisor and is ON
  • PAUSED The virtual machine exists in the hypervisor and is SUSPENDED
  • OFF The virtual machine exists in the hypervisor and is OFF
  • LOCKED There is an operation being performed on this virtual machine
  • UNKNOWN The actual state of the virtual machine is unknown to Abiquo

The transitions are operations we perform on virtual machines.Those transitions have preconditions that must be met.

  • State changes in Virtual Machines that are in the hypervisor are asynchronous.
  • Deploys and undeploys are asynchronous. 
  • There is a resource in the virtual machine to keep track of the current task being performed. 
  • The action of undeploying and deploying is not performed exclusively on the virtual appliance. You can deploy or undeploy a set of virtual machines. 
  • The deploy or undeploy of a virtual appliance will deploy or undeploy all its virtual machines. 
  • The Virtual Machine State resource is a single point of entry for modifying the state of a virtual machine. 

Note: the root of all resources is 'api/'. However, in these examples we have omitted 'api' and the host specification for brevity and clarity, e.g.:

Virtual Appliance: cloud/virtualdatacenters/{vdcId}/virtualappliances/{vapp}
Virtual Machine: cloud/virtualdatacenters/{vdcId}/virtualappliances/{vapp}/virtualmachines/{vmId}

Retrieve a virtual appliance

Return the virtual appliance if it exists. If you set the expand parameter to "last_task", the API will return the last task of every node.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}
Request Headers: Accept:application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1; Content-type: -;
Request Parameters:

Parameter

Required

Default Value

Description

expand

false

 

nodes to expand


Response Message Body Entity: VirtualAppliance Media Type

Retrieve a virtual appliance example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances/3?expand=last_task\
-H 'Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1' \
-u user:password --verbose

> GET /api/cloud/virtualdatacenters/3/virtualappliances/3?expand=last_task HTTP/1.1

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgyMTM5MjI1MzoxYThiNjI3NmQ4MTVjZGQzMjAwOTVkMmFmNmRjOGQwZDpBQklRVU8; Expires=Thu, 03-Oct-2013 17:29:52 GMT; Path=/api
< Set-Cookie: JSESSIONID=940953AD30D8469AE9AC31B0AA331953; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliance+xml;version=3.1
< Content-Length: 2996
< Date: Thu, 03 Oct 2013 16:59:52 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliance> <link title="bb_va_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/layers"/> <id>3</id> <error>0</error> <highDisponibility>0</highDisponibility> <lastTasks> <link rel="self" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines/tasks"/> <link rel="parent" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines"/> <task> <link rel="self" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines/4/tasks/d9b36a60-5be0-4a1f-afc6-c1afce064b5e"/> <link rel="parent" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/3/virtualmachines/4/tasks"/> <taskId>d9b36a60-5be0-4a1f-afc6-c1afce064b5e</taskId> <userId>1</userId> <type>POWER_OFF</type> <ownerId>4</ownerId> <state>FINISHED_SUCCESSFULLY</state> <creationTimestamp>1380622910</creationTimestamp> <timestamp>1380622911</timestamp> <jobs> <job> <id>d9b36a60-5be0-4a1f-afc6-c1afce064b5e.08823127-b811-4010-b8d1-b0de1721879f</id> <parentTaskId>d9b36a60-5be0-4a1f-afc6-c1afce064b5e</parentTaskId> <type>POWER_OFF</type> <description>Power off task's power off on virtual machine with id 4</description> <state>DONE</state> <rollbackState>UNKNOWN</rollbackState> <creationTimestamp>1380622910</creationTimestamp> <timestamp>1380622911</timestamp> </job> </jobs> </task> </lastTasks> <name>bb_va_01</name> <nodeconnections>&lt;connections/&gt;</nodeconnections> <publicApp>0</publicApp> <state>DEPLOYED</state> </virtualAppliance>

Deploy a virtual appliance

Deploy all the virtual machines in the virtual appliance with the given options. This call returns a 202 HTTP code (accepted)and a list of URIs where you can track each deploy (one for each virtual machine in the virtual appliance). The options are yet to be finalized. For the purposes of this example we will be using:-forceVdcLimits = false

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/action/deploy

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetask+json; version=3.1;application/vnd.abiquo.virtualmachinetask+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

force

NO

false

Possible values are "true" or "false". If"true", soft limits of virtual datacenters could be surpassed.


Response Message Body Entity: AcceptedRequest Media Type

Deploy a virtual appliance example
curl --verbose -X POST -u user:password 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances/5/action/deploy?force=true' | xmlindent -nbe -f

> POST /api/cloud/virtualdatacenters/3/virtualappliances/5/action/deploy HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*
> Content-type: application/vnd.abiquo.virtualmachinetask+xml; version=3.1
> Content-Length: 99
>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDgyMjA0MDA0MzoyYmJlNjM5ZWU3YjI3NGJlMTM3ODMzNzJmYTA4MDgxODpBQklRVU8; Expires=Thu, 03-Oct-2013 17:40:40 GMT; Path=/api
< Set-Cookie: JSESSIONID=15E958EA6E73B00E04FCB27B240E6E8E; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=3.1
< Content-Length: 330
< Date: Thu, 03 Oct 2013 17:10:40 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link rel="status" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks/6220f0c1-c9ca-4d29-9ab5-25e69acba3b2"/>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</acceptedrequest>
//You can track the task by performing a GET request to the link supplied in the response.



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<link rel="self" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks/6220f0c1-c9ca-4d29-9ab5-25e69acba3b2"/>
<link rel="parent" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks"/>
<link rel="result" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12"/>
<link title="admin" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/1"/>
<link title="ABQ_d0d2d1b4-7a02-4865-a339-a47d314aff74" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12"/>
<taskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</taskId>
<userId>1</userId>
<type>DEPLOY</type>
<ownerId>12</ownerId>
<state>FINISHED_SUCCESSFULLY</state>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
<jobs>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.96588138-4608-4f9c-a7ad-f6cb4b3c91e8</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>SCHEDULE</type>
<description>SCH-OK - Scheduling OK</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820240</timestamp>
</job>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.0af04a74-a2bb-4281-bb92-38c0063c752f</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>CONFIGURE</type>
<description>Deploy task's configure on virtual machine with id 12</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
</job>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.ff64650d-18cf-4dec-bef7-a5f245f7c740</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>POWER_ON</type>
<description>Deploy task's power on on virtual machine with id 12</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
</job>
</jobs>
</task>

Undeploy a virtual appliance

Perform an undeploy of all the machines that are DEPLOYED(meaning that they exist in the hypervisor). This means that after the call, all of the virtual machines in that virtual appliance will be NOT_ALLOCATED. If an undeploy is successful,all the virtual machines in that virtual appliance will be deleted from the hypervisor. If any of the virtual machines are in the ON state, we will perform a power off before deconfiguring them. You can also set the force undeploy parameter in the virtual machine task entity. If this is set to true, it will also delete the imported virtual machines. This call returns a 202 HTTP code (accepted) and a list of URIs where you can track each undeploy (one for each virtual machine in the virtual appliance).

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/action/undeploy

Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetask+json; version=3.1;application/vnd.abiquo.virtualmachinetask+xml; version=3.1;

Request Message Body Entity:
VirtualMachineTask Media Type
Response Message Body Entity: AcceptedRequest Media Type

Undeploy a virtual appliance example
curl --verbose -X POST -u user:password -H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=3.1' \
-H 'Content-type: application/vnd.abiquo.virtualmachinetask+xml; version=3.1' \
-d '<virtualmachinetask><forceUndeploy>false</forceUndeploy></virtualmachinetask>' \
https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances/5/action/undeploy


> POST /api/cloud/virtualdatacenters/3/virtualappliances/5/action/undeploy HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.acceptedrequest+xml; version=3.1
> Content-type: application/vnd.abiquo.virtualmachinetask+xml; version=3.1
> Content-Length: 77
>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDg3NDMxMzM0NDpiOTA2OGRmNjJmMmYxN2IzZDAxM2I1YTU2OWZkOGJjYjpBQklRVU8; Expires=Fri, 04-Oct-2013 08:11:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=5F4D1D83BB25496721AD9B2FAA1E01B5; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=3.1
< Content-Length: 330
< Date: Fri, 04 Oct 2013 07:42:07 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <acceptedrequest> <link rel="status" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks/8e9f0cd3-b1e8-4396-b994-29f7bdb39211"/> <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> </acceptedrequest>
curl -X GET https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachine6220f0c1-c9ca-4d29-9ab5-25e69acba3b2 \
-u user:password | xmlindent -nbe -f

> GET /api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualmachines+xml; version=3.1

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDg3NTQzNTA0NDowMGExYmE4MWNmMmZjYzIzMzU0YTdjZTdmNDYxZTM4NzpBQklRVU8; Expires=Fri, 04-Oct-2013 08:30:35 GMT; Path=/api
< Set-Cookie: JSESSIONID=4C0F72C9BF84622E4F3D4DFA48F852D8; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachines+xml;version=3.1
< Content-Length: 4377
< Date: Fri, 04 Oct 2013 08:00:35 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<link rel="self" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks/6220f0c1-c9ca-4d29-9ab5-25e69acba3b2"/>
<link rel="parent" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12/tasks"/>
<link rel="result" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12"/>
<link title="admin" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/1"/>
<link title="ABQ_d0d2d1b4-7a02-4865-a339-a47d314aff74" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines/12"/>
<taskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</taskId>
<userId>1</userId>
<type>DEPLOY</type>
<ownerId>12</ownerId>
<state>FINISHED_SUCCESSFULLY</state>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
<jobs>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.96588138-4608-4f9c-a7ad-f6cb4b3c91e8</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>SCHEDULE</type>
<description>SCH-OK - Scheduling OK</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820240</timestamp>
</job>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.0af04a74-a2bb-4281-bb92-38c0063c752f</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>CONFIGURE</type>
<description>Deploy task's configure on virtual machine with id 12</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
</job>
<job>
<id>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2.ff64650d-18cf-4dec-bef7-a5f245f7c740</id>
<parentTaskId>6220f0c1-c9ca-4d29-9ab5-25e69acba3b2</parentTaskId>
<type>POWER_ON</type>
<description>Deploy task's power on on virtual machine with id 12</description>
<state>DONE</state>
<rollbackState>UNKNOWN</rollbackState>
<creationTimestamp>1380820240</creationTimestamp>
<timestamp>1380820241</timestamp>
</job>
</jobs>
</task>

Delete a virtual appliance

Delete a Virtual Appliance.

Synopsis: DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}

Request Headers: Accept: ; Content-type: ;

Delete a virtual appliance example
curl -X DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/2\
-u user:password --verbose


DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/2 HTTP/1.1

HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:08:33 GMT
Set-Cookie: JSESSIONID=E3AD4A8891129A7D005E6B20210ECD2F; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzExMzg3NTplMGZhNjI1OTE3YzhjZjI3ZGIzZDIxOTYzMjU3ZGYyNTpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:33 GMT; Path=/api
Server: Apache-Coyote/1.1

Retrieve the state of the virtual appliance

Retrieves the state of the virtual appliance. This state is inferred by the state of the virtual machines belonging to this virtual appliance.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/state

Request Headers: Accept:application/vnd.abiquo.virtualappliancestate+json; version=3.1;application/vnd.abiquo.virtualappliancestate+xml; version=3.1; Content-type:-;

Response Message Body Entity: VirtualApplianceState Media Type

Retrieve the state of the virtual appliance example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances/5/state\
-H 'Accept: application/vnd.abiquo.virtualappliancestate+xml; version=3.1' \
-u user:password --verbose


> GET /api/cloud/virtualdatacenters/3/virtualappliances/5/state HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDg3NTIyMzQyODplMjRmMWFjN2EyNWRmMjI4NmNkOGJlN2IwZjE1MDhmOTpBQklRVU8; Expires=Fri, 04-Oct-2013 08:27:03 GMT; Path=/api
< Set-Cookie: JSESSIONID=9552E8DD3287B8BC2DADA2F1D6A0C748; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliancestate+xml;version=3.1
< Content-Length: 452
< Date: Fri, 04 Oct 2013 07:57:03 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualApplianceState> <link title="B_VDC_01" rel="parent" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="NOT_DEPLOYED" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/state"/> <power>NOT_DEPLOYED</power> </virtualApplianceState>

Modify a virtual appliance

Modifies a virtual appliance. To change the virtual appliance's name, just send a virtual appliance XML with the new name.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}
,
Request Headers: Accept:application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1; Content-type: application/vnd.abiquo.virtualappliance+json; version=3.1;application/vnd.abiquo.virtualappliance+xml; version=3.1;

Request Message Body Entity:
VirtualAppliance Media Type
Response Message Body Entity: VirtualAppliance Media Type

Modify a virtual appliance example
curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/3/virtualappliances/5\
-H 'Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.virtualappliance+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


> PUT /api/cloud/virtualdatacenters/3/virtualappliances/5 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.virtualappliance+xml; version=3.1
> Content-Type: application/vnd.abiquo.virtualappliance+xml; version=3.1
> Content-Length: 118
>

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MDg3NzcxOTU0Mjo3Yjg5YjFkY2NlMGE0ODgxMGFmZjRkMTgxNTBjNjhkNDpBQklRVU8; Expires=Fri, 04-Oct-2013 09:08:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=0856E0848021C9FCD48650B85851580D; Path=/api
< Content-Type: application/vnd.abiquo.virtualappliance+xml;version=3.1
< Content-Length: 1751
< Date: Fri, 04 Oct 2013 08:38:39 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualAppliance> <link title="E_VAPP_01" rel="edit" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5"/> <link title="B_VDC_01" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/virtualmachines"/> <link title="virtual appliances state" rel="state" type="application/vnd.abiquo.virtualappliancestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/state"/> <link title="undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/undeploy"/> <link title="deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/deploy"/> <link title="price" rel="price" type="text/plain" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/action/price"/> <link title="layers" rel="layers" type="application/vnd.abiquo.layers+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/3/virtualappliances/5/layers"/> <id>5</id> <error>0</error> <highDisponibility>0</highDisponibility> <name>E_VAPP_01</name> <publicApp>0</publicApp> <state>NOT_DEPLOYED</state> </virtualAppliance>

Get a list of layers with their virtual machines

Retrieve a list of layers with their virtual machines.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers

Request Headers: Accept:application/vnd.abiquo.layers+json; version=3.1;application/vnd.abiquo.layers+xml; version=3.1; Content-type: ;

Response Message Body Entity: Layers Media Type

Get a list of layers with their virtual machines example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers\
-H 'Accept: application/vnd.abiquo.layers+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers HTTP/1.1
Accept: application/vnd.abiquo.layers+xml;version=3.1


HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.layers+xml;version=3.1
Content-Length: 889

<?xml version="1.0" encoding="UTF-8"?> <layers> <layer> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers/layer1" rel="edit"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3" rel="virtualmachine" title="ABQ_2197af2d-1b52-4aee-97ae-cb96bb99d5be"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4" rel="virtualmachine" title="ABQ_6c4c3d19-99b5-4703-90c1-110d972312af"/> <name>layer1</name> </layer> <layer> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers/layer2" rel="edit"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/5" rel="virtualmachine" title="ABQ_6380c704-d949-4028-87a7-ed32c8651be6"/> <name>layer2</name> </layer> </layers>

Define new layer

Creates a new layer given a name and a single virtual machine(in any state)

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers

Request Headers: Accept:application/vnd.abiquo.layer+json; version=3.1;application/vnd.abiquo.layer+xml; version=3.1; Content-type:  application/vnd.abiquo.layer+json;version=3.1; application/vnd.abiquo.layer+xml; version=3.1;

Request Message Body Entity: Layer Media Type
Response Message Body Entity: Layer Media Type

Defines a new layer example
$ curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/16/layers\
-H 'Accept: application/vnd.abiquo.layer+xml; version=3.1 \
-H 'Content-Type: application/vnd.abiquo.layer+xml; version=3.1' \
-d @layer.xml \
-u user:password --verbose

HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: auth=YWRtaW46MTM2MzI5NTMxNTExMDplZmUzOTliN2ZhZmZjNzlhZmRiZTE5YmI2OWFlZGYxMDpBQklRVU8; Expires=Thu, 14-Mar-2013 21:08:35 GMT; Path=/api
Location: http://10.60.11.10:80/api/cloud/virtualdatacenters/1/virtualappliances/16/layers/layerA
Content-Type: application/vnd.abiquo.layer+xml;version=3.1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<layer>
<link title="ABQ_972c60fa-1121-45a6-b626-23262e43258e" rel="virtualmachine" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/16/virtualmachines/270"/>
<link rel="edit" type="application/vnd.abiquo.layer+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/16/layers/layerA"/>
<name>layerA</name>
</layer>

Get the list of virtual machines of a given layer

Retrieve the list of virtual machines of a given layer.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}
Request Headers: Accept:application/vnd.abiquo.layer+json; version=3.1;application/vnd.abiquo.layer+xml; version=3.1; Content-type: ;

Response Message Body Entity: Layer Media Type

Get the list of virtual machines of a given layer example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/layers/layerA\
-H 'Accept: application/vnd.abiquo.layer+xml;version=3.1' \
-u user:password --verbose


HTTP/1.1 200 OK
Date: Mon, 22 Oct 2012 08:33:52 GMT
Set-Cookie: JSESSIONID=27CFCBCDEE5E3593A439CD027FDF0A5C; Path=/api
Set-Cookie:

auth=YWRtaW46MTM1MDg5NjYzMjU4OTplMDFmMzcwMzQ3ZDE1NmRkYTJkYzc1ZGQwOWFmODVmNjpBQklRVU8;
Expires=Mon, 22-Oct-2012 09:03:52 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.layers+xml;version=3.1
Content-Length: 748

<?xml version="1.0" encoding="UTF-8"?>
<layer>
<link rel="edit" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/layers/layerA"/>
<link rel="virtualmachine" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/virtualmachines/240"/>
<link rel="virtualmachine" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/virtualmachines/241"/>
<name>layerA</name>
</layer>

Delete layer

The layer should be empty, with a single virtual machine in any state.

Synopsis: DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}

Deletes a layer example
curl -X DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/layers/layerA\
-u user:password --verbose


DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/layers/layerA HTTP/1.1

HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:11:25 GMT
Server: Apache-Coyote/1.1


Change layer name and virtual machines

Modify the name of a layer and its virtual machines.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}

Request Headers: Accept:application/vnd.abiquo.layer+json; version=3.1;application/vnd.abiquo.layer+xml; version=3.1; Content-type:  application/vnd.abiquo.layer+json;version=3.1; application/vnd.abiquo.layer+xml; version=3.1;

Request Message Body Entity: Layer Media Type
Response Message Body Entity: Layer Media Type

Change layer name and virtual machines example
curl -X PUT -u  'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/39/virtualappliances/38/layers/layerA'\
-H 'Accept: application/vnd.abiquo.layer+xml; version=3.1'\
-H 'Content-Type: application/vnd.abiquo.layer+xml; version=3.1'\
-d@putlayer.xml \
user:password

<layer>
<link rel="edit" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/40/virtualappliances/39/layers/modifiedLayer"/>
<link rel="virtualmachine" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/40/virtualappliances/39/virtualmachines/240"/>
<link rel="virtualmachine" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/40/virtualappliances/39/virtualmachines/241"/>
<name>modifiedLayer</name>
</layer>

Retrieve all virtual machines

Retrieve all virtual machines that belong to this virtual appliance with the standard virtual machine .

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines

Request Headers: Accept:application/vnd.abiquo.virtualmachines+json; version=3.1;application/vnd.abiquo.virtualmachines+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

offset

by

false

name

by default ordered by name

has

false

 

name filter

limit

false

25

number of items to retrieve

asc

false

true

whether the sorting of the list is ascendent or descendent

key

false

 

related with metadata information, allows to filter content in this field


Response Message Body Entity: VirtualMachines Media Type

Retrive all virtual machines example
$ curl --verbose -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines -H 'Accept:application/vnd.abiquo.virtualmachines+xml; version=3.1' -u user:password | xmlindent -nbe -f

> GET /api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: portal.cloud.claranet.com
> Accept:application/vnd.abiquo.virtualmachines+xml; version=3.1
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjQ1NzkzODkxOTowMDdjZWYyY2NmOTQ5YTZjYmU5YjE1Yzc4NGRjNDAwNjpBQklRVU8; Expires=Tue, 22-Oct-2013 16:05:38 GMT; Path=/api
< Set-Cookie: JSESSIONID=CFA635B88498FC517FC0C5CC2C53079A; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachines+xml;version=3.1
< Content-Length: 4714
< Date: Tue, 22 Oct 2013 15:35:38 GMT
<

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachines> <virtualMachine> <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/racks/1/machines/2"/> <link title="ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8" rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11"/> <link title="send mail" rel="sendmail" type="application/vnd.abiquo.mail+xml" href="https://portal.cloud.claranet.com:80/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/11/action/sendmail"/> <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1"/> <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/users/1"/> <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2"/> <link title="BVAPP_01" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3"/> <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations"/> <link title="192.168.5.0/24" rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations/4"/> <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/nics"/> <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/disks"/> <link title="ON" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/state"/> <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/undeploy"/> <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/deploy"/> <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/reset"/> <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/instance"/> <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/config/rdpaccess"/> <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/tasks"/> <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/volumes"/> <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/disks/1279"/> <link title="192.168.5.2" rel="nic0" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com:80/api/cloud/virtualdatacenters/2/privatenetworks/4/ips/770"/> <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/> <id>11</id> <uuid>c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</uuid> <name>ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</name> <description>root : abiquo</description> <cpu>1</cpu> <ram>64</ram> <hdInBytes>104857600</hdInBytes> <vdrpEnabled>true</vdrpEnabled> <vdrpPort>5901</vdrpPort> <vdrpIP>10.60.13.26</vdrpIP> <idState>4</idState> <state>ON</state> <idType>0</idType> <type>MANAGED</type> <highDisponibility>0</highDisponibility> <password>EomOkkVR</password> </virtualMachine> </virtualMachines>

Create a virtual machine

To create a virtual machine, you will need the link of the virtual appliance where the virtual machine will be created and a virtual machine entity. 

Virtual Machine Entity Example 1

The simplest virtual machine entity is a link to the virtual machine template in the datacenter repository, in the virtual machine format as shown in the following example.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachine>
<link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4" rel="virtualmachinetemplate" title="Core"/>
</virtualMachine>

Virtual Machine Entity Example 2

When creating a virtual machine, you can set more values in the VirtualMachine Media Type. In this example we will give the virtual machine a higher specification than the template (2 CPUs instead of 1,and 128 MB of RAM instead of 64). And we will enable remote access and set a custom password.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachine>
<link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://10.60.1.31:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
<cpu>2</cpu>
<ram>128</ram>
<vdrpEnabled>true</vdrpEnabled>
<password>myvmpass</password>
</virtualMachine>

Create the Virtual Machine

With the link of the virtual machine template in the entity,you can instantiate the virtual machine at the virtualmachines link from the virtual appliance.

The name of the virtual machine is not the same as you can see through our GUI. The virtual machine name field holds the identifier of the virtual machine itself in the hypervisor. If you want to change the virtual machine's name to a more friendly name you must change the nodeName. A node is the representation of a member of a virtual appliance with a name. This representation has'application/vnd.abiquo.virtualmachinewithnode+xml' media type. 

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines

Request Headers: Accept:application/vnd.abiquo.virtualmachine+json; version=3.1;application/vnd.abiquo.virtualmachine+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachine+json; version=3.1;application/vnd.abiquo.virtualmachine+xml; version=3.1;

Request Message Body Entity:
VirtualMachine Media Type
Response Message Body Entity: VirtualMachine Media Type

Create a virtual machine example
curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines\
-H 'Accept: application/vnd.abiquo.virtualmachine+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.virtualmachine+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines HTTP/1.1
Accept: application/vnd.abiquo.virtualmachine+xml;version=3.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=3.1
Content-Length: 607


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:07:20 GMT
Location: https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4
Set-Cookie: JSESSIONID=BF2E17155FCE5BD00284BF2E84D2525D; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzA0MDc5ODplMmIzN2Q3ODFlNmNlNGUyMTNkNjExNTkwY2NjNjA0ZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:20 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=3.1
Content-Length: 3729

<?xml version="1.0" encoding="UTF-8"?> <virtualmachine> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4" rel="edit" type="application/vnd.abiquo.virtualmachine+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1" rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1" rel="user" type="application/vnd.abiquo.user+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="VMX_04" type="application/vnd.abiquo.virtualdatacenter+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=3.1"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/nics" rel="nics" type="application/vnd.abiquo.nics+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/state" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/instance" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/volumes" rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers/layer1" rel="layer" type="application/vnd.abiquo.layer+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml"/> <link href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT" rel="conversion" type="application/vnd.abiquo.conversion+xml"/> <cpu>2</cpu> <hdInBytes>27262976</hdInBytes> <highDisponibility>0</highDisponibility> <id>4</id> <idState>1</idState> <idType>1</idType> <layer>layer1</layer> <name>ABQ_6c4c3d19-99b5-4703-90c1-110d972312af</name> <ram>128</ram> <state>NOT_ALLOCATED</state> <uuid>6c4c3d19-99b5-4703-90c1-110d972312af</uuid> <vdrpPort>0</vdrpPort> </virtualmachine>

Retrieve a Task

Displays a specific Task on the Virtual Machine. Tasks are a set of jobs (operations on hypervisors). Any of these Tasks may still be in progress. Every Task has a UUID.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/tasks/{id}

Request Headers: Accept:application/vnd.abiquo.task+json; version=3.1;application/vnd.abiquo.task+xml; version=3.1;  Content-type:;

Response Message Body Entity: Task Media Type

Retrieve a Task example
curl --verbose -X GET -u user:password 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user'
> GET /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: portal.cloud.claranet.com

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <tasks> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="self"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21" rel="parent"/> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/4887f058-7ecf-4765-b090-f6b3ee0f8d8a" rel="self"/> <jobs> <job> <description/> <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.b8ece5a2-6382-42e3-809d-b9ecbb5d3c42</id> <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325692664</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.78c5c510-35a7-4938-abe4-092c4227c756</id> <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325692664</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</taskId> <timestamp>1325692664</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2efd9192-84ab-4b3f-b58f-4665dc42d21b" rel="self"/> <jobs> <job> <description/> <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.1a09eb1e-cc6b-4009-af48-02633ec920a1</id> <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325605822</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.40461ea7-b25e-4f13-9095-998b111f920c</id> <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325605822</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</taskId> <timestamp>1325605822</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2610719a-1601-482e-aebb-6bdcad9b038d" rel="self"/> <jobs> <job> <description/> <id>2610719a-1601-482e-aebb-6bdcad9b038d.27010ecf-dbf7-4535-b229-75cec9df5c2d</id> <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId> <rollbackState>ROLLBACK_DONE</rollbackState> <state>ROLLBACK_DONE</state> <timestamp>1324310064</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>2610719a-1601-482e-aebb-6bdcad9b038d.2cc82257-09c7-4fc8-802c-295b0693ffd7</id> <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId> <rollbackState>ROLLBACK_DONE</rollbackState> <state>FAILED</state> <timestamp>1324310064</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_UNSUCCESSFULLY</state> <taskId>2610719a-1601-482e-aebb-6bdcad9b038d</taskId> <timestamp>1324310064</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> </tasks>

Retrieve a Virtual Machine

Retrieve the Virtual Machine

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Request Headers: Accept:application/vnd.abiquo.virtualmachine+json; version=3.1;application/vnd.abiquo.virtualmachine+xml; version=3.1; Content-type: ;

Response Message Body Entity: VirtualMachine Media Type

Retrieve a Virtual Machine example
curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36\
-u user:password \
-H 'Accept: application/vnd.abiquo.virtualmachine+xml;version=3.1'\
--verbose

GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.virtualmachine+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=345EEEEB15CD6FF5933058A46DC55649; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMTk0MjoxZmYyZmM4ODZhMzI3YzA3NGIxNjE1NTQ1Y2I5NjU3MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=3.1
Content-Length: 3484
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualmachine> <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/configurations"/> <link rel="conversion" type="application/vnd.abiquo.conversion+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"/> <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/deploy"/> <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36"/> <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/> <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/disks"/> <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/instance"/> <link rel="nics" type="application/vnd.abiquo.nics+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/nics"/> <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/reset"/> <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/state"/> <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/tasks"/> <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/undeploy"/> <link rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1"/> <link rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=3.1" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/> <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1"/> <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"/> <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/volumes"/> <cpu>2</cpu> <dvd/> <hdInBytes>27262976</hdInBytes> <highDisponibility>0</highDisponibility> <id>36</id> <idState>1</idState> <idType>1</idType> <name>ABQ_2eff8933-697e-4dcf-aa3b-73ed783aa110</name> <ram>128</ram> <state>NOT_ALLOCATED</state> <uuid>2eff8933-697e-4dcf-aa3b-73ed783aa110</uuid> <vdrpPort>0</vdrpPort> </virtualmachine>

Delete a Virtual Machine

If the Virtual Machine exists in the hypervisor, it will be removed from the hypervisor as well. A virtual machine can be deleted if its state is DEPLOYED, NOT_ALLOCATED or UNKNOWN.

Synopsis: DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}

Request Headers: Accept: ; Content-type: ;

Delete a Virtual Machine example
curl -X DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/15\
-u user:password --verbose


DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/15 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:08:38 GMT
Set-Cookie: JSESSIONID=28222FCF3CF9E2F47A8B07DE884155E0; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzExOTY3Njo3ZGZmODJjY2JlMDM0ZDdjODM0YjM4ODYxYmM2Zjk2NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:39 GMT; Path=/api
Server: Apache-Coyote/1.1

Deploy a Virtual Machine

Deploys the Virtual Machine. This call returns a 202 HTTP code(accepted) and a URI where you can keep track of the deploy.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/deploy

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

force

NO

false

Possible values are "true" or "false". If "true", soft limits of virtual datacenters could be surpassed


Response Message Body Entity: AcceptedRequest Media Type

Deploy a Virtual Machine example
curl --verbose -X POST -u user:password 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy?force=true'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user'
> POST /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: portal.cloud.claranet.com

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c54" rel=”task"/>
</acceptedrequest

Retrieve all Tasks for this Virtual Machine

Displays the Tasks on the Virtual Machine. Tasks are a set of jobs (operations on hypervisors). Any of these Tasks may still be in progress.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/tasks

Request Headers: Accept:application/vnd.abiquo.tasks+json; version=3.1;application/vnd.abiquo.tasks+xml; version=3.1; Content-type: ;

Response Message Body Entity: Tasks Media Type

Retrieve all Tasks for this Virtual Machine example
curl --verbose -X GET -u user:password 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user'
> GET /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: portal.cloud.claranet.com

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <tasks> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="self"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21" rel="parent"/> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/4887f058-7ecf-4765-b090-f6b3ee0f8d8a" rel="self"/> <jobs> <job> <description/> <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.b8ece5a2-6382-42e3-809d-b9ecbb5d3c42</id> <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325692664</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.78c5c510-35a7-4938-abe4-092c4227c756</id> <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325692664</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</taskId> <timestamp>1325692664</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2efd9192-84ab-4b3f-b58f-4665dc42d21b" rel="self"/> <jobs> <job> <description/> <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.1a09eb1e-cc6b-4009-af48-02633ec920a1</id> <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325605822</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.40461ea7-b25e-4f13-9095-998b111f920c</id> <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId> <rollbackState>UNKNOWN</rollbackState> <state>DONE</state> <timestamp>1325605822</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_SUCCESSFULLY</state> <taskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</taskId> <timestamp>1325605822</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> <task> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2610719a-1601-482e-aebb-6bdcad9b038d" rel="self"/> <jobs> <job> <description/> <id>2610719a-1601-482e-aebb-6bdcad9b038d.27010ecf-dbf7-4535-b229-75cec9df5c2d</id> <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId> <rollbackState>ROLLBACK_DONE</rollbackState> <state>ROLLBACK_DONE</state> <timestamp>1324310064</timestamp> <type>CONFIGURE</type> </job> <job> <description/> <id>2610719a-1601-482e-aebb-6bdcad9b038d.2cc82257-09c7-4fc8-802c-295b0693ffd7</id> <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId> <rollbackState>ROLLBACK_DONE</rollbackState> <state>FAILED</state> <timestamp>1324310064</timestamp> <type>POWER_ON</type> </job> </jobs> <ownerId>21</ownerId> <state>FINISHED_UNSUCCESSFULLY</state> <taskId>2610719a-1601-482e-aebb-6bdcad9b038d</taskId> <timestamp>1324310064</timestamp> <type>DEPLOY</type> <userId>admin</userId> </task> </tasks>

Change the state of a Virtual Machine

The allowed states are: OFF, PAUSED, ON.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/state

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinestate+json; version=3.1;application/vnd.abiquo.virtualmachinestate+xml; version=3.1;

Request Message Body Entity: VirtualMachineState Media Type
Response Message Body Entity: AcceptedRequest Media Type

Change the state of a Virtual Machine example
curl --verbose -X PUT -u user:password -H ‘Content-type: application/xml’ -d ‘<virtualmachinestate><state>ON</state></virtualmachinestate>’ 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user' > PUT /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state HTTP/1.1 > Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22 > Host: portal.cloud.claranet.com
<virtualmachinestate>
<state>ON</state>
</virtualmachinestate>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c43" rel=”task"/>
</acceptedrequest>
You can track the state task at this URL.

Reset a Virtual Machine

Power cycles a Virtual Machine

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/reset

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: ;

Response Message Body Entity: AcceptedRequest Media Type

Reset a Virtual Machine example
curl --verbose -X PUT -u user:password -H ‘Content-type: application/xml’ -d ‘<virtualmachinestate><state>ON</state></virtualmachinestate>’ 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user'
> PUT /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state HTTP/1.1 > Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22 > Host: portal.cloud.claranet.com
<virtualmachinestate>
<state>ON</state>
</virtualmachinestate>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c43" rel=”task"/>
</acceptedrequest>
You can track the state task at this URL.

Instance a Virtual Machine

Instance the Virtual Machine with the given name. This call returns a 202 HTTP code(accepted) and a URI where you can keep track of the instance task.

You must send the final name for the instance in a virtual machine instance as shown in the example below.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/instance

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachineinstance+json; version=3.1;application/vnd.abiquo.virtualmachineinstance+xml;version=3.1;

Request Message Body Entity:
VirtualMachineInstance Media Type
Response Message Body Entity: AcceptedRequest Media Type

Instance a Virtual Machine example
curl --verbose -X POST 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/16/virtualappliances/15/virtualmachines/22/action/instance' \
-H "Accept: application/vnd.abiquo.acceptedrequest+xml; version=3.1;" \
-H "Content-Type: application/vnd.abiquo.virtualmachineinstance+xml; version=3.1;" \
-u user:password \
-d '<virtualmachineinstance>
<instanceName>monowall_instance</instanceName>
</virtualmachineinstance>'

Retrieve the state of the Virtual Machine

Retrieve the current state

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/state
Request Headers: Accept:application/vnd.abiquo.virtualmachinestate+json; version=3.1;application/vnd.abiquo.virtualmachinestate+xml; version=3.1; Content-type: ;

Response Message Body Entity: VirtualMachineState Media Type

Retrieve the state of the Virtual Machine example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state\
-H 'Accept: application/vnd.abiquo.virtualmachinestate+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.virtualmachinestate+xml;version=3.1


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=6012FCE46F84B3482E838F2D212DDDC3; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMjAwOTpjNjEyOTIyYTI4MmM0ZDNiYmIxMjc2MzZlN2E2Mjg4MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:42 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinestate+xml;version=3.1
Content-Length: 469

<?xml version="1.0" encoding="UTF-8"?> <virtualmachinestate> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state" rel="edit" type="application/vnd.abiquo.virtualmachinestate+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1" rel="parent" type="application/vnd.abiquo.virtualmachine+xml"/> <state>NOT_ALLOCATED</state> </virtualmachinestate>

Undeploy the Virtual Machine

Perform an undeploy. This means that after the call, the Virtual Machine will be in the NOT_ALLOCATED state. If the undeploy is successful, the Virtual Machine will be deleted from the hypervisor. If the Virtual Machine is in the ON state, we will perform a power off before the deconfigure. You can also set the force undeploy parameter in the Virtual Machine Task entity.If this is set to true, the imported Virtual Machines are also deleted.

This call returns a 202 HTTP code (accepted) and a URI where you can keep track of the undeploy.

The possible option for an undeploy is -forceUndeploy. If this flag is set to false we do not undeploy imported Virtual Machines.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/undeploy

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachinetask+json; version=3.1;application/vnd.abiquo.virtualmachinetask+xml; version=3.1;

Request Message Body Entity: VirtualMachineTask Media Type
Response Message Body Entity: AcceptedRequest Media Type

Undeploy the Virtual Machine example
curl --verbose -X POST -u user:password -H 'Content-type: application/vnd.abiquo.virtualmachinetask+xml' -d '<virtualmachinetask><forceUndeploy>false</forceUndeploy></virtualmachinetask>' 'https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/undeploy'
* About to connect() to portal.cloud.claranet.com port 80 (#0)
* Trying portal.cloud.claranet.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to portal.cloud.claranet.com (portal.cloud.claranet.com) port 80 (#0)
* Server auth using Basic with user 'user' > POST /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/undeploy HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: portal.cloud.claranet.com
<virtualmachinetask>
<forceUndeploy>false</forceUndeploy>
</virtualmachinetask>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c53" rel=”task"/>
</acceptedrequest>
You can track the undeploy task at this URL.

Modify a Virtual Machine

Modify a Virtual Machine

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type: application/vnd.abiquo.virtualmachine+json; version=3.1;application/vnd.abiquo.virtualmachine+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force to update

Request Message Body Entity: VirtualMachine Media Type
Response Message Body Entity: AcceptedRequest Media Type

Update a AcceptedRequestDto entity. example
curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true\
-H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.virtualmachine+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.acceptedrequest+xml;version=3.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=3.1
Content-Length: 4960


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=CB6B4E503D4C3CAC6A076ADD7855A0BA; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3MjAyMTo4NmY0NzIyNWYxMzFjMzNkMTRjM2YwZWFlMjY2YWE1NDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1

Get the details of an attached volume

Get the details of a volume attached to the virtual machine.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/storage/volumes/{volume}

Request Headers: Accept:application/vnd.abiquo.volume+json; version=3.1;application/vnd.abiquo.volume+xml; version=3.1; Content-type: ;

Response Message Body Entity: VolumeManagement Media Type

Get the details of an attached volume example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes/763 \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.volume+xml;version=3.1"

> GET /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes/763 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.volume+xml;version=3.1
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Aug 2012 07:32:14 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTUzNjEzNDYyNDo1ODBkZDdhODY3MTkxNzhkYjhmYTNiMzJjYmUwZGNlOTpBQklRVU8; Expires=Tue, 21-Aug-2012 08:02:14 GMT; Path=/api
< Set-Cookie: JSESSIONID=938DFE6D493763DF1A1C12292C35B324; Path=/api
< Content-Type: application/vnd.abiquo.volume+xml;version=3.1
< Content-Length: 1162
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <volume> <link rel="edit" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763"/> <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763/action/initiatormappings"/> <link title="Seaside Storage" rel="tier" type="application/vnd.abiquo.tier+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1"/> <link title="Kalakaua" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/> <link title="Kaahumanu" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1"/> <link title="ABQ_1312f043-69ef-4d5d-b1c4-3853bbdbcd17" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/> <id>763</id> <name>Cocovol</name> <state>ATTACHED</state> <sizeInMB>32</sizeInMB> </volume>

List the volumes attached to the virtual machine

List the volumes attached to the virtual machine. Volumes are external block devices that can be attached to the virtual machines using the iSCSI protocol.

Data stored in these external volumes will be persistent (even when the virtual machine is undeployed) until the volume is deleted from the target storage device.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/storage/volumes
Request Headers: Accept:application/vnd.abiquo.iscsivolumes+json; version=3.1;application/vnd.abiquo.iscsivolumes+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve.

by

false

id

Search order criteria.

has

false

 

A way to filter the search. Ex. by volume name.

limit

false

25

Number of elements to retrieve.

asc

false

true

The way to order the search (ascendant -> true,descendant -> false). Ascendant by
default.

Request Message Body Entity:
Response Message Body Entity: VolumesManagement Media Type

List the volumes attached to the virtual machine example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.iscsivolumes+xml;version=3.1"

> GET /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.iscsivolumes+xml;version=3.1
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Aug 2012 07:33:26 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTUzNjIwNjc5NjpkNTVjZGY5ZWZhZDY5MGJlZDhmMjgzNmZkOGYzYTg5YTpBQklRVU8; Expires=Tue, 21-Aug-2012 08:03:26 GMT; Path=/api
< Set-Cookie: JSESSIONID=E0FD406AA4706D4F19602BEF394FA7CF; Path=/api
< Content-Type: application/vnd.abiquo.iscsivolumes+xml;version=3.1
< Content-Length: 1181
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <volumes> <volume> <link rel="edit" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763"/> <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763/action/initiatormappings"/> <link title="Seaside Storage" rel="tier" type="application/vnd.abiquo.tier+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1"/> <link title="Kalakaua" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/> <link title="Kaahumanu" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1"/> <link title="ABQ_1312f043-69ef-4d5d-b1c4-3853bbdbcd17" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/> <id>763</id> <name>Cocovol</name> <state>ATTACHED</state> <sizeInMB>32</sizeInMB> </volume> </volumes>

Get the details of an attached hard disk

Get the details of a hard disk attached to the virtual machine.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/storage/disks/{disk}

Request Headers: Accept:application/vnd.abiquo.harddisk+json; version=3.1;application/vnd.abiquo.harddisk+xml; version=3.1; Content-type: ;
Response Message Body Entity: DiskManagement Media Type

Get the details of an attached hard disk example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks/1019 \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.harddisk+xml;version=3.1"

> GET /api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks/1019 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.harddisk+xml;version=3.1
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Aug 2012 07:13:38 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTUzNTAxODk3Njo4YzQ3YzkxMDBlYTRiNGU4ZGZhMjkxMmM4MzY1ZGRkNjpBQklRVU8; Expires=Tue, 21-Aug-2012 07:43:38 GMT; Path=/api
< Set-Cookie: JSESSIONID=75F85738839C8943719E4D147A920E26; Path=/api
< Content-Type: application/vnd.abiquo.harddisk+xml;version=3.1
< Content-Length: 291
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <disk> <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks/1019"/> <sequence>0</sequence> <sizeInMb>2048</sizeInMb> </disk>

List the hard disks attached to the virtual machine

List the hard disks attached to the virtual machine. Hard disks are created in the hypervisor's datastore, and are attached tot he virtual machine as additional hard disks.

Data stored in these external hard disks will NOT be persistent. The hard disks will be destroyed when the virtual machine is undeployed. If additional and persistent storage is needed, use the external volumes instead.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/storage/disks

Request Headers: Accept:application/vnd.abiquo.harddisks+json; version=3.1;application/vnd.abiquo.harddisks+xml; version=3.1; Content-type: ;

Response Message Body Entity: DisksManagement Media Type

List the hard disks attached to the virtual machine example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.harddisks+xml;version=3.1"

> GET /api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.harddisks+xml;version=3.1
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Aug 2012 07:01:20 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTUzNDI4MDM4NTozMzJhNDU0NjgyOWViY2UwNDQxYTVkYTFkNjU2ZGI1ZjpBQklRVU8; Expires=Tue, 21-Aug-2012 07:31:20 GMT; Path=/api
< Set-Cookie: JSESSIONID=DDA46BF05AA3FA6E3B6A744A5C8E6A3A; Path=/api
< Content-Type: application/vnd.abiquo.harddisks+xml;version=3.1
< Content-Length: 307
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <disks> <disk> <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/disks/1018"/> <sequence>0</sequence> <sizeInMb>10240</sizeInMb> </disk> </disks>

Retrieve the possible network configuration

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/network/configurations

Request Headers: Accept:application/vnd.abiquo.virtualmachinenetworkconfigurations+json;version=3.1;application/vnd.abiquo.virtualmachinenetworkconfigurations+xml;version=3.1;  Content-type: ;

Response Message Body Entity: VMNetworkConfigurations Media Type

Retrive the posible network configuration example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.virtualmachinenetworkconfigurations+xml;version=3.1"

GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.virtualmachinenetworkconfigurations+xml;version=3.1

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:56:10 GMT
Keep-Alive: timeout=15, max=8
Set-Cookie: JSESSIONID=08901BE90E1CB46E329495B9A5E55897.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjM3MDY5MTpkZmI0MjkxNTI1YjFiM2MzNzNjNDFjZGZlY2RhZDNjZjpBQklRVU8; Expires=Mon, 28-Jan-2013 11:26:10 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.virtualmachinenetworkconfigurations+xml;version=3.1
Content-Length: 420

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vmnetworkconfigurations> <vmnetworkconfiguration> <link rel="edit" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations/1"/> <gateway>80.80.80.1</gateway> <id>1</id> <used>false</used> </vmnetworkconfiguration> </vmnetworkconfigurations>

Get the details of a network configuration

Get the details of a network configuration that can be assigned to the virtual machine. Network configurations provide the default gateway address, DNS suffix, static routes, etc, that can be applied to a virtual machine.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/network/configurations/{configuration}

Request Headers: Accept:application/vnd.abiquo.virtualmachinenetworkconfiguration+json;version=3.1;application/vnd.abiquo.virtualmachinenetworkconfiguration+xml;version=3.1;  Content-type: ;

Response Message Body Entity: VMNetworkConfiguration Media Type

Get the details of a network configuration example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations/1 \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.virtualmachinenetworkconfiguration+xml;version=3.1"

GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations/1 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.virtualmachinenetworkconfiguration+xml;version=3.1

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:56:10 GMT
Keep-Alive: timeout=15, max=8
Set-Cookie: JSESSIONID=08901BE90E1CB46E329495B9A5E55897.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjM3MDY5MTpkZmI0MjkxNTI1YjFiM2MzNzNjNDFjZGZlY2RhZDNjZjpBQklRVU8; Expires=Mon, 28-Jan-2013 11:26:10 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.virtualmachinenetworkconfiguration+xml;version=3.1
Content-Length: 420

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vmnetworkconfiguration> <link rel="edit" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations/1"/> <gateway>80.80.80.1</gateway> <id>1</id> <used>false</used> </vmnetworkconfiguration>

List the attached NICs

Show details of the NICs attached to the virtual machine.

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/network/nics

Request Headers: Accept:application/vnd.abiquo.nics+json; version=3.1;application/vnd.abiquo.nics+xml; version=3.1;  Content-type:;

Response Message Body Entity: Nics Media Type

List the attached NICs example
curl https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics \
-v -u user:pass \
-X GET \
-H "Accept: application/vnd.abiquo.nics+xml;version=3.1"

> GET /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZAo=
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: portal.cloud.claranet.com
> Accept: application/vnd.abiquo.nics+xml;version=3.1
>
< HTTP/1.1 200 OK
< Date: Tue, 21 Aug 2012 06:51:38 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTUzMzY5ODAyNzo0YmEyNDBiYTlmYmM0Mzk3MjVlYTk0ZjQ1MDEzYWMwNjpBQklRVU8; Expires=Tue, 21-Aug-2012 07:21:38 GMT; Path=/api
< Set-Cookie: JSESSIONID=45D02BA0A083897C4B689AD6ABC1DCB9; Path=/api
< Content-Type: application/vnd.abiquo.nics+xml;version=3.1
< Content-Length: 645
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <nics> <nic> <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/4/ips/510"/> <link title="Kaahumanu Network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/privatenetworks/4"/> <link rel="self" type="application/vnd.abiquo.nic+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics/510"/> <id>510</id> <ip>192.168.1.2</ip> <mac>fe:32:32:0b:e3:94</mac> <sequence>0</sequence> </nic> </nics>

Retrieve volumes

Retrieve the list of volumes in a specified virtual datacenter

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes
Request Headers: Accept:application/vnd.abiquo.iscsivolumes+json; version=3.1;application/vnd.abiquo.iscsivolumes+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve

by

false

id

How to order the search. Available values are: {NAME,VIRTUALDATACENTER,
VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE,USEDSIZE, AVAILABLESIZE}

has

false

 

A way to filter the search. It can be filtered by:Volume name, Virtual Datacenter
name, Virtual Appliance name, Virtual Machine name, Tier name, Total size

limit

false

25

Number of elements to retrieve.

asc

false

true

The way to order the search (ascendant -> true,descendant -> false). Ascendant by
default.

available

false

false

Retrieve all or only available volumes (only available -> true, all ->
false)

persistent

false

true

Include or not the persistent volumes in the result

Request Message Body Entity:
Response Message Body Entity: VolumesManagement Media Type

Retrieve volumes example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes\
-H 'Accept: application/vnd.abiquo.iscsivolumes+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes HTTP/1.1
Accept: application/vnd.abiquo.iscsivolumes+xml;version=3.1
HTTP/1.1 200 OK
Content-Type: application/vnd.abiquo.iscsivolumes+xml;version=3.1

<?xml version="1.0" encoding="UTF-8"?> <volumes> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes" rel="first"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes?startwith=0" rel="last"/> <totalSize>1</totalSize> <volume> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530" rel="edit" type="application/vnd.abiquo.volume+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530/action/initiatormappings" rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="Aloha updated" type="application/vnd.abiquo.virtualdatacenter+xml"/> <id>1530</id> <name>Hawaian volume updated</name> <state>DETACHED</state> <sizeInMB>32</sizeInMB> <sequence>0</sequence> </volume> </volumes>

Retrieve volumes including virtual machine, virtual appliance and virtual datacenter.

Retrieve the list of volumes in a specified virtual datacenter, including the representation of the virtual machine,virtual appliance and virtual datacenter, if the volume is attached to a virtual machine

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Request Headers: Accept:application/vnd.abiquo.iscsivolumeswithvirtualmachine+json;version=3.1;application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve

by

false

id

How to order the search. Available values are: {NAME,VIRTUALDATACENTER,
VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE,USEDSIZE, AVAILABLESIZE}

has

false

 

A way to filter the search. It can be filtered by:Volume name, Virtual Datacenter
name, Virtual Appliance name, Virtual Machine name, Tier name, Total size

limit

false

25

Number of elements to retrieve.

asc

false

true

The way to order the search (ascendant -> true,descendant -> false). Ascendant by
default.

persistent

false

true

Include or not the persistent volumes in the result

Request Message Body Entity:
Response Message Body Entity: VolumesManagementWithVirtualMachine Media Type

Retrieve volumes example
curl --verbose -X GET  https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes
-H "Accept: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml; version=3.1"
-u user:password

GET /api/cloud/virtualdatacenters/2/volumes HTTP/1.1
Accept: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml; version=3.1

< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=3.1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <volumes> <link rel="first" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes?limit=25&amp;by=id"/> <link rel="last" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes?startwith=0&amp;limit=25&amp;by=id"/> <totalSize>2</totalSize> <volume> <link rel="edit" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/255"/> <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/255/action/initiatormappings"/> <link title="Default Tier 1" rel="tier" type="application/vnd.abiquo.tier+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/tiers/1"/> <link title="vd2" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2"/> <id>255</id> <uuid>ee6400b8-f6b3-4bfc-be28-877e38348805</uuid> <name>vol1</name> <description/> <state>DETACHED</state> <sizeInMB>102</sizeInMB> <virtualDatacenterWithDatacenter> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <hypervisorType>VMX_04</hypervisorType> <name>vd2</name> <datacenter> <id>1</id> <location>oslo</location> <name>datacenter</name> </datacenter> </virtualDatacenterWithDatacenter> <storagePoolWithDevice> <idStorage>178f2137-3018-4bc1-9db0-a7575c7ab8de</idStorage> <name>abiquo</name> <totalSizeInMb>15360</totalSizeInMb> <usedSizeInMb>6942</usedSizeInMb> <availableSizeInMb>8417</availableSizeInMb> <enabled>false</enabled> <device> <id>1</id> <name>lvm</name> <storageTechnology>LVM</storageTechnology> <managementIp>10.60.12.177</managementIp> <managementPort>8180</managementPort> <iscsiIp>10.60.12.177</iscsiIp> <iscsiPort>3260</iscsiPort> </device> </storagePoolWithDevice> </volume> <volume> <link rel="edit" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/512"/> <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/512/action/initiatormappings"/> <link title="Default Tier 2" rel="tier" type="application/vnd.abiquo.tier+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/tiers/2"/> <link title="vd2" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2"/> <id>512</id> <uuid>vol1</uuid> <name>vol</name> <state>DETACHED</state> <sizeInMB>200</sizeInMB> <virtualDatacenterWithDatacenter> <cpuHard>0</cpuHard> <cpuSoft>0</cpuSoft> <hdHard>0</hdHard> <hdSoft>0</hdSoft> <publicIpsHard>0</publicIpsHard> <publicIpsSoft>0</publicIpsSoft> <ramHard>0</ramHard> <ramSoft>0</ramSoft> <storageHard>0</storageHard> <storageSoft>0</storageSoft> <vlansHard>0</vlansHard> <vlansSoft>0</vlansSoft> <id>2</id> <hypervisorType>VMX_04</hypervisorType> <name>vd2</name> <datacenter> <id>1</id> <location>oslo</location> <name>datacenter</name> </datacenter> </virtualDatacenterWithDatacenter> <storagePoolWithDevice> <idStorage>6c507932-fe21-4a2c-85ee-7fb21066e22d</idStorage> <name>iscsi_pool</name> <totalSizeInMb>9223372036854775807</totalSizeInMb> <usedSizeInMb>0</usedSizeInMb> <availableSizeInMb>9223372036854775807</availableSizeInMb> <enabled>false</enabled> <device> <id>2</id> <name>iscsi</name> <storageTechnology>GENERIC_ISCSI</storageTechnology> <managementIp>10.60.11.7</managementIp> <managementPort>3260</managementPort> <iscsiIp>10.60.11.7</iscsiIp> <iscsiPort>3260</iscsiPort> </device> </storagePoolWithDevice> </volume> </volumes>

Create a volume in a virtual datacenter

To create a Volume in the Virtual Datacenter, a Tier must be specified. The Tier is the service level desired for the volume,and it must be supplied in the request body.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Request Headers: Accept:application/vnd.abiquo.volume+json; version=3.1;application/vnd.abiquo.volume+xml; version=3.1; Content-type:  application/vnd.abiquo.volume+json;version=3.1; application/vnd.abiquo.volume+xml; version=3.1;

Request Message Body Entity: VolumeManagement Media Type
Response Message Body Entity: VolumeManagement Media Type

Create a volume in a virtual datacenter example
$ curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes\
-H 'Accept: application/vnd.abiquo.volume+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.volume+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes HTTP/1.1
Accept: application/vnd.abiquo.volume+xml;version=3.1
Content-Type: application/vnd.abiquo.volume+xml;version=3.1
Content-Length: 252


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:06:46 GMT
Location: https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763
Set-Cookie: JSESSIONID=11351FE4B380F2F1C2808405320D1687; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0Njk4MTQ2OTpjYzFlOGYxMjNlM2E2N2JiNGI1NmFiZGY2NTdmZDM0MzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:36:21 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.volume+xml;version=3.1
Content-Length: 804

<?xml version="1.0" encoding="UTF-8"?> <volume> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763" rel="edit" type="application/vnd.abiquo.volume+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/763/action/initiatormappings" rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="JC-1ee3e168-c87" type="application/vnd.abiquo.virtualdatacenter+xml"/> <id>763</id> <name>JC-Event vol</name> <state>DETACHED</state> <sizeInMB>32</sizeInMB> <sequence>0</sequence> </volume>

Retrieve a volume

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/{volume}

Request Headers: Accept:application/vnd.abiquo.volume+json; version=3.1;application/vnd.abiquo.volume+xml; version=3.1; Content-type: ;

Response Message Body Entity: VolumeManagement Media Type

Retrieve a volume example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530\
-H 'Accept: application/vnd.abiquo.volume+xml; version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530 HTTP/1.1
Accept: application/vnd.abiquo.volume+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:04 GMT
Set-Cookie: JSESSIONID=A4CC95EA521B38A1C998D3C608FA8612; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE0NDg5MTo2MzA1ODY0OTc4ZThkZmZmMDRiYmRmZTk1MWU0MmE0YzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:04 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.volume+xml;version=3.1
Content-Length: 810

<?xml version="1.0" encoding="UTF-8"?> <volume> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530" rel="edit" type="application/vnd.abiquo.volume+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530/action/initiatormappings" rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="Aloha updated" type="application/vnd.abiquo.virtualdatacenter+xml"/> <id>1530</id> <name>JC-Hawaian volume</name> <state>DETACHED</state> <sizeInMB>32</sizeInMB> <sequence>0</sequence> </volume>

Retrieve a volume adding the virtual machine info

Synopsis: GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/{volume}

Request Headers: Accept:application/vnd.abiquo.iscsivolumewithvirtualmachine+json;version=3.1;application/vnd.abiquo.iscsivolumewithvirtualmachine+xml;version=3.1;  Content-type: ;

Response Message Body Entity: VolumeManagementWithVirtualMachine Media Type

Retrieve a volume adding the virtual machine info example
$ curl -X GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530\
-H 'Accept: application/vnd.abiquo.volume+xml; version=3.1' \
-u user:password --verbose



GET https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530 HTTP/1.1
Accept: application/vnd.abiquo.volume+xml;version=3.1

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:04 GMT
Set-Cookie: JSESSIONID=A4CC95EA521B38A1C998D3C608FA8612; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE0NDg5MTo2MzA1ODY0OTc4ZThkZmZmMDRiYmRmZTk1MWU0MmE0YzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:04 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.volume+xml;version=3.1
Content-Length: 810


<?xml version="1.0" encoding="UTF-8"?> <volume> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530" rel="edit" type="application/vnd.abiquo.volume+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530/action/initiatormappings" rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/tiers/1" rel="tier" title="Default Tier 1" type="application/vnd.abiquo.tier+xml"/> <link href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1" rel="virtualdatacenter" title="Aloha updated" type="application/vnd.abiquo.virtualdatacenter+xml"/> <id>1530</id> <name>JC-Hawaian volume</name> <state>DETACHED</state> <sizeInMB>32</sizeInMB> <sequence>0</sequence> </volume>

Modify a volume

To update an existing volume in a Virtual Datacenter, you can modify the following
properties : name, description, sizeInMB; as shown in the example below. However, you
can't decrease the size of the volume, but only increase it.

Synopsis: PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/{volume}

Request Headers: Accept:application/vnd.abiquo.acceptedrequest+json; version=3.1;application/vnd.abiquo.acceptedrequest+xml; version=3.1; Content-type:  application/vnd.abiquo.volume+json;version=3.1; application/vnd.abiquo.volume+xml; version=3.1;

Request Message Body Entity: VolumeManagement Media Type
Response Message Body Entity: AcceptedRequest Media Type

Modify a volume example
$ curl -X PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530\
-H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=3.1' \
-H 'Content-Type: application/vnd.abiquo.volume+xml; version=3.1' \
-d @entity.xml \
-u user:password --verbose


PUT https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/1530 HTTP/1.1
Accept: application/vnd.abiquo.acceptedrequest+xml;version=3.1
Content-Type: application/vnd.abiquo.volume+xml;version=3.1
Content-Length: 863


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:04 GMT
Set-Cookie: JSESSIONID=965057B265058EED5A6D9BA62EB054B8; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE0NTA2Nzo0MWExYTBiMGY4ZmM5YTI0M2FkNjYyOTc1YjNlZWU4NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:05 GMT; Path=/api
Server: Apache-Coyote/1.1

Move a volume

You can move a volume from one virtualdatacenter to another.Note, the virtualdatacenter that will receive the volume must belong to the same datacenter as the original one.

Synopsis: POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/{volume}/action/move

Request Headers: Accept:application/vnd.abiquo.moved-volume+json; version=3.1;application/vnd.abiquo.moved-volume+xml; version=3.1; Content-type:  application/vnd.abiquo.links+json;version=3.1; application/vnd.abiquo.links+xml; version=3.1;

Request Message Body Entity:
Links Media Type
Response Message Body Entity: MovedVolume Media Type

Move a volume example
curl -X POST https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/255/action/move
-H "Accept: application/vnd.abiquo.moved-volume+xml; version=3.1"
-H "Content-type: application/vnd.abiquo.links+xml; version=3.1"
-d @links.xml
-u user:password --verbose

<moved>
<location rel="volume" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/255"/>
<volume>
<link rel="edit" type="application/vnd.abiquo.volume+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/255"/>
<link title="Default Tier 1" rel="tier" type="application/vnd.abiquo.tier+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/tiers/1"/>
<link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/2/volumes/255/action/initiatormappings"/>
<link title="vd2" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="portal.cloud.claranet.com/api/cloud/virtualdatacenters/2"/>
<id>255</id>
<name>vol1</name>
<description></description>
<state>DETACHED</state>
<sizeInMB>102</sizeInMB>
<sequence>0</sequence>
</volume>
</moved>

Delete a volume

Delete a volume from a specified virtual datacenter

Synopsis: DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/{volume}

Request Headers: Accept: ; Content-type: ;

Delete a volume example
$ curl -X DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/4073\
-u user:password --verbose


DELETE https://portal.cloud.claranet.com/api/cloud/virtualdatacenters/1/volumes/4073 HTTP/1.1

HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:11:18 GMT
Set-Cookie: JSESSIONID=9F1D31B6B42AFB2129F1979E6124713E; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzI1OTQ2Njo2NzgxM2RlMjVmM2M5YzFmYjBiY2NmYWZmY2ZhYzQ0OTpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:59 GMT; Path=/api
Server: Apache-Coyote/1.1

Retrieve a EventsDto entity.

Retrieve the list of Abiquo events that can be accessed by your role, for example, CLOUD_ADMIN, ENTERPRISE_ADMIN,USER.

Synopsis: GET https://portal.cloud.claranet.com/api/events

Request Headers: Accept:application/vnd.abiquo.events+json; version=3.1;application/vnd.abiquo.events+xml; version=3.1; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve

by

false

timestamp

Search to retrieve. Available values are: {DATACENTER,RACK,
PHYSICALMACHINE, STORAGESYSTEM, STORAGEPOOL, VOLUME,NETWORK, SUBNET, ENTERPRISE,
USER, VIRTUALDATACENTER, VIRTUALAPP, VIRTUALMACHINE,SEVERITY, PERFORMEDBY,
ACTIONPERFORMED, COMPONENT, STACKTRACE, DATEFROM,DATETO}

has

false

 

A value to filter the search.

limit

false

25

Number of elements to retrieve.

asc

false

false

The order of the elements retrieved (ascending ->true, descending -> false). Ascending by default.

datacenter

false

 

Filter from events list by datacenter name.

rack

false

 

Filter from events list by rack name. (eg:rack=JC-1542992d-309).

physicalMachinefalse Filter from events list by physical machine name.(eg:physicalMachine=JC-70211e79-980).
storageSystemfalse 

Filter from events list by storage system name.

storagePoolfalse Filter from events list by storage pool name (eg:storagePool=abiquo).
volumefalse Filter from events list by volume name (eg:volume=abiquovol).
networkfalse Filter from events list by network name(eg:network=myprivatenetwork1).
subnetfalse Filter from events list by subnetwork name
enterprisefalse Filter from events list by enterprise name(eg:enterprise=myfirstenterprise).
userfalse Filter from events list by user name (eg:user=mycustomer).
virtualDatacenterfalse Filter from events list by virtual datacenter name (eg:virtualDatacenter=BCNvirtualdatacenter).
virtualAppfalse Filter from events list by virtual appliance name (eg:virtualApp=JC-29d17bd8-81e).
virtualMachinefalse Filter from events list by virtual machine name
severityfalse Severity level filter to filter from event list(eg: severity=INFO).
performedByfalse Filter from events list by name of user who performed the action (eg:performedBy=customer1).
actionPerformedfalse Filter from event list by the actions performed(eg: actionperformed=VM_DELETE).
componentfalse Show only events from the component specified(eg: component=VIRTUAL_MACHINE).
stacktracefalse Filter from event list by words matching the stack trace (eg: stacktrace=moved).
datefromfalse Retrieve events from the date specified as the number of seconds since 00:00 1/1/1970 UTC in string format(eg: datefrom=1359370517)
datetofalse Retrieve events to the date specified as the number of seconds since 00:00 1/1/1970 UTC in string format(eg: dateto=1359370517)


Response Message Body Entity: Events Media Type

Retrieve a EventsDto entity. example
curl -X GET https://portal.cloud.claranet.com/api/events?datefrom=1343052402064&volume=JC-3972c0f8-28b\
-H 'Accept: application/vnd.abiquo.events+xml;version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/events?datefrom=1343052402064&volume=JC-3972c0f8-28b HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.events+xml;version=3.1


HTTP/1.1 200 OK
Date: Mon, 23 Jan 2013 14:07:26 GMT
Set-Cookie: JSESSIONID=01951ED65B92A67C7333327AB6E92126; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI0NjE2NDpiOWJkMWEyMWFmNjJmN2ZkMTU5NTQ0YzI4M2E3ZjhiOTpBQklRVU8; Expires=Mon, 23-Jan-2013 14:37:26 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.events+xml;version=3.1
Content-Length: 1270

<?xml version="1.0" encoding="UTF-8"?> <events> <link href="https://portal.cloud.claranet.com/api/events" rel="first"/> <link href="https://portal.cloud.claranet.com/api/events?startwith=0" rel="last"/> <totalSize>2</totalSize> <event> <actionPerformed>VOLUME_DELETE</actionPerformed> <component>VOLUME</component> <enterprise>Abiquo</enterprise> <id>109</id> <idEnterprise>1</idEnterprise> <idUser>1</idUser> <idVirtualDatacenter>1</idVirtualDatacenter> <idVolume>1786</idVolume> <performedBy>admin</performedBy> <severity>INFO</severity> <stacktrace>Deleting volume 'JC-3972c0f8-28b'</stacktrace> <timestamp>2013-01-23T14:07:14Z</timestamp> <user>admin</user> <virtualDatacenter>JC-d0cf5cd6-67b</virtualDatacenter> <volume>JC-3972c0f8-28b</volume> </event> <event> <actionPerformed>VOLUME_MODIFY</actionPerformed> <component>VOLUME</component> <enterprise>Abiquo</enterprise> <id>108</id> <idEnterprise>1</idEnterprise> <idUser>1</idUser> <idVirtualDatacenter>1</idVirtualDatacenter> <idVolume>1786</idVolume> <performedBy>admin</performedBy> <severity>INFO</severity> <stacktrace>Updated size of volume 'JC-Event vol' to '32' MB</stacktrace> <timestamp>2013-01-23T14:07:12Z</timestamp> <user>admin</user> <virtualDatacenter>JC-d0cf5cd6-67b</virtualDatacenter> <volume>JC-3972c0f8-28b</volume> </event> </events>

Retrieve a EventDto entity.

Retrieve a single Abiquo event if it can be accessed by your Abiquo role, for example, CLOUD_ADMIN, ENTERPRISE_ADMIN,USER.

Synopsis: GET https://portal.cloud.claranet.com/api/events/{event}

Request Headers: Accept:application/vnd.abiquo.event+json; version=3.1;application/vnd.abiquo.event+xml; version=3.1; Content-type: ;

Response Message Body Entity: Event Media Type

Retrieve a EventDto entity. example
curl -X GET https://portal.cloud.claranet.com/api/events/108\
-H 'Accept: application/vnd.abiquo.event+xml;version=3.1' \
-u user:password --verbose


GET https://portal.cloud.claranet.com/api/events/108 HTTP/1.1
Authorization: Basic dXNlcjpwYXNzd29yZAo=
Accept: application/vnd.abiquo.event+xml;version=3.1


HTTP/1.1 200 OK
Date: Mon, 23 Jan 2013 14:07:26 GMT
Set-Cookie: JSESSIONID=01951ED65B92A67C7333327AB6E92126; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI0NjE2NDpiOWJkMWEyMWFmNjJmN2ZkMTU5NTQ0YzI4M2E3ZjhiOTpBQklRVU8; Expires=Mon, 23-Jan-2013 14:37:26 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.event+xml;version=3.1
Content-Length: 1270

<?xml version="1.0" encoding="UTF-8"?> <event> <actionPerformed>VOLUME_MODIFY</actionPerformed> <component>VOLUME</component> <enterprise>Abiquo</enterprise> <id>108</id> <idEnterprise>1</idEnterprise> <idUser>1</idUser> <idVirtualDatacenter>1</idVirtualDatacenter> <idVolume>1786</idVolume> <performedBy>admin</performedBy> <severity>INFO</severity> <stacktrace>Updated size of volume 'JC-Event vol' to '32' MB</stacktrace> <timestamp>2013-01-23T14:07:12Z</timestamp> <user>admin</user> <virtualDatacenter>JC-d0cf5cd6-67b</virtualDatacenter> <volume>JC-3972c0f8-28b</volume> </event>

Return API Version

Returns Api version

Synopsis: GET https://portal.cloud.claranet.com/api/version
Roles Needed:
Request Headers: Accept:text/plain;

Response Message Body Entity: String
Request Example:

Return API Version example
curl -X GET https://portal.cloud.claranet.com/api/version"
-H "Accept:text/plain"
-u user:password --verbose

> GET /api/version HTTP/1.1
> Accept:text/plain

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: text/plain

2.6.0

Media Types Reference

TemplateDefinition Media Type

This class is identified by media type: application/vnd.abiquo.templatedefinition+json; version=3.1; application/vnd.abiquo.templatedefinition+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

description

String

1

yes

Description of the template definition

diskControllerType

DiskControllerType

1

optional

Kind of controller type (IDE or SCSI)

NOTE not all the hypervisor plugins will use this info

diskFileSize

long

1

yes

The disk file size in MegaBytes of the disk file

diskFormatType

String

1

yes

Disk format type of the disk file @see {@link DiskFormatType}

ethernetDriverType

EthernetDriverType

1

optional

Kind of network driver (PCNet32, VMXNET3 or E1000)

NOTE not all the hypervisor plugins will use this info. By default all use E1000

iconUrl

String

1

optional

The URI of the icon of the template definition

id

Integer

1

yes

Identifier of the template definition

loginPassword

String

1

optional

Default login password

loginUser

String

1

optional

Default login user

name

String

1

yes

Name of the template definition

osType

OSType

1

optional

Kind of Operating System

osVersion

String

1

optional

Additional info for the ''osType''

productName

String

1

optional

Additional info about the installed software

productUrl

String

1

optional

Link to additional info about the installed software

productVendor

String

1

optional

Additional info about the installed software

productVersion

String

1

optional

Additional version info about the installed software

url

String

1

yes

URL of the source .ovf Envelope document.

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinition>
<url></url>
<name></name>
<description></description>
<productName></productName>
<productVendor></productVendor>
<productUrl></productUrl>
<productVersion></productVersion>
<iconUrl></iconUrl>
<diskFormatType></diskFormatType>
<diskFileSize>0</diskFileSize>
<loginUser></loginUser>
<loginPassword></loginPassword>
<osType>OTHER</osType>
<osVersion></osVersion>
<ethernetDriverType>PCNet32</ethernetDriverType>
<diskControllerType>IDE</diskControllerType>
</templateDefinition>

Categories Media Type

This class is identified by media type: application/vnd.abiquo.categories+json; version=3.1; application/vnd.abiquo.categories+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Category Media Type

1..n

optional

The collection of List of Category Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<categories>
<totalSize>1</totalSize>
<category>
<link rel="enterprise" href="https://portal.cloud.claranet.com/api/admin/enterprises/{enterpriseId}/"/>
<defaultCategory>false</defaultCategory>
<erasable>false</erasable>
<name/>
</category>
</categories>

VirtualMachineTemplate Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachinetemplate+json; version=3.1; application/vnd.abiquo.virtualmachinetemplate+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuRequired

Integer

1

yes

The number of CPU required

coresPerSocketInteger1optional

Optional ratio to distribute cores in sockets (sockets = cpu / coresPerSocket).
This attribute MUST be divisor of cpu.

creationDate

Date

1

no

Creation date

creationUser

String

1

no

Nickname of the creation user

description

String

1

optional

Description of the virtual machine template

diskControllerType

DiskControllerType

1

optional

Kind of controller type (IDE or SCSI)

NOTE not all the hypervisor plugins will use this info

diskFileSize

Long

1

yes

The disk file size in Bytes of the virtual machine template disk file

diskFormatType

String

1

yes

Disk format type of the virtual machine template @see {@link DiskFormatType}

ethernetDriverType

EthernetDriverType

1

optional

Kind of network driver (PCNet32, VMXNET3 or E1000)

NOTE not all the hypervisor plugins will use this info. By default all use E1000

hdRequired

Long

1

optional

The HD required in bytes for the virtual machine template (Primary disk capacity)

iconUrl

String

1

optional

The URI of the icon of the virtual machine template

id

Integer

1

yes

Identifier of the virtual machine template

loginPassword

String

1

optional

Default login password

loginUser

String

1

optional

Default login user

name

String

1

yes

Name of the virtual machine template

osType

OSType

1

optional

Kind of Operating System

osVersion

String

1

optional

Additional info for the ''osType''

path

String

1

yes

Path relative to the Abiquo datacenter repository of the virtual machine template disk file

ramRequired

Integer

1

yes

The RAM in MegaBytes required for the virtual machine template

shared

boolean

1

yes

Determine if virtual machine template can be used in other enterprises

state

VMTemplateState

1

no

Current state of the virtual machine template (based on the tasks)

    • UNAVAILABLE, the template disk is missing the the repository filesystem, but some virtual machines or instances are using it.
    • IN_PROGRESS, a download or promote task is running
    • FAILED, a download or promote task was finish unsuccessfully
    • DONE the template is available and ready to use
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplate>
<name></name>
<description></description>
<osType>OTHER</osType>
<osVersion></osVersion>
<path></path>
<diskFormatType></diskFormatType>
<diskFileSize>0</diskFileSize>
<cpuRequired>0</cpuRequired>
<ramRequired>0</ramRequired>
<hdRequired>0</hdRequired>
<shared>false</shared>
<costCode>0</costCode>
<iconUrl></iconUrl>
<loginUser></loginUser>
<loginPassword></loginPassword>
<ethernetDriverType>PCNet32</ethernetDriverType>
<diskControllerType>IDE</diskControllerType>
</virtualMachineTemplate>

DiskFormatType Media Type

This class is identified by media type: application/vnd.abiquo.diskformattype+json; version=3.1; application/vnd.abiquo.diskformattype+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

alias

DiskFormatTypeAlias

1

optional

Alias of the disk format type

description

String

1

optional

Description of the type

id

Integer

1

optional

Identifier of the entity

uri

String

1

optional

URI of the Disk Format type

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<diskformtattype>
<uri></uri>
<description></description>
<alias>UNKNOWN</alias>
</diskformtattype>

Conversion Media Type

This class is identified by media type: application/vnd.abiquo.conversion+json; version=3.1; application/vnd.abiquo.conversion+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

sourceFormat

DiskFormatType

1

yes

DiskFormatType of the template disk file in ''sourcePath''

sourcePath

String

1

yes

Path relative to the Abiquo repository of the template disk file used as source of the
conversion

startTimestamp

Date

1

yes

When the conversion starts

state

ConversionState

1

yes

Result status of the conversion

targetFormat

DiskFormatType

1

yes

DiskFormatType of the template disk file in ''targetPath''

targetPath

String

1

yes

Path relative to the Abiquo repository of resulting template disk file

targetSizeInBytes

Long

1

yes

Size of the template disk file result in ''targetPath''

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<conversion>
<state>ENQUEUED</state>
<sourceFormat>UNKNOWN</sourceFormat>
<sourcePath></sourcePath>
<targetFormat>UNKNOWN</targetFormat>
<targetPath></targetPath>
<targetSizeInBytes>0</targetSizeInBytes>
</conversion>

DatacenterRepositories Media Type

This class is identified by media type: application/vnd.abiquo.datacenterrepositories+json; version=3.1; application/vnd.abiquo.datacenterrepositories+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of DatacenterRepository Media Type

1..n

optional

The collection of List of DatacenterRepository Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datacenterRepositories>
<totalSize>1</totalSize>
<datacenterRepository>
<name></name>
<repositoryLocation></repositoryLocation>
<repositoryCapacityMb>0</repositoryCapacityMb>
<repositoryRemainingMb>0</repositoryRemainingMb>
<error></error>
</datacenterRepository>
</datacenterRepositories>

Category Media Type

This class is identified by media type: application/vnd.abiquo.category+json; version=3.1; application/vnd.abiquo.category+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

defaultCategory

boolean

1

yes

true if the category is default

erasable

boolean

1

yes

true if the category is erasable

id

Integer

1

optional

Identifier of the entity

name

String

1

yes

Name of the category

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<category>
<link rel="enterprise" href="https://portal.cloud.claranet.com/api/admin/enterprises/{enterpriseId}/"/>
<defaultCategory>false</defaultCategory>
<erasable>false</erasable>
<name></name>
</category>

TemplateDefinitions Media Type

This class is identified by media type: application/vnd.abiquo.templatedefinitions+json; version=3.1; application/vnd.abiquo.templatedefinitions+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of TemplateDefinition Media Type

1..n

no

The collection of List of TemplateDefinition Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitions>
<totalSize>1</totalSize>
</templateDefinitions>

DiskFormatTypes Media Type

This class is identified by media type: application/vnd.abiquo.diskformattypes+json; version=3.1; application/vnd.abiquo.diskformattypes+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of DiskFormatType Media Type

1..n

optional

The collection of List of DiskFormatType Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<diskformattypes>
<totalSize>1</totalSize>
<diskformattype>
<uri></uri>
<description></description>
<alias>UNKNOWN</alias>
</diskformattype>
</diskformattypes>

VirtualMachineTemplateRequest Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachinetemplaterequest+json; version=3.1; application/vnd.abiquo.virtualmachinetemplaterequest+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

promotedName

String

1

optional

Name for the new promoted virtual machine template

Only required for PROMOTE Task : Virtual machine template instance link present

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinetemplaterequest>
<link rel="templateDefinition" href="https://portal.cloud.claranet.com/admin/enterprises/{enterpriseId}/appslib/templateDefinitions/{templateDefinitionId}"/>
<link rel="virtualmachinetemplate" href="https://portal.cloud.claranet.com/admin/enterprises/{enterpriseId}/datacenterrepositories/{datacenterId}/virtualmachinetemplates/{virtualmachinetemplateId}"/>
<promotedName></promotedName>
</virtualmachinetemplaterequest>


TemplateDefinitionLists Media Type

This class is identified by media type: application/vnd.abiquo.templatedefinitionlists+json; version=3.1; application/vnd.abiquo.templatedefinitionlists+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of TemplateDefinitionList Media Type

1..n

no

The collection of List of TemplateDefinitionList Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionLists>
<totalSize>1</totalSize>
<templateDefinitionList>
<name></name>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<url></url>
</templateDefinitionList>
</templateDefinitionLists>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionLists>
<totalSize>1</totalSize>
<templateDefinitionList>
<name></name>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<url></url>
</templateDefinitionList>
</templateDefinitionLists>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionLists>
<totalSize>1</totalSize>
</templateDefinitionLists>

TemplateDefinitionList Media Type

This class is identified by media type: application/vnd.abiquo.templatedefinitionlist+json; version=3.1; application/vnd.abiquo.templatedefinitionlist+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

id

Integer

1

yes

Identifier of the template definition list

name

String

1

yes

Name of the template definition list

templateDefinitions

TemplateDefinitions Media Type

1

optional

The template definitions of the list

url

String

1

optional

The URL of the template definition list public ''ovfindex.xml'' source.

When this attribute is present the its possible to request a template definition list refresh
(fetch the OVFs again)

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionList>
<name></name>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<url></url>
</templateDefinitionList>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionList>
<name></name>
<templateDefinitions>
<totalSize>1</totalSize>
<templateDefinition>
<description></description>
<diskFileSize>0</diskFileSize>
<diskFormatType></diskFormatType>
<ethernetDriverType>PCNet32</ethernetDriverType>
<iconUrl></iconUrl>
<name></name>
<productName></productName>
<productUrl></productUrl>
<productVendor></productVendor>
<productVersion></productVersion>
<url></url>
</templateDefinition>
</templateDefinitions>
<url></url>
</templateDefinitionList>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<templateDefinitionList>
<name></name>
<url></url>
<templateDefinitions>
<totalSize>1</totalSize>
</templateDefinitions>
</templateDefinitionList>

Conversions Media Type

This class is identified by media type: application/vnd.abiquo.conversions+json; version=3.1; application/vnd.abiquo.conversions+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Conversion Media Type

1..n

no

The collection of List of Conversion Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<conversions>
<totalSize>1</totalSize>
<conversion>
<state>ENQUEUED</state>
<sourceFormat>UNKNOWN</sourceFormat>
<sourcePath></sourcePath>
<targetFormat>UNKNOWN</targetFormat>
<targetPath></targetPath>
<targetSizeInBytes>0</targetSizeInBytes>
</conversion>
</conversions>

VirtualMachineTemplates Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachinetemplates+json; version=3.1; application/vnd.abiquo.virtualmachinetemplates+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of VirtualMachineTemplate Media Type

1..n

no

The collection of List of VirtualMachineTemplate Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplates>
<totalSize>1</totalSize>
<virtualMachineTemplate>
<name></name>
<description></description>
<path></path>
<diskFormatType></diskFormatType>
<diskFileSize>0</diskFileSize>
<cpuRequired>0</cpuRequired>
<ramRequired>0</ramRequired>
<hdRequired>0</hdRequired>
<shared>false</shared>
<state>IN_PROGRESS</state>
<costCode>0</costCode>
<creationUser></creationUser>
<iconUrl></iconUrl>
</virtualMachineTemplate>
</virtualMachineTemplates

DatacenterRepository Media Type

This class is identified by media type: application/vnd.abiquo.datacenterrepository+json; version=3.1; application/vnd.abiquo.datacenterrepository+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

error

String

1

optional

Any error in repository

name

String

1

yes

Name of the datacenter repository

repositoryCapacityMb

long

1

optional

Capacity of repository in MB

repositoryLocation

String

1

yes

The repository location

repositoryRemainingMb

long

1

optional

Remaining capacity of the repository in MB

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datacenterRepository>
<name></name>
<repositoryLocation></repositoryLocation>
<repositoryCapacityMb>0</repositoryCapacityMb>
<repositoryRemainingMb>0</repositoryRemainingMb>
<error></error>
</datacenterRepository>

Links Media Type

This class is identified by media type: application/vnd.abiquo.datacenterrepository+json; version=3.1; application/vnd.abiquo.datacenterrepository+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Link Media Type

1..n

no

The collection of List of Link Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<links/>

Link Media Type

This class is identified by media type: application/vnd.abiquo.link+json; version=3.1; application/vnd.abiquo.link+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

link

RESTLink

1

yes

Required fields are rel, href. Optional fields are title and type

AcceptedRequest Media Type

This class is identified by media type: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

entity

Object

1

optional

The returning entity. Normally a message.

statusLink

RESTLink

1

optional

The status link where you can track the status of the request.

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
<message xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</acceptedrequest>

Errors Media Type

This class is identified by media type: application/vnd.abiquo.errors+json; version=3.1; application/vnd.abiquo.errors+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Error Media Type

1..n

optional

The collection of List of Error Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
<totalSize>1</totalSize>
<error>
<code></code>
<message></message>
<name/>
</error>
</errors>

Error Media Type

This class is identified by media type: application/vnd.abiquo.error+json; version=3.1; application/vnd.abiquo.error+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

code

String

1

optional


message

String

1

optional


Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<code></code>
<message></message>
<name/>
</error>

VirtualMachineInstance Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachineinstance+json; version=3.1; application/vnd.abiquo.virtualmachineinstance+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

instanceName

String

1

yes

Instance name

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineInstance>
<instanceName>Instance Name</instanceName>
</virtualMachineInstance>

VirtualMachineState Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachinestate+json; version=3.1; application/vnd.abiquo.virtualmachinestate+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

state

VirtualMachineState

1

yes

State of the virtual machine. Valid values are: OFF, ON or PAUSED

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinestate>
<state>OFF</state>
</virtualmachinestate>

VirtualMachineTask Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachinetask+json; version=3.1; application/vnd.abiquo.virtualmachinetask+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

forceUndeploy

Boolean

1

optional

Imported machines does not have the image stored in an Abiquo repo. If we undpeloy them, we
have lost the image and it is unrecoverable. Use it if you force to undeploy imported
VirtualMachines.

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinetask>
<forceEnterpriseSoftLimits>false</forceEnterpriseSoftLimits>
</virtualmachinetask>

VirtualApplianceState Media Type

This class is identified by media type: application/vnd.abiquo.virtualappliancestate+json; version=3.1; application/vnd.abiquo.virtualappliancestate+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

power

VirtualApplianceState

1

no

Machine power state. Current state of the virtual appliance. The state is inferred from its
virtual machines

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualApplianceState/>

Layers Media Type

This class is identified by media type: application/vnd.abiquo.layers+json; version=3.1; application/vnd.abiquo.layers+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Layer Media Type

1..n

optional

The collection of List of Layer Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<layers>
<totalSize>1</totalSize>
<layer>
<name></name>
</layer>
</layers>

VirtualMachine Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpu

Integer

1

yes

Number of CPUs of the virtual machine.

coresPerSocketInteger1optional

Optional ratio to distribute cores in sockets (sockets = cpu / coresPerSocket).
This attribute MUST be divisor of cpu.

description

String

1

optional


dvd

DvdManagement Media Type

1

optional

Whether the virtual machine must mount a CD or DVD drive.

hdInBytes

Long

1

yes

Hard disk size in Bytes.

id

Integer

1

no

Opaque ID of the virtual machine.

idState

int

1

optional

Opaque ID of the state.

idType

int

1

optional

Opaque ID of the virtual machine type.

keymap

String

1

optional

Keyboard keymap to be setted on the virtual machine.

name

String

1

yes

Name of the virtual machine.

password

String

1

optional

VNC password.

ram

Integer

1

yes

Ram size of the virtual machine.

state

VirtualMachineState

1

optional

Current virtual machine state.

uuid

String

1

no

UUID of the virtual machine.

vdrpIP

String

1

no

Virtual remote desktop IP.

vdrpPort

int

1

no

Virtual remote desktop port.

Example:
="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachines>
<totalSize>1</totalSize>
<virtualMachine>
<link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
<name>ABQ_79b5dfab-c357-437f-9803-e30613934297</name>
<cpu>4</cpu>
<ram>256</ram>
<hdInBytes>104857600</hdInBytes>
<vdrpEnabled>false</vdrpEnabled>
<vdrpPort>0</vdrpPort>
<idState>1</idState>
<state>NOT_ALLOCATED</state>
<idType>0</idType>
<type>MANAGED</type>
<highDisponibility>0</highDisponibility>
<password>SjDbwWDQ</password>
</virtualMachine>
</virtualMachines>

VirtualMachines Media Type

This class is identified by media type: application/vnd.abiquo.virtualmachines+json; version=3.1; application/vnd.abiquo.virtualmachines+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of VirtualMachine Media Type

1..n

optional

The collection of List of VirtualMachine Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachines>
<totalSize>1</totalSize>
<virtualMachine>
<link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="https://portal.cloud.claranet.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
<name>ABQ_79b5dfab-c357-437f-9803-e30613934297</name>
<cpu>4</cpu>
<ram>256</ram>
<hdInBytes>104857600</hdInBytes>
<vdrpEnabled>false</vdrpEnabled>
<vdrpPort>0</vdrpPort>
<idState>1</idState>
<state>NOT_ALLOCATED</state>
<idType>0</idType>
<type>MANAGED</type>
<highDisponibility>0</highDisponibility>
<password>SjDbwWDQ</password>
</virtualMachine>
</virtualMachines>

VirtualDatacenters Media Type

This class is identified by media type: application/vnd.abiquo.virtualdatacenters+json; version=3.1; application/vnd.abiquo.virtualdatacenters+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of VirtualDatacenter Media Type

1..n

no

The collection of List of VirtualDatacenter Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualDatacenters>
<totalSize>1</totalSize>
<virtualDatacenter>
<link rel="datacenter" href="https://portal.cloud.claranet.com/api/admin/datacenters/{datacenterId}"/>
<link rel="enterprise" href="https://portal.cloud.claranet.com/api/admin/enterprises/{enterpriseId}"/>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<hypervisorType>VBOX</hypervisorType>
<name></name>
<network>
<name></name>
<address></address>
<mask>0</mask>
<gateway></gateway>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>0</tag>
<type>INTERNAL</type>
<dhcpOptions>
<totalSize>1</totalSize>
<dhcpoption>
<option>0</option>
<gateway></gateway>
<networkAddress></networkAddress>
<mask>0</mask>
<netmask></netmask>
</dhcpoption>
</dhcpOptions>
</network>
</virtualDatacenter>
</virtualDatacenters>

VirtualAppliance Media Type

This class is identified by media type: application/vnd.abiquo.virtualappliance+json; version=3.1; application/vnd.abiquo.virtualappliance+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

error

int

1

no

Was there an error on the last operation on any of its nodes?.

id

Integer

1

no

Opaque ID of the virtual appliance.

lastTasks

Tasks Media Type

1

no

Last task of every virtual machine.

name

String

1

yes

Name of the virtual appliance.

nodeconnections

String

1

optional

Logical connections made through the Abiquo flex client.

state

VirtualApplianceState

1

no

Current state. Inferred from its virtual machines

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualAppliance>
<error>0</error>
<highDisponibility>0</highDisponibility>
<name></name>
<nodeconnections></nodeconnections>
<publicApp>0</publicApp>
<subState>DEPLOYED</subState>
</virtualAppliance>

VirtualAppliances Media Type

This class is identified by media type: application/vnd.abiquo.virtualappliance+json; version=3.1; application/vnd.abiquo.virtualappliance+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of VirtualAppliance Media Type

1..n

no

The collection of List of VirtualAppliance Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualAppliances>
<totalSize>1</totalSize>
</virtualAppliances>

VirtualDatacenterWithDatacenter Media Type

This class is identified by media type: application/vnd.abiquo.virtualdatacenter+json; version=3.1; application/vnd.abiquo.virtualdatacenter+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuCountHardLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Hard limit

cpuCountSoftLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Soft limit

datacenter

Datacenter Media Type

1

no

Datacenter which belongs the virtual datacenter.

hdHardLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Hard limit

hdSoftLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Soft limit

hypervisorType

HypervisorType

1

yes

Hypervisor type of the virtual datacenter. Virtualization technology supported for this
virtual datacenter.

id

Integer

1

no

Opaque ID of the virtual datacenter.

name

String

1

yes

Virtual datacenter's name.

publicIpsHard

long

1

yes

Total amount of Public IPs that may be defined. Hard limit

publicIpsSoft

long

1

yes

Total amount of Public IPs that may be defined. Soft limit

ramHardLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Hard limit

ramSoftLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Soft limit

storageHard

long

1

yes

Total size of external storage that may be assigned. Hard limit

storageSoft

long

1

yes

Total size of external storage that may be assigned. Soft limit

vlan

VLANNetwork Media Type

1

yes

Virtual datacenter network.

vlansHard

long

1

yes

Total amount of VLANs that may be defined. Hard limit

vlansSoft

long

1

yes

Total amount of VLANs that may be defined. Soft limit

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualDatacenterWithDatacenter>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<hypervisorType>VBOX</hypervisorType>
<name></name>
<network>
<address></address>
<dhcpOptions>
<totalSize>1</totalSize>
<dhcpoption>
<gateway></gateway>
<mask>0</mask>
<netmask></netmask>
<networkAddress></networkAddress>
<option>0</option>
</dhcpoption>
</dhcpOptions>
<gateway></gateway>
<mask>0</mask>
<name></name>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>0</tag>
<type>INTERNAL</type>
</network>
</virtualDatacenterWithDatacenter>

Layer Media Type

This class is identified by media type: application/vnd.abiquo.layer+json; version=3.1; application/vnd.abiquo.layer+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

name

String

1

yes

Name of the layer

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<layer>
<name></name>
</layer>

VirtualDatacenter Media Type

This class is identified by media type: application/vnd.abiquo.virtualdatacenter+xml+json; version=3.1; application/vnd.abiquo.virtualdatacenter+xml+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuCountHardLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Hard limit

cpuCountSoftLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Soft limit

hdHardLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Hard limit

hdSoftLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Soft limit

hypervisorType

HypervisorType

1

yes

Hypervisor type of the virtual datacenter. Virtualization technology supported for this
virtual datacenter.

id

Integer

1

no

Opaque ID of the virtual datacenter.

name

String

1

yes

Virtual datacenter's name.

publicIpsHard

long

1

yes

Total amount of Public IPs that may be defined. Hard limit

publicIpsSoft

long

1

yes

Total amount of Public IPs that may be defined. Soft limit

ramHardLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Hard limit

ramSoftLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Soft limit

storageHard

long

1

yes

Total size of external storage that may be assigned. Hard limit

storageSoft

long

1

yes

Total size of external storage that may be assigned. Soft limit

vlan

VLANNetwork Media Type

1

yes

Virtual datacenter network.

vlansHard

long

1

yes

Total amount of VLANs that may be defined. Hard limit

vlansSoft

long

1

yes

Total amount of VLANs that may be defined. Soft limit

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualDatacenter>
<link rel="datacenter" href="https://portal.cloud.claranet.com/api/admin/datacenters/{datacenterId}"/>
<link rel="enterprise" href="https://portal.cloud.claranet.com/api/admin/enterprises/{enterpriseId}"/>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<hypervisorType>VBOX</hypervisorType>
<name></name>
<network>
<name></name>
<address></address>
<mask>0</mask>
<gateway></gateway>
<primaryDNS></primaryDNS>
<secondaryDNS></secondaryDNS>
<sufixDNS></sufixDNS>
<tag>0</tag>
<type>INTERNAL</type>
<dhcpOptions>
<totalSize>1</totalSize>
<dhcpoption>
<option>0</option>
<gateway></gateway>
<networkAddress></networkAddress>
<mask>0</mask>
<netmask></netmask>
</dhcpoption>
</dhcpOptions>
</network>
</virtualDatacenter>

DatacentersLimits Media Type

This class is identified by media type: application/vnd.abiquo.datacenterlimits+json; version=3.1; application/vnd.abiquo.datacenterlimits+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of DatacenterLimits Media Type

1..n

optional

The collection of List of DatacenterLimits Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<limit>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<repositoryHard>0</repositoryHard>
<repositorySoft>0</repositorySoft>
</limit>

EnterpriseProperties Media Type

This class is identified by media type: application/vnd.abiquo.enterpriseproperties+json; version=3.1; application/vnd.abiquo.enterpriseproperties+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

id

Integer

1

no

Identifier of the Entity

properties

Map

1

no

Properties set for this enterprise

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseProperties/>

Enterprises Media Type

This class is identified by media type: application/vnd.abiquo.enterprises+json; version=3.1; application/vnd.abiquo.enterprises+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Enterprise Media Type

1..n

optional

The collection of List of Enterprise Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterprises>
<totalSize>1</totalSize>
<enterprise>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<name></name>
<repositoryHard>0</repositoryHard>
<repositorySoft>0</repositorySoft>
<isReservationRestricted>false</isReservationRestricted>
</enterprise>
</enterprises>

DatacenterLimits Media Type

This class is identified by media type: application/vnd.abiquo.limit+json; version=3.1; application/vnd.abiquo.limit+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuCountHardLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Hard limit

cpuCountSoftLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Soft limit

hdHardLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Hard limit

hdSoftLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Soft limit

id

Integer

1

optional

Identifier of the limit

publicIpsHard

long

1

yes

Total amount of Public IPs that may be defined. Hard limit

publicIpsSoft

long

1

yes

Total amount of Public IPs that may be defined. Soft limit

ramHardLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Hard limit

ramSoftLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Soft limit

repositoryHardLimitsInMb

long

1

yes

Total size of repository space to be used. Hard limit

repositorySoftLimitsInMb

long

1

yes

Total size of repository space to be used. Soft limit

storageHard

long

1

yes

Total size of external storage that may be assigned. Hard limit

storageSoft

long

1

yes

Total size of external storage that may be assigned. Soft limit

vlansHard

long

1

yes

Total amount of VLANs that may be defined. Hard limit

vlansSoft

long

1

yes

Total amount of VLANs that may be defined. Soft limit

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<limit>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<repositoryHard>0</repositoryHard>
<repositorySoft>0</repositorySoft>
</limit>

User Media Type

This class is identified by media type: application/vnd.abiquo.user+json; version=3.1; application/vnd.abiquo.user+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

active

boolean

1

yes

Flag indicating if the user is activated or not

authType

String

1

yes

Auth type selected for this user

availableVirtualDatacenters

String

1

no

List with restricted VDCs for this user separated by commas

description

String

1

no

A short description of the user

email

String

1

no

The contact e-mail address of the user for Abiquo messages

id

Integer

1

no

Identifier for this user

locale

String

1

no

Locale assigned to this user

name

String

1

yes

User's real first name

nick

String

1

yes

User name / nickname. The username for login

password

String

1

no

Password set for this user

surname

String

1

no

User's real last name

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user>
<link rel="edit" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1"/>
<link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/>
<link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1/action/virtualmachines"/>
<id>1</id>
<nick>admin</nick>
<password>c69a39bd64ffb77ea7ee3369dce742f3</password>
<name>Cloud</name>
<surname>Administrator</surname>
<description>Main administrator</description>
<email></email>
<locale>en_US</locale>
<authType>ABIQUO</authType>
<active>true</active>
</user>

EnterpriseIdName Media Type

This class is identified by media type: application/vnd.abiquo.enterprise-id-name+json; version=3.1; application/vnd.abiquo.enterprise-id-name+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuCountHardLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Hard limit

cpuCountSoftLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Soft limit

hdHardLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Hard limit

hdSoftLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Soft limit

id

Integer

1

no

Identifier of the Entity

name

String

1

no

Enterprise's name

publicIpsHard

long

1

yes

Total amount of Public IPs that may be defined. Hard limit

publicIpsSoft

long

1

yes

Total amount of Public IPs that may be defined. Soft limit

ramHardLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Hard limit

ramSoftLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Soft limit

storageHard

long

1

yes

Total size of external storage that may be assigned. Hard limit

storageSoft

long

1

yes

Total size of external storage that may be assigned. Soft limit

vlansHard

long

1

yes

Total amount of VLANs that may be defined. Hard limit

vlansSoft

long

1

yes

Total amount of VLANs that may be defined. Soft limit

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseidname>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
</enterpriseidname>

Enterprise Media Type

This class is identified by media type: application/vnd.abiquo.enterprise+json; version=3.1; application/vnd.abiquo.enterprise+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

cpuCountHardLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Hard limit

cpuCountSoftLimit

int

1

yes

Total amount of Virtual CPUs that may be used by Virtual Machines. Soft limit

hdHardLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Hard limit

hdSoftLimitInMb

long

1

yes

Total size of Hard Disks that may be used by Virtual Machines. Soft limit

id

Integer

1

no

Identifier of the Entity

idPricingTemplate

Integer

1

no

Identifier for the pricing template associated to this enterprise

isReservationRestricted

boolean

1

no

You can also restrict an enterprise so that it may only deploy virtual machines on the
physical machines reserved for it and not on any others

name

String

1

yes

The name of the Enterprise

publicIpsHard

long

1

yes

Total amount of Public IPs that may be defined. Hard limit

publicIpsSoft

long

1

yes

Total amount of Public IPs that may be defined. Soft limit

ramHardLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Hard limit

ramSoftLimitInMb

int

1

yes

Total amount of RAM memory that may be used by Virtual Machines. Soft limit

repositoryHard

long

1

yes

Hard limit established for repository size

repositorySoft

long

1

yes

Soft limit stablished for repository size

storageHard

long

1

yes

Total size of external storage that may be assigned. Hard limit

storageSoft

long

1

yes

Total size of external storage that may be assigned. Soft limit

vlansHard

long

1

yes

Total amount of VLANs that may be defined. Hard limit

vlansSoft

long

1

yes

Total amount of VLANs that may be defined. Soft limit

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterprise>
<cpuCountHardLimit>0</cpuCountHardLimit>
<cpuCountSoftLimit>0</cpuCountSoftLimit>
<hdHardLimitInMb>0</hdHardLimitInMb>
<hdSoftLimitInMb>0</hdSoftLimitInMb>
<idPricingTemplate>0</idPricingTemplate>
<isReservationRestricted>false</isReservationRestricted>
<name></name>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
<ramHardLimitInMb>0</ramHardLimitInMb>
<ramSoftLimitinMb>0</ramSoftLimitInMb>
<repositoryHard>0</repositoryHard>
<repositorySoft>0</repositorySoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
</enterprise>

Users Media Type

This class is identified by media type: application/vnd.abiquo.users+json; version=3.1; application/vnd.abiquo.users+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of User Media Type

1..n

optional

The collection of List of User Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<users>
<totalSize>1</totalSize>
<user>
<link rel="edit" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1"/>
<link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1"/>
<link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/1/action/virtualmachines"/>
<id>1</id>
<nick>admin</nick>
<password>c69a39bd64ffb77ea7ee3369dce742f3</password>
<name>Cloud</name>
<surname>Administrator</surname>
<description>Main administrator</description>
<email></email>
<locale>en_US</locale>
<authType>ABIQUO</authType>
<active>true</active>
</user>
</users

EnterprisesIdName Media Type

This class is identified by media type: application/vnd.abiquo.enterprises-id-name+json; version=3.1; application/vnd.abiquo.enterprises-id-name+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of EnterpriseIdName Media Type

1..n

optional

The collection of List of EnterpriseIdName Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterprisesidname>
<totalSize>1</totalSize>
<enterpriseidname>
<cpuHard>0</cpuHard>
<cpuSoft>0</cpuSoft>
<ramHard>0</ramHard>
<ramSoft>0</ramSoft>
<hdHard>0</hdHard>
<hdSoft>0</hdSoft>
<storageHard>0</storageHard>
<storageSoft>0</storageSoft>
<vlansHard>0</vlansHard>
<vlansSoft>0</vlansSoft>
<publicIpsHard>0</publicIpsHard>
<publicIpsSoft>0</publicIpsSoft>
</enterpriseidname>
</enterprisesidname>

Credentials Media Type

This class is identified by media type: application/vnd.abiquo.publiccloudcredentials+json; version=3.1; application/vnd.abiquo.publiccloudcredentials+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

id

Integer

1

optional

Identifier of the credentials

access

String

1

yes

Access identifier of the credentials

key

String

1

yes

Key for the credentials

Example:
<credentials>
<id>1</id>
<access>XXXXXXXXXXXXXXXXXXXXXXX</access>
<key>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</key>
</credentials>

Applications Media Type

This class is identified by media type: application/vnd.abiquo.applications+json; version=3.1; application/vnd.abiquo.applications+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Application Media Type

1..n

optional

The collection of List of Application Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<applications>
<application>
<link title="OAuth cream" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1"/>
<link title="user" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>1</id>
<name>OAuth cream</name>
<description>An example OAuth client application</description>
<apiKey>5e463f34-02ce-4dc2-8286-a924a7d24250</apiKey>
<apiSecret>279oZ7uWYa8CLgzXn2RFrCG19lHObvk5Emv0FZQx</apiSecret>
</application>
<application>
<link title="myApp" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/11"/>
<link title="user" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>11</id>
<name>myApp</name>
<description>my cool app</description>
<apiKey>6e2da2ab-71d3-480a-9716-f96e4f210f8b</apiKey>
<apiSecret>oKJllGshW70B7E120bCs91T9U2H1VE3WjdPl1lCY</apiSecret>
</application>
</applications>

Application Media Type

This class is identified by media type: application/vnd.abiquo.application+json; version=3.1; application/vnd.abiquo.application+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

id

Integer

1

optional

Identifier of the application

name

String

1

yes

Name of the application

description

String

1

optional

Description of the application

apiKeyString1noOAuth consumer key for the application
apiSecretString1noOAuth consumer secret for the application
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application>
<link title="OAuth cream" rel="self" type="application/vnd.abiquo.application+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2/applications/1"/>
<link title="user" rel="user" type="application/vnd.abiquo.user+xml" href="https://portal.cloud.claranet.com/api/admin/enterprises/1/users/2"/>
<id>1</id>
<name>OAuth app</name>
<description>An example OAuth client application</description>
<apiKey>5e463f34-02ce-4dc2-8286-a924a7d24250</apiKey>
<apiSecret>279oZ7uWYa8CLgzXn2RFrCG19lHObvk5Emv0FZQx</apiSecret>
</application>

Events Media Type

This class is identified by media type: application/vnd.abiquo.events+json; version=3.1; application/vnd.abiquo.events+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

collection

List of Event Media Type

1..n

no

The collection of List of Event Media Type elements

totalSize

Integer

1

optional

Number of elements of the 'collection' field

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<events>
<totalSize>1</totalSize>
</events>

Event Media Type

This class is identified by media type: application/vnd.abiquo.event+json; version=3.1; application/vnd.abiquo.event+xml; version=3.1;

Field

Type

Occurs

Input Required

Description

actionPerformed

String

1

no

The action performed.

component

String

1

no

The component.

datacenter

String

1

no

The datacenter where the event was triggered.

enterprise

String

1

no

The enterprise.

id

Integer

1

no

The id of the event.

idDatacenter

Integer

1

no

The id datacenter where the event took place.

idEnterprise

Integer

1

no

The id enterprise of the user's enterprise.

idNetwork

Integer

1

no

The id network if the action performed was over a network.

idPhysicalMachine

Integer

1

no

The id physical machine if the action performed was over a physical machine.

idRack

Integer

1

no

The id rack if the action performed was over a rack.

idStoragePool

String

1

no

The id storage pool if the action performed was over a storage pool.

idStorageSystem

Integer

1

no

The id storage system if the action performed was over a storage system.

idSubnet

Integer

1

no

The id subnet if the action performed was over a subnet.

idUser

Integer

1

no

The id user that triggered the event.

idVirtualApp

Integer

1

no

The id virtual app if the action performed was over a virtual appliance.

idVirtualDatacenter

Integer

1

no

The id virtual datacenter if the action performed was over a virtual datacenter.

idVirtualMachine

Integer

1

no

The id virtual machine if the action performed was over a virtual machine.

idVolume

String

1

no

The id volume if the action performed was over a volume.

network

String

1

no

The network if the action performed was over a network.

performedBy

String

1

no

The performed by, who performed the action.

physicalMachine

String

1

no

The physical machine if the action performed was over a physical machine.

rack

String

1

no

The rack if the action performed was over a rack.

severity

SeverityType

1

no

The severity:

  • INFO
  • WARN
  • ERROR

storagePool

String

1

no

The storage pool if the action performed was over a storage pool.

storageSystem

String

1

no

The storage system if the action performed was over a storage system.

subnet

String

1

no

The subnet if the action performed was over a subnet.

timestamp

Date

1

no

The timestamp. Time when the event took place.

user

String

1

no

The user whose performed the action.

virtualApp

String

1

no

The virtual app if the action performed was over a virtual appliance.

virtualDatacenter

String

1

no

The virtual datacenter if the action performed was over a virtual datacenter.

virtualMachine

String

1

no

The virtual machine if the action performed was over a virtual machine.

volume

String

1

no

The volume if the action performed was over a volume.

Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<event/>