Forum Discussion

mborek4's avatar
mborek4
Level 2
8 months ago

NBU API: add client into policy issue

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

 

 

 

  • 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.

     

1 Reply

  • 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.