Changing the Oracle core factor through REST API

Available from 9.2.8. To change the Oracle core factor thorough REST API, retrieve the list of servers that exist in your infrastructure. Then, choose IDs of the servers for which you want to change the core factor and update the value.

Before you begin

User You must have the Manage Hardware Inventory permissions to use this API.

Procedure

  1. Retrieve information about servers that exist in your infrastructure and the Oracle core factor that is assigned to every server.
    • If you retrieve the information through a web browser plug-in, use the following request:
      GET https://hostname:port/sam/processors.json?columns[]=server_id
      &columns[]=server_name&columns[]=oracle_core_factor
      &token=cb1e554922312e0e4aa44a1ef2b9a426117efe39
      Accept: application/json 
      Accept-Language: en-US
      
    • If you retrieve the information by using cURL, run the following command:
      curl --insecure -H "Content-type: application/json; charset=UTF-8"
      -X GET "https://hostname:port/sam/processors?columns%5B%5D=server_id
      &columns%5B%5D=server_name&columns%5B%5D=oracle_core_factor
      &token=cb1e554922312e0e4aa44a1ef2b9a426117efe39" -o out.json
    The request returns the list of server IDs and names together with core factors that are currently assigned to each server.
    {
    "total":3,
    "rows":
         [{
         "server_id":1,
         "server_name":"TLM_VM_42362841-6b4e-ea26-9755-07b28dc0fd41",
         "oracle_core_factor":"0.5"
         },
         {
         "server_id":2,
         "server_name":"Oracle Corporation SPARC-Enterprise-T5220 2225894042",
         "oracle_core_factor":"0.5"
         },
         {
         "server_id":3,
         "server_name":"Microsoft Azure VMware-42 3b f0 3c fb d5 4c 97-4f bd ca 3f 83 3a 91 46",
         "oracle_core_factor":"0.5"
    }]}
  2. Update the core factor that is assigned to a selected server.
    • If you update the information through a web browser plug-in, use the following request:
      POST api/v1/servers?token=cb1e554922312e0e4aa44a1ef2b9a426117efe39
      {
      "oracle_core_factors":
      [
           {
           "server_id": 1,
           "oracle_core_factor": 1.0
           }
      ]}
    • If you update the information by using cURL, run the following command:
      curl --insecure -H "Content-type: application/json; charset=UTF-8"
      -X PUT https://hostname:port/api/v1/servers?token=cb1e554922312e0e4aa44a1ef2b9a426117efe39
      -d '{"oracle_core_factors":[{"server_id": 1,"oracle_core_factor": 1.4}]}'
  3. To update utilization of the Oracle Processor Core metric, log in to BigFix Inventory and go to Reports > All Metrics. Then, click Recalculate.