General Request Structure

HTTP Methods

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.

HTTP Headers

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.

X-LongToString: An optional header, causing all long-based values to be returned as strings. For example, instead of receiving applicationId=123456, you will get applicationId=”123456”. This option is recommended for JavaScript based clients that are using the API, as JavaScript doesn’t support 64bit numbers (rounding is automatically done for those types).

Examples (Using cURL):

- curl -v -X PUT -d @/path/to/jsonfile -H "Content-Type: application/json" -H "Accept: application/json" --user ravello@ravello.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 ravello@ravello.com: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.
Body Class: 
developers-center h3-no-border-top