On Wednesday, 26 May 2021 04:27:27 CEST Pascal D wrote:
> I am unable to create disk using JSON however the same query in XML works
> great. In Json I get the following message back:
{
> "detail": "For correct usage, see:
> https://ov1.butterflyit.com/ovirt-engine/apidoc#services/disks/methods/add"
> ,
"reason": "Request syntactically incorrect."
> }
>
> Both use POST /ovirt-engine/api/disks and the content-type is either
> application/json or application/xml
> Here is the request in JSON:
>
> {
> "id": "866770c3-acf9-4f67-b72c-05ed241908e4",
> "name": "mydisk",
> "description": "test disk",
> "bootable": false,
> "shareable": true,
> "provisioned_size": 10240000000,
> "interface": "virtio",
> "format": "cow",
> "storage_domains": {
> "storage_domain": {
> "name": "VMS"
> }
> }
> }
I didn't try, but I guess you need
{
disk = {
"id": "....",
...
}
}
> And here it is in XML
>
> <disk id="866770c3-acf9-4f67-b72c-05ed241908e4">
> <bootable>false</bootable>
> <name>mydisk</name>
> <description>test Drive</description>
> <interface>virtio</interface>
> <provisioned_size>10240000000</provisioned_size>
> <format>cow</format>
> <storage_domains>
> <storage_domain>
> <name>VMS</name>
> </storage_domain>
> </storage_domains>
> </disk>
> _______________________________________________
> Users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/ List Archives:
> https://lists.ovirt.org/archives/list/[email protected]/message/S7PPYRFB5AIRR
> BW5PMNTCMB2PTIF6FT2/
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Users mailing list -- [email protected] To unsubscribe send an email to [email protected] Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/[email protected]/message/GM37DPIYWSEXKUGF2GWTHDWCD7QAUJ4Y/

