2.4 Internet Media Types Used by the REST API (JSON and XML)

The REST API can use either XML or JSON to encode data sent in requests or received in responses. The Internet media type of the data returned is controlled by setting the appropriate HTTP Headers for each request. Since some languages, such as Python, have better libraries for parsing data in JSON format, as opposed to XML, you may decide to set the media type to JSON for all requests.

To notify Oracle VM Manager to return data in JSON format, you must set the Accept Header to application/json.

To send data to Oracle VM Manager in JSON format you must set the Content-Type Header to application/json.

To notify Oracle VM Manager to return data in XML format, set the Accept Header to application/xml, or rely on the default media type and do not set this parameter at all.

To send data to Oracle VM Manager in XML format, set the Content-Type Header to application/xml, or rely on the default media type and do not set this parameter at all.

Warning

For all POST and PUT operations where data is included in the body of the HTTP request, element names are case-sensitive.