Netbackup Rest Api Access from Firefox and Postman
- 6 years ago
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/loginHeader
"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 PairsContent-Type":"application/json"
Authorization
<the value returned by the Login API call>----------------------------------------------------
In the PostMan GUI it would appear something like the attachment
- 6 years ago
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