Developing a client application by using Postman¶
Postman is an API development tool that supports REST APIs. You can use Postman to design scripts that interact with the IBM Spectrum Protect Plus REST API. Postman is a desktop application that runs on the Microsoft Windows, Apple macOS, and Linux operating systems.
After you download Postman from the official site. As soon as you complete the setup and registration steps, you will see a workspace.
Example 1: Get an IBM Spectrum Protect Plus session ID¶
Assume that you want to get a session ID from the IBM Spectrum Protect Plus virtual appliance whose IPv4 address is 10.0.0.100. If you already have a valid session ID, reuse it and skip this step. For details, follow the instructions in Creating a session ID. Launch Postman and open a new workspace.
Set the HTTP method (left of the URL field) to POST. Enter the URL:
https://10.0.0.100/api/endeavour/session
Click Params to manage key-value pairs for the params field in your HTTP request. You will see the params values being appended to the URL automatically. At this time, leave these fields blank.
Click Auth and enter appropriate values:
TYPE: Basic Auth
Username: (A valid username for the target IBM Spectrum Protect Plus application)
Password: (The password for this user)
Click Send.
The response body and the HTTP status appear in the response pane. JSON records in the response body are formatted in color and with indentations (pretty-print format). You can collapse and expand nested JSON objects.
In this case, the key-value pair of sessionid
should appear in the second line. Copy the value.
Example 2: Get site information¶
Set the HTTP method to GET. Enter the URL:
https://10.0.0.100/api/site
Click Auth and enter appropriate values:
TYPE: API Key
Key: X-Endeavour-Sessionid
Value: (Paste the session ID.)
Add to: Header
Click Send.
Ensure that you get the HTTP status of 200 (OK). The response body shows the list of the sites in a JSON format.