Hi! Long time listener, first time caller.
I just have a quick question. Or at the very least I hope it's quick.
I'm using php curl to talk with the Veeam API, and for the life of me I can't seem to successfully send a POST request to clone a job. My question isn't so much how to do it with PHP, but what would the following error tell you in response to my post request?
<?xml version="1.0" encoding="utf-8"?>
<Error Message="Unable to deserialize XML body with root name 'Binary' and root namespace '' (for operation 'CloneJob' and contract ('IEnterpriseRestService', 'http://www.veeam.com/ent/v1.0')) using XmlSerializer. Ensure that the type corresponding to the XML is added to the known types collection of the service." StatusCode="500"
I've verified that I'm posting to the correct url (http://myveeamapi:9399/api/jobs/c174aaa ... tion=clone
) and that the xml is valid and a string.
$tmp = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" .
"<JobCloneSpec xmlns=\"http://www.veeam.com/ent/v1.0\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">".
Ive also made sure that I've added both Content-Type: text/xml; encoding='utf-8' and Content-Length: strlen($post_body) to the post headers but continually get a 500 in return.
Any help, even if it's just with the error message would be really appreciated.