cancel
Showing results for 
Search instead for 
Did you mean: 

Request API with filter option

Claudus
Level 2

Hello,

I would like to filter from requesting API.

curl -k -X GET https://master:1556/netbackup/catalog/images?filter%3DclientName%20eq%20%27CLIENT_NAME%27 -H 'Accept: application/vnd.netbackup+json;version=2.0' -H 'Authorization: MY_TOKEN_HERE' | json_pp

But the result include the whole client name list?
What i'm missing ?

 

Thanks for your help.

3 REPLIES 3

Claudus
Level 2

Hello,

No one work with the API ? :D

L_BR
Level 5

Hello Claudus, 

I'm extremely unfamiliar with the API functions. We only use it to schedule and check policies with Control-m. I tinkered around with our catalog images and my filter returned only the images for my specified client. Based on the json version, I'm guessing you aren't on 9.1? I've tested it on 8.3.0.1 and 9.1 and they returned only the client I filtered it with. I just used the api-docs portal with the Try Out function

clientName eq 'client name registered in NBU' 

I could show you the results but its literally just a screenshot of "clientName":                       ", to protect my place of employments information.

 

L_BR
Level 5

Forgot to add the curl command

curl -X GET "https://master.server.name/netbackup/catalog/images?filter=clientName%20eq%20%27client.name.registered.in.netbackup%27&page%5Blimit%5D=100" -H  "accept: application/vnd.netbackup+json;version=6.0" -H  "Authorization: KeyIgeneratedFromWebUi"