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 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. To get xml responses, set this to application/xml to get XML resposne or application/json to get JSON response.
- curl -v -X PUT -d @application.json -H "Content-Type: application/json" -H "Accept: application/json" -b cookies.txt https://cloud.ravellosystems.com/api/v1/applications/414244
- curl -v -H "Accept: application/xml" -b cookies.txt https://cloud.ravellosystems.com/api/v1/applications/
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 began 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 authorizing first.|
|403 Forbidden||Can occur in several cases: Accessing to unprivileged operations (insufficient permission level), 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 (using POST instead of GET for example).|
|409 Conflict||When trying to access a resource while it’s busy performing other actions.|