'POST', 'api/cloud/hardwarePlans'
Code: Select all
{
"BackupServerUid": "urn:veeam:BackupServer:33fd1ec4-37fd-4566-8652-2cf497cfe44e",
"Name": "paul-test-1",
"Description": "Testing creating a hardware plan from the veeam API",
"ProcessorUsageLimitMhz": 1000,
"MemoryUsageLimitMb": 2000,
"HardwarePlanDetails": {
"ViCloudHardwarePlan": {
"HypervisorHostRef": "urn:VMware:Cluster:554cac72-2924-4b83-90c5-65a3cdb70074.domain-c68217",
"ParentType": "ClusterComputeResource",
"ParentName": "Shared",
"Datastores": {
"Datastores": [
{
"FriendlyName": "Pauls datastore friendly name 1",
"DatastoreType": "StoragePod",
"Reference": "urn:VMware:StoragePod:554cac72-2924-4b92-90c5-65a3cdb70086.group-p84579",
"QuotaGb": 500
}
]
},
"Network": {
"CountWithInternet": 1,
"CountWithoutInternet": 1
}
}
}
}
Code: Select all
stdClass Object
(
[FirstChanceExceptionMessage] =>
[StackTrace] =>
[Message] => spec : Error converting value "{...JSON ABOVE..
}" to type 'Veeam.Backup.Interaction.RestAPI.Resources.CloudHardwarePlanCreateSpecType'. Path '', line 1, position 990.
[StatusCode] => 400
[Status] => BadRequest
)
Also, it would be nice if there were some more JSON examples in the docs.
Many thanks.