03-13-2019 03:36 AM - edited 03-13-2019 03:43 AM
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.
Solved! Go to Solution.
03-16-2019 02:41 AM
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
03-18-2019 01:39 AM
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
03-16-2019 02:41 AM
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
03-18-2019 01:39 AM
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
03-19-2019 04:22 AM
Thank you so much @Anshu_Pathak and @Amol_Nair for your help.