cancel
Showing results for 
Search instead for 
Did you mean: 

NB-Job API github example problem seeing job results

nbritton
Level 4

Using 8.3.0.1 against the code listed here:
https://github.com/VeritasOS/netbackup-api-code-samples/blob/master/snippets/powershell/Get-NB-Jobs....

I updated the version to version 4

from:

$content_type = "application/vnd.netbackup+json;version=1.0"

to:

$content_type = "application/vnd.netbackup+json;version=4.0"

 

The login works fine, but when i do the job listing, i am not seeing what i would expect.    I dont see any attributes, what i do see is a list of numbers in $responce.content.   But i cant see any other data being returned.    

 

Has anyone else had experiance with pulling jobs from powershell?

 

 

9 REPLIES 9

nbritton
Level 4

So i think it narrows down to a RBAC problem.   

I was using an AD user that i use for scripts that was a member of the group added to the default administrator group.  Once i change the user to nbsecadmin which belongs to the same role, but it returns results.   

 

Thoughts.   I am also thinking i need to open a case for that problem, as it seems to be something in rbac not working.

That definitely sounds like an rbac issue to me.  You're saying that the user (not nbsecadmin) is part of the administrator group within nbu, right?

 

Charles
VCS, NBU & Appliances

Both users i am testing with are part of the default administorators group.  

Just thinking out loud here.  Have you tried to just use something like Postman to remove the script from suspicion?  I know one user works and the other doesn't in the script, but with Postman or Insomnia you can frequently get more information on the response and see what's going on better without having to trap or have logging logic.  I haven't loked at this specific code snippet yet but you might see more from an IDE.

Charles
VCS, NBU & Appliances

I have tried with postman, i was not able to get anything else out of it.   You can give me a call Charles. 

Krutons
Level 6
   VIP   

Both users are VxSS users?

What are you refering to as VxSS?

jnardello
Level 6
   VIP    Certified

Veritas Security Services. 

 

bpnbaz -ListUsers Domain_Type:Domain_Name:User_Name [-M server] [-credfile] 

https://www.veritas.com/content/support/en_US/doc/21733320-143639988-0/v102669499-143639988

Krutons
Level 6
   VIP   

Thanks for linking that @jnardello I haven't had time to get back on these forums.