We are using a vCenter appliance: vSphere Client version 7.0.3.00500
I am trying to use the REST API to copy a library item, but am getting the following error response:
{\"error_type\":\"INVALID_ARGUMENT\",\"messages\":[{\"args\":[\"destination_create_spec\"],\"default_message\":\"Unable to parse property with name destination_create_spec.\",\"id\":\"com.vmware.vapi.rest.parsePropertyException\"}]}Relevant python code that's generating this is:
json_body = '{' + f"""
"name": "test"
"type": "ovf"
""" + "}"
resp = requests.post(f"https://my.server.url/api/content/library/item/my_source_id?action=copy", verify=False, headers={
"vmware-api-session-id": session_id
}, json = json_body)I can do all kinds of other things with the same data being used here (session_id and my_source_id) but this particular api endpoint seems to be complaining about an argument itself has created, as I'm not sending the payload in with a destination_create_spec argument.
I've tried various permutations of this endpoint from different versions, and they all fail either with this error or a 404 (in the case of older API spec)
Thanks for any pointers you can provide.
ETA Copy library item does not seem to be implemented in the official python SDK, though I'm happy to be proven wrong on that one.