To export a saved report view to another instance of License Metric Tool, check the ID of the report view in
the source instance of License Metric Tool. Then, use the GET
operation to retrieve the definition of the saved report view. Next, use the POST operation to
import it to another instance of License Metric Tool.
About this task
Note: Export and import of saved reports is supported only for instances of License Metric Tool on the same version.
The
following procedure uses cURL command-line tool for negotiating API requests.
Procedure
- Check the identifier of the saved report view.
For
application update 9.2.38 and later, perform the following steps.
- Log in to the instance of License Metric Tool from which you want to
export the saved report view.
- In the top navigation bar, hover over Reports and click Saved
Reports.
- Hover over Configure, and click Configure
View.
- Select ID, and click Submit. ID of the saved
report view is provided in the ID column.
- For application updates 9.2.37 and earlier, perform the following steps.
- Log in to the instance of License Metric Tool from which you want to
export the saved report view.
- In the top navigation bar, hover over Reports, and click Saved
Reports. Open the saved report view, and check the last number in the report URL. In the
following example, the report ID is
2.
http://server_url:server_port/sam/pvuonlysubcapreports#32fe0f54dc719893faacc1d0f38a0c9045863729/2
- Obtain API tokens from both instances of License Metric Tool.
-
Hover over the User icon
, and click Profile.
-
In the API Token line, click Show token.
- Open the command line interface and change to the location
where cURL is installed.
- To export the report view, use the following GET request:
curl -H "Token:token" -o C:\saved_reports\report_definitions\pvu_subcapacity.txt
-X GET server_url:server_port/api/reports/report_ID
Where:
- -H
- Specifies the header of the request.
- -o
- Specifies the path to the file where the definition of the saved report view is to be
saved.
- -X
- Specifies the type of HTTP request.
- report_ID
- Specifies the identifier of the saved report view that is to be exported.
- token
- Used to authenticate REST API requests.
If the request is successful, the following message is
displayed:
HTTP/1.1 200 OK
- To import the saved report view to another instance of License Metric Tool,
use the following POST request:
curl -H "Content-Type: application/json" -H "Token:token" -X POST -d "@C:\saved_reports\report_definitions\pvu_subcapacity.txt"
server_url:server_port/api/reports
Where:
- -H
- Specifies the header of the request.
- -X
- Specifies the type of HTTP request.
- -d
- Specifies the path to the file where the definition of the saved report view was saved.
- token
- Used to authenticate REST API requests.
Results
The saved report view was imported to the target instance
of License Metric Tool.