Asheeholic
2 years agoLevel 3
NetBackup Api policy config patch not working
I used netbackup API in swagger for test, and GET, PUT, DELETE is working, but the PATCH is not working. The Policy Name is "OEL7-1_ORACLE" The cURL is curl -X 'PATCH' \
'xx:1556/netbackup/c...
- 2 years ago
Hi Asheeholic
I figured it out - you use the Chrome inspect (network tab) option to look at the payload sent. What the WebUI sends is different to the documentation (doesn't help).
All you need to do is change the data payload to something like this (your header lines should be fine as is).
{
"data": {
"type": "patchPolicyRequest",
"id": "OEL7-1_ORACLE",
"attributes": {
"policy": {
"policyAttributes": {
"active": false
}
}
}
}
}
So the "type" is documented incorrectly - it should be patchPolicyRequest (not policyPatchRequest), and within the attributes section you need an additional "policy" section before the policyAttributes.Cheers
David