11-30-2023 03:01 AM
Hello experts, any idea how to use that api request? Swagger example is failing with JSON parse error
url -X 'PUT' \
'https://nbmaster/netbackup/config/policies/api_test_lnx/clients/orarhel8' \
-H 'accept: */*' \
-H 'Authorization: A7UpUGbnweraaXtHiX3_tcx_irTjmxa7IU051S6PghDIMDdurAC2354FTCt9P' \
-H 'Content-Type: application/vnd.netbackup+json;version=9.0' \
-d '{
"data": {
"type": "string",
"id": "string",
"attributes": {
"availabilityGroup": "string",
"cluster": "string",
"databaseName": "string",
"dbid": "string",
"dbUniqueName": "string",
"groupID": "string",
"instanceName": "string",
"OS": "string",
"hardware": "string",
"osNameAndHardware": "string",
"nasVendor": "string"
}
}
}'
I did a lot of testing but still no luck, i suppose i need to change Type and ID, from the policy perspective Hardware (Linux) and OS (RedHat3.10.0).
thank you in advance
Marcin
Solved! Go to Solution.
11-30-2023 05:37 AM
ok so finally after deduction the correct data for type and id is:
"data": {
"type": "client",
"id": "orarhel8",
now im able to put client into policy via api.
11-30-2023 05:37 AM
ok so finally after deduction the correct data for type and id is:
"data": {
"type": "client",
"id": "orarhel8",
now im able to put client into policy via api.