cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup Rest Api Access from Firefox and Postman

Arturo_Lopez
Level 5
Partner Accredited

Hello,

I would like to know if someone have to tried to access REST API interface from Firefox or Postman. I'm trying but the CA certificate on my local machine not work correctly. I load on the certificates but not work.

Regards.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Amol_Nair
Level 6
Employee

Start by verifying that you can open the NetBackup WebUI from your machine from firefox.. Provide your credentials and login as well

https://<master's_host_name>:1556/netbackup/login

 

Once you verify the login part you can open up PostMan, and do the below for Login and retrieving the authorization token. The Fields marked in RED would be seen in postman window 

---------------------------------------------------

POST
https://<master's_host_name>:1556/netbackup/login

Header
"Content-Type":"application/json"

 

BODY
{
"userName":"Administrator",
"password":"password"
}

---------------------------------------------------

 

That's it.. Click on SEND and you get Results, containing Token, TokenType and Validity

Now Copy the Token as you would need it for any further API calls.

Below is an example to retrieve details of a particular job, here it is job id 2

----------------------------------------------------

GET
https://<master's_host_name>:1556/netbackup/admin/jobs/2


Header (In the GUI you would see multiple fields under Header, the below are Name:Value Pairs

Content-Type":"application/json"

Authorization
<the value returned by the Login API call>

----------------------------------------------------

In the PostMan GUI it would appear something like the attachment

 

View solution in original post

Anshu_Pathak
Level 5

@Arturo_Lopez 

If you are using Postman then you need to disable "SSL Certificate Verification"

File --> Setting --> General --> SSL Certificate Verification --> OFF

Then try the steps mentioned my @Amol_Nair 

Request type -> POST

URI -> https://<master's_host_name>:1556/netbackup/login

Header -> Key -> Content-Type (type this)

Header -> Value -> application/json (value for key  Content-Type)

Body -> raw -> In drop down next to - raw - select JSON [application/json]

Send

 

This should work

 

View solution in original post

3 REPLIES 3

Amol_Nair
Level 6
Employee

Start by verifying that you can open the NetBackup WebUI from your machine from firefox.. Provide your credentials and login as well

https://<master's_host_name>:1556/netbackup/login

 

Once you verify the login part you can open up PostMan, and do the below for Login and retrieving the authorization token. The Fields marked in RED would be seen in postman window 

---------------------------------------------------

POST
https://<master's_host_name>:1556/netbackup/login

Header
"Content-Type":"application/json"

 

BODY
{
"userName":"Administrator",
"password":"password"
}

---------------------------------------------------

 

That's it.. Click on SEND and you get Results, containing Token, TokenType and Validity

Now Copy the Token as you would need it for any further API calls.

Below is an example to retrieve details of a particular job, here it is job id 2

----------------------------------------------------

GET
https://<master's_host_name>:1556/netbackup/admin/jobs/2


Header (In the GUI you would see multiple fields under Header, the below are Name:Value Pairs

Content-Type":"application/json"

Authorization
<the value returned by the Login API call>

----------------------------------------------------

In the PostMan GUI it would appear something like the attachment

 

Anshu_Pathak
Level 5

@Arturo_Lopez 

If you are using Postman then you need to disable "SSL Certificate Verification"

File --> Setting --> General --> SSL Certificate Verification --> OFF

Then try the steps mentioned my @Amol_Nair 

Request type -> POST

URI -> https://<master's_host_name>:1556/netbackup/login

Header -> Key -> Content-Type (type this)

Header -> Value -> application/json (value for key  Content-Type)

Body -> raw -> In drop down next to - raw - select JSON [application/json]

Send

 

This should work

 

Arturo_Lopez
Level 5
Partner Accredited

Thank you so much @Anshu_Pathak and @Amol_Nair for your help.