General Request Structure
The allowed methods are currently GET, POST, PUT, and DELETE for retrieving, creating, updating, and deleting resources, respectively. Not all resources support all actions, see the detailed resources API.
Content-Type: This header must be set to the format of the sent request. Our servers currently support two types of formats: application/json and application/xml. Set this header to one of these formats to specify the format of the request.
Accept: An optional header to specify the format of the received response. Set this header to
application/xml to get XML response or
application/json to get JSON response.
Examples (Using cURL):
- curl -v -X PUT -d @/path/to/jsonfile -H "Content-Type: application/json" -H "Accept: application/json" --user email@example.com:password https://cloud.ravellosystems.com/api/v1/applications/414244
The json file is a file containing json data requested by the specific call.
- curl -v -H "Accept: application/xml" --user firstname.lastname@example.org:password https://cloud.ravellosystems.com/api/v1/applications/
HTTP Response Codes
There are several response codes that could result from executing a request to the Ravello API.
You can see the possible codes for each request, summarized below:
|200 OK||The operation has finished successfully.|
|201 Created||The resource was created successfully.|
|202 Accepted||The required operation has begun and will finish in the future.|
|400 Bad Request||When the given parameters for the request does not match the requirements.|
|401 Unauthorized||When trying to call any API request without authorization.|
|403 Forbidden||Can occur in several cases: Attempting operations with insufficient permission levels, or when quota exceeded.|
|404 Not Found||When the given parameters (IDs) don’t refer to any existing resource, or when there is no such method.|
|405 Method Not Allowed||When trying to access a resource with the wrong or unsupported HTTP method (for example, using POST instead of GET).|
|409 Conflict||When trying to access a resource while it’s busy performing other actions.|