Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 2.3


Skip to end of metadata
Go to start of metadata

Understanding the Documentation

Contents

This wiki document covers the RESTful API for creating and managing cloud resources with the Abiquo platform. You can administer physical resources and then expose them to requests made by the virtual appliances.

How to use this API

The Abiquo model normally divides Resources into two sections: The Resource Data Model shows the Resource fields, and the Related Methods Model shows the available actions to send to modify the Resource.

Resource Data Model

These fields are split into the following columns:

Name

Description

Field name

The key of the name in the XML representation

Type

The type of the value of the XML representation

Occurs

How many times we can see this field in the representation

Required

This could have three values: true, which means the field is mandatory; optional, which means you may or may not use this field in the message body request; or false, which means you should not send this field in the message body request

Description

A brief description of the field

Related Methods

This Model shows the specifications for calling any resource and its given response. You should be able to develop code to send-receive messages from your client to our API using this Model as a guide.

Key

Content

Commonly Useful In

Synopsis

Schematic call with the tuple METHOD - URI

All methods

Request Headers

The mandatory headers to send the call

All methods

Request Parameters

A table with the Web Params used to filter the request

GET methods

Request Message Body

The Resource Data Model object to send with the request

POST and PUT methods

Request Example

A simple example for better understanding

All methods

Response Headers

The response Headers that will be returned

All methods

Response Message Body

The Resource Data Model object sent by the response

GET and POST methods

Response Status

The header status the client could receive

All methods

Response Example

A simple example to show the response

All methods

Examples

Below is an example of both specifications (Request and Response):

PUT Machine Request
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/3' \
        -X PUT \
        -H "Content-type:application/xml" \
        -H "Accept:application/xml" \
        -d '<machine>
                <id>3</id>
                <name>machine_3</name>
                <cpu>3</cpu>
                <description>Machine 3 updated</description>
                <hd>3000000</hd>
                <ram>1024</ram>
                <link rel="edit" href="http://example.com/api/admin/datacenters/1/racks/1/machines/3"/>
            <machine>'


> PUT /api/admin/datacenters/1/racks/1/machines/3 HTTP/1.1
> User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: example.com
> Content-type:application/xml
> Accept:application/xml
>
<machine>
    <id>3</id>
    <name>machine_3</name>
    <cpu>3</cpu>
    <description>Machine 3 updated</description>
    <hd>3000000</hd>
    <ram>1024</ram>
    <link rel="edit" href="http://example.com/api/admin/datacenters/1/racks/1/machines/3"
<machine>

Here you can see:

  • The curl execution (marked with the %). Inside this you can distinguish the Request Header (defined by the -H parameter) and the Request Message Body (defined by the '-d' parameter)
  • The --verbose mode reveals all the lines that belong to the API input parameters (marked by '>') and API output parameters (marked by '<'). You cannot see the API output parameters in the above example because it is a Request message.

We support the application/xml media type, with specific representations for each Data Model. For example, the Role Data Model is represented as: application/vnd.abiquo.role+xml; version=2.0. See Abiquo Data Media Types.

  • No labels