Exporting and importing a saved report view

To export a saved report view to another instance of BigFix Inventory, check the ID of the report view in the source instance of BigFix Inventory. 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 BigFix Inventory.

About this task

The following procedure uses cURL command-line tool for negotiating API requests.

Procedure

  1. Check the identifier of the saved report view.
    1. Log in to the instance of BigFix Inventory from which you want to export the saved report view.
    2. In the top navigation bar, click Reports > 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_host_name:port_number/sam/pvuonlysubcapreports#32fe0f54dc719893faacc1d0f38a0c9045863729/2
  2. Obtain API tokens from both instances of BigFix Inventory.
    1. Hover over the User icon User icon, and click Profile.
    2. In the API Token line, click Show token.
  3. Open the command line interface and change to the location where cURL is installed.
  4. To export the report view, use the following GET request:
    curl -o C:\saved_reports\report_definitions\pvu_subcapacity.txt 
    -X GET server_host_name:port_number/api/reports/report_ID?
    token=5edd5aey7cd91467h08450bc258c31f0ce706543
    Where:
    -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.
    If the request is successful, the following message is displayed:
    HTTP/1.1 200 OK
  5. To import the saved report view to another instance of BigFix Inventory, use the following POST request:
    curl -H "Content-Type: application/json" 
    -X POST -d "@C:\saved_reports\report_definitions\pvu_subcapacity.txt"
    server_host_name:port_number/api/reports?
    token=5cd3gh78499496e89a3246ab343474e85d8bc8fc
    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.

Results

The saved report view was imported to the target instance of BigFix Inventory.