Lesson 1: Retrieving information about software assignments for a specified computer

Available from 9.2.14 This lesson shows you how to use the REST API request to retrieve software assignments of a computer that is moved to the new BigFix server.

Before you begin

User You must have the View Endpoints and View Hardware Inventory permissions to perform this task.

About this task

This tutorial is based on the old and new Data Source Computer ID of the computer that is migrated to the new BigFix server. This information is crucial for the REST API requests. To migrate software assignments for multiple computers, start with preparing a list of old and new Data Source Computer IDs for all affected computers. Then, for best results, migrate the software assignments for each computer in your environment separately. The number of software instances per single API request should not exceed 150.

When migrating focus on the software for which you have make adjustments in classification. Start from IBM software first and confirm with BigFix Inventory user if they have make any adjustments (suppression, custom bundling) for other vendor software.

In case of other vendors

Procedure

  1. Move the computer to the new BigFix Inventory server.
  2. Add a new data source to BigFix InventoryBigFix Inventory.
  3. Upload software scan results from the computer that is connected to the new BigFix server.
  4. Collect a pair of old and new Data Source Computer IDs for the computer.
    1. Log in to BigFix InventoryBigFix Inventory.
    2. Go to Reports > Computers.
    3. Hover over Configure, and click Configure View. Select Data Source Name and Data Source Computer ID from the list of columns, and click Submit.
    4. Sort the report by Computer Name by clicking on the column header. By looking at the Computer Name and the Data Source Name prepare a pair of old and new Data Source Computer IDs of the computer. The following example is used in this tutorial.
      • Data Source Computer ID that is assigned to the old data source on the report: 9596634
      • Data Source Computer ID that is assigned to the newly created data source on the report: 778906
      Tip: If you plan to migrate software assignments for multiple computers, start with preparing a list of old and new Data Source Computer IDs for all affected computers to save you time and effort.
  5. To retrieve information about software assignments related to this computer, run the following API query:
    https://hostname:port/api/sam/v2/software_instances?limit=150&
                            columns[]=product_name&columns[]=component_name&columns[]=discovery_path&columns[]=is_charged&
                            columns[]=is_confirmed&columns[]=computer_bigfix_id&columns[]=discoverable_guid&columns[]=product_release_guid&
                            columns[]=metric_id&token=user_token&criteria={"and":[["is_present","=","1"],
                            ["computer_bigfix_id","=","9596634"]]}
    The computer_bigfix_id is the same as the old Data Source Computer ID. In the example, the old Data Source Computer ID is 9596634.
    The following example shows the results of the query for this computer.
    {
        "total": 2,
        "rows": [
            {
                "product_name": "BigFix Inventory",
                "component_name": "BigFix Inventory Server",
                "is_charged": 0,
                "is_confirmed": 1,
                "computer_bigfix_id": 9596634,
                "discoverable_guid": "cdf19da9-a9de-4ee9-ab41-ff09fa6eda92",
                "product_release_guid": "1ecbbb8d-1d1e-4beb-a40f-cb9b9b9462fb",
                "metric_id": -13103
            },
            {
                "product_name": "IBM DB2 Enterprise Server Edition Unlicensed Product Base",
                "component_name": "IBM DB2 Enterprise Server Edition Unlicensed Product Base",
                "is_charged": 1,
                "is_confirmed": 0,
                "computer_bigfix_id": 9596634,
                "discoverable_guid": "57628995-cf33-4335-984d-d2c8abde750e",
                "product_release_guid": "befa759d-0473-47bd-ae60-f1e16c13e8cc",
                "metric_id": 1
            }
        ]
    }
  6. Copy the results of the query to the Body of the request, and change the value of the computer_bigfix_id to the new Data Source Computer ID.
    The following example shows the modifications that are required to migrate software assignments to the computer on the new server. The new Data Source Computer ID is 778906.
    {
        "total": 2,
        "rows": [
            {
                "product_name": "BigFix Inventory",
                "component_name": "BigFix Inventory Server",
                "is_charged": 0,
                "is_confirmed": 1,
                "computer_bigfix_id": 778906,
                "discoverable_guid": "cdf19da9-a9de-4ee9-ab41-ff09fa6eda92",
                "product_release_guid": "1ecbbb8d-1d1e-4beb-a40f-cb9b9b9462fb",
                "metric_id": -13103
            },
            {
                "product_name": "IBM DB2 Enterprise Server Edition Unlicensed Product Base",
                "component_name": "IBM DB2 Enterprise Server Edition Unlicensed Product Base",
                "is_charged": 1,
                "is_confirmed": 0,
                "computer_bigfix_id": 778906,
                "discoverable_guid": "57628995-cf33-4335-984d-d2c8abde750e",
                "product_release_guid": "befa759d-0473-47bd-ae60-f1e16c13e8cc",
                "metric_id": 1
            }
        ]
    }