cancel
Showing results for 
Search instead for 
Did you mean: 

NBU API: add client into policy issue

mborek4
Level 2

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

mborek4
Level 2

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.

 

View solution in original post

1 REPLY 1

mborek4
Level 2

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.