-
Dionysis Grigoropoulos authored
* Update set server firewall profile section * Fix minor typo
c87eea37
compute-api-guide.rst 113.57 KiB
API Guide
Cyclades is the Compute Service of Synnefo. The Cyclades API tries to be as close to the OpenStack Compute API v2 as possible.
This document's goals are:
- Define the Cyclades/Compute REST API
- Clarify the differences between Cyclades and OpenStack/Compute
Users and developers who wish to access Cyclades through its REST API are advised to use the kamaki command-line client and associated python library, instead of making direct calls.
Overview
- OpenStack does not define if requests for invalid URLs should return 404 or a
- Fault. We return a BadRequest Fault.
- OpenStack does not define if requests with a wrong HTTP method should return
- 405 or a Fault. We return a BadRequest Fault.
General API Information
Authentication
All requests use the same authentication method: an X-Auth-Token
header is
passed to the servive, which is used to authenticate the user and retrieve user
related information. No other user details are passed through HTTP.
Efficient Polling with the Changes-Since Parameter
- Effectively limit support of the changes-since parameter in List Servers and List Images.
- Assume that garbage collection of deleted servers will only affect servers
deleted
POLL_TIME
seconds (default: 3600) in the past or earlier. Else loose the information of a server getting deleted. - Images do not support a deleted state, so deletions cannot be tracked.
Limitations
- Version MIME type and vesionless requests are not currently supported.
- Cyclades only supports JSON Requests and JSON/XML Responses. XML Requests are currently not supported.
- Optional content compression support is currently not supported.
- To prevent abuse, HTTP sessions have a timeout of 20 seconds before being closed.
- Full URI references and
self
andbookmark
links are not supported. - Pagination is currently not supported.
- Cached responses are currently not supported.
- Limits are currently not supported.
- Extensions are currently not supported.
API Operations
Servers
Description | URI | Method | Cyclades | OS/Compute |
---|---|---|---|---|
List | /servers |
GET | ✔ | ✔ |
/servers/detail |
GET | ✔ | ✔ | |
Create | /servers |
POST | ✔ | ✔ |
Get Stats | /servers/<server-id>/stats |
GET | ✔ | ✘ |
Get Diagnostics | /servers/<server-id>/diagnostics |
GET | ✔ | ✘ |
Get Details | /servers/<server id> |
GET | ✔ | ✔ |
Rename | /servers/<server id> |
PUT | ✔ | ✔ |
Delete | /servers/<server id> |
DELETE | ✔ | ✔ |
List Addresses | /servers/<server id>/ips |
GET | ✔ | ✔ |
Get NICs by Net | /servers/<server id>/ips/<network id> |
GET | ✔ | ✔ |
List Metadata | /servers/<server-id>/metadata |
GET | ✔ | ✔ |
Update Metadata | /servers/<server-id>/metadata |
PUT | ✘ | ✔ |
/servers/<server-id>/metadata |
POST | ✔ | ✔ | |
Get Meta Item | /servers/<server-id>/metadata/<key> |
GET | ✔ | ✔ |
Update Meta Item | /servers/<server-id>/metadata/<key> |
PUT | ✔ | ✔ |
Delete Meta Item | /servers/<server-id>/metadata/<key> |
DELETE | ✔ | ✔ |
List Servers
List all virtual servers owned by the user.
Request
URI | Method | Cyclades | OS/Compute |
---|---|---|---|
/servers |
GET | ✔ | ✔ |
/servers/detail |
GET | ✔ | ✔ |
- Both requests return a list of servers. The first returns just
id
,name
andlinks
, while the second returns the full collections of server attributes.