Forum Discussion

nbritton's avatar
nbritton
Level 4
4 years ago

NB-Job API github example problem seeing job results

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

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?

 

 

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

    • vtas_chas's avatar
      vtas_chas
      Level 6

      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?

       

      • nbritton's avatar
        nbritton
        Level 4

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