mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
32 lines
1.1 KiB
XML
32 lines
1.1 KiB
XML
<section id="response-formats">
|
|
<title>Response Formats: XML and JSON</title>
|
|
<para>CloudStack supports two formats as the response to an API call. The default response is XML. If you would like the response to be in JSON, add &response=json to the Command String.</para>
|
|
<para>Sample XML Response:</para>
|
|
<programlisting>
|
|
<listipaddressesresponse>
|
|
<allocatedipaddress>
|
|
<ipaddress>192.168.10.141</ipaddress>
|
|
<allocated>2009-09-18T13:16:10-0700</allocated>
|
|
<zoneid>4</zoneid>
|
|
<zonename>WC</zonename>
|
|
<issourcenat>true</issourcenat>
|
|
</allocatedipaddress>
|
|
</listipaddressesresponse>
|
|
</programlisting>
|
|
<para>Sample JSON Response:</para>
|
|
<programlisting>
|
|
{ "listipaddressesresponse" :
|
|
{ "allocatedipaddress" :
|
|
[
|
|
{
|
|
"ipaddress" : "192.168.10.141",
|
|
"allocated" : "2009-09-18T13:16:10-0700",
|
|
"zoneid" : "4",
|
|
"zonename" : "WC",
|
|
"issourcenat" : "true"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
</programlisting>
|
|
</section> |