Create and Get Patch Baselines

Creates and gets patch baselines.

Gets the list of patch baselines for a client.

Path Parameters

  • tenantIdstringrequired

    Describes the clientId of the tenant

Query Parameters

  • pageNointeger

    Default: 1

  • pageSizeinteger

    Default: 100

  • isDescendingOrderboolean

  • sortNamestring

    Default: name

  • queryStringstring

Responses

  • resultsarray

  • totalResultsinteger

  • orderBystring

  • pageNointeger

  • pageSizeinteger

  • totalPagesinteger

  • nextPageboolean

  • previousPageNointeger

  • descendingOrderboolean

Response Samples

{
  "results": [
    {
      "id": "PBL-1bfe0514-f882-4300-8d62-7e67d0ec149c",
      "name": "Updates-policytest",
      "description": "Updates",
      "dynamic": true,
      "enabled": true,
      "createdUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "updatedUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "createdTime": "2018-11-27T10:05:53+0000",
      "updatedTime": "2018-11-29T11:10:30+0000",
      "policy": {
        "id": 506,
        "uid": "POLICY-8f9c5645-f205-4659-9762-5f675ac4da41",
        "name": "Updates-policytest",
        "matchType": "ALL",
        "rules": [
          {
            "id": 12376,
            "key": "Category",
            "operator": "Equals",
            "value": "Updates - Windows 7"
          },
          {
            "id": 12377,
            "key": "Cve",
            "operator": "Starts with",
            "value": "Important"
          }
        ],
        "actions": []
      },
      "installedIntg": {
        "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
        "displayName": "Default Windows Feed",
        "integration": {
          "id": "WINDOWSPATCH",
          "name": "Windows Patch Feed"
        }
      }
    },
    {
      "id": "PBL-9aecfcab-4ab5-4a79-9e38-81fb06a400a9",
      "name": "Updates",
      "description": "Patch Updates",
      "dynamic": false,
      "enabled": true,
      "createdUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "updatedUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "createdTime": "2018-11-20T13:43:44+0000",
      "updatedTime": "2018-11-21T12:40:30+0000",
      "installedIntg": {
        "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
        "displayName": "Default Windows Feed",
        "integration": {
          "id": "WINDOWSPATCH",
          "name": "Windows Patch Feed"
        }
      }
    },
    {
      "id": "PBL-56d22620-50b6-4b94-ab5b-b6cd360c7e8c",
      "name": "Security Updates",
      "description": "Security Updates",
      "dynamic": true,
      "enabled": true,
      "createdUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "updatedUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "createdTime": "2018-11-20T13:41:30+0000",
      "updatedTime": "2018-11-20T13:42:13+0000",
      "policy": {
        "id": 502,
        "uid": "POLICY-6c5b7ccf-7f79-447e-be8a-81deaa0b419e",
        "name": "Security Updates",
        "matchType": "ALL",
        "rules": [
          {
            "id": 12372,
            "key": "Category",
            "operator": "Contains",
            "value": "Security Updates"
          }
        ],
        "actions": []
      },
      "installedIntg": {
        "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
        "displayName": "Default Windows Feed",
        "integration": {
          "id": "WINDOWSPATCH",
          "name": "Windows Patch Feed"
        }
      }
    },
    {
      "id": "PBL-8ef7bb6a-1b9e-4ce5-8b63-858b9fe9d6d2",
      "name": "Rating WHITELISTED",
      "description": "Rating WHITELISTED",
      "dynamic": true,
      "enabled": true,
      "createdUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "updatedUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "createdTime": "2018-11-27T12:38:48+0000",
      "updatedTime": "2018-11-29T04:20:10+0000",
      "policy": {
        "id": 507,
        "uid": "POLICY-2f65d515-1758-45c0-9f4d-c5d659de2f3d",
        "name": "Rating WHITELISTED",
        "matchType": "ALL",
        "rules": [
          {
            "id": 12378,
            "key": "Category",
            "operator": "Equals",
            "value": "Definition Updates - Windows Defender"
          },
          {
            "id": 12379,
            "key": "Rating",
            "operator": "Ends with",
            "value": "Critical"
          },
          {
            "id": 12380,
            "key": "Cve",
            "operator": "Equals",
            "value": "WHITELISTED"
          }
        ],
        "actions": []
      },
      "installedIntg": {
        "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
        "displayName": "Default Windows Feed",
        "integration": {
          "id": "WINDOWSPATCH",
          "name": "Windows Patch Feed"
        }
      }
    },
    {
      "id": "PBL-52795034-7085-4d0c-adf3-ed58d9ec0d56",
      "name": "Feature Packs - Windows 7",
      "description": "Feature Packs - Windows 7",
      "dynamic": true,
      "enabled": true,
      "createdUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "updatedUser": {
        "loginName": "John.Smith",
        "lastName": "Smith",
        "firstName": "John",
        "email": "john.smith@myorganization.com",
        "phoneNumber": ""
      },
      "createdTime": "2018-11-20T14:10:14+0000",
      "updatedTime": "2018-11-22T10:20:32+0000",
      "policy": {
        "id": 504,
        "uid": "POLICY-b802b846-653b-4b69-abcc-0113577f167a",
        "name": "Feature Packs - Windows 7",
        "matchType": "ALL",
        "rules": [
          {
            "id": 12374,
            "key": "Category",
            "operator": "Contains",
            "value": "Feature Packs - Windows 7"
          }
        ],
        "actions": []
      },
      "installedIntg": {
        "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
        "displayName": "Default Windows Feed",
        "integration": {
          "id": "WINDOWSPATCH",
          "name": "Windows Patch Feed"
        }
      }
    }
  ],
  "totalResults": 5,
  "orderBy": "name",
  "pageNo": 1,
  "pageSize": 100,
  "totalPages": 1,
  "nextPage": false,
  "previousPageNo": 0,
  "descendingOrder": true
}

A patch baseline is a collection of patches that are approved for installation on your instances. From a given feed, the user selects a subset of the packages that address the key vulnerabilities. The chosen set of packages form the patch baseline. As a prerequisite, create a patch feed before creating a baseline.

Notes

On using policy based rules for having Filter criteria for dynamic baseline:

  • Match type for the rules. Supported value: ALL. Patches which match all the rules in the filter criteria are added to the baseline.
  • Filter patches with the following rules:
    • "key": Provide the attributes of a patch.Supported keys: Category, Cve, Rating, Severity
    • "operator" : As listed
    • "Rating" key supports only (Equals, Not Equals) operator with supported values (Whitelisted, Blacklisted)
    • "value"

For example, to filter patches which are whitelisted and are critical, provide the fields as shown below:

"policy": {
  "matchType": "ALL",
  "rules": [
    { "key": "Rating", "operator": "Equals", "value": "Whitelisted" },
    { "key": "Severity", "operator": "Contains", "value": "critical" }
  ]
}

Path Parameters

  • tenantIdstringrequired

    Describes the clientId of the tenant

Request Body

application/json

  • idstring

  • namestring

    Unique name to identify a patch baseline.

  • descriptionstring

    Description of a patch baseline.

  • dynamicboolean

    - Provide "dynamic": false to create a static baseline. - Provide "dynamic": true to create a dynamic baseline.

  • installedIntgobject

    ID of an installed patch feed integration. Example: INTG-c1a2d041-062d-4950-8570-f9d5a4dc0c34To fetch ID of an installed patch feed integration: 1. Log into OpsRamp. 2. Click All Clients and then select the required client. 3. On the drop-down menu, click Setup. 4. On the left-hand side panel, click Integrations, click Available Integrations and click on an installed patch feed integration. 5. Copy the UID. 6. Paste the UID in the id field of the request payload. Example: "installedIntg": { "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6" }

  • enabledboolean

  • createdUserobject

  • updatedUserobject

  • createdTimestring

  • updatedTimestring

  • policyobject

    Policy to define filter criteria for dynamic baselines

Request Body Samples

{
  "name": "Linux_Patch_Feed",
  "description": "Ubuntu_Vulnerabilities",
  "dynamic": false,
  "installedIntg": {
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6"
  }
}

Responses

  • idstring

  • namestring

    Unique name to identify a patch baseline.

  • descriptionstring

    Description of a patch baseline.

  • dynamicboolean

    - Provide "dynamic": false to create a static baseline. - Provide "dynamic": true to create a dynamic baseline.

  • installedIntgobject

    ID of an installed patch feed integration. Example: INTG-c1a2d041-062d-4950-8570-f9d5a4dc0c34To fetch ID of an installed patch feed integration: 1. Log into OpsRamp. 2. Click All Clients and then select the required client. 3. On the drop-down menu, click Setup. 4. On the left-hand side panel, click Integrations, click Available Integrations and click on an installed patch feed integration. 5. Copy the UID. 6. Paste the UID in the id field of the request payload. Example: "installedIntg": { "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6" }

  • enabledboolean

  • createdUserobject

  • updatedUserobject

  • createdTimestring

  • updatedTimestring

  • policyobject

    Policy to define filter criteria for dynamic baselines

Response Samples

{
  "id": "PBL-bafd3744-9a59-4cd6-9825-00a0a5a54f6e",
  "name": "Linux_Patch_Feed",
  "description": "Ubuntu_Vulnerabilities",
  "dynamic": false,
  "enabled": false,
  "createdUser": {
    "loginName": "opsramp_api_user",
    "lastName": " ",
    "firstName": "OpsRamp API User",
    "email": "admin@opsramp.com"
  },
  "updatedUser": {
    "loginName": "opsramp_api_user",
    "lastName": " ",
    "firstName": "OpsRamp API User",
    "email": "admin@opsramp.com"
  },
  "createdTime": "2019-02-08T07:40:05+0000",
  "updatedTime": "2019-02-08T07:40:05+0000",
  "installedIntg": {
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
    "displayName": "Default Linux Feed",
    "integration": {
      "id": "LINUXPATCH",
      "name": "Linux Patch Feed"
    }
  }
}