Endpoint
/api/v2/tenants/{tenantId}/patches/baselines

Gets the list of patch baselines for a client.

Notes

There are special characters that can be used in a query string:

  • (+) represents the next field and must be URL-encoded.
  • (:) represents equals. An example is key : value.
  • Space characters must be URL-encoded.

Path Parameters
tenantId
string

Query Parameters
pageNo
integer

pageSize
integer

isDescendingOrder
boolean

sortName
string

queryString
string

Responses

OK

descendingOrder
boolean

nextPage
boolean

orderBy
string

pageNo
integer

pageSize
integer

previousPageNo
integer

results
array

results.createdTime
results.createdUser
results.description
(Optional) Description of a patch baseline.
results.dynamic
- Provide "dynamic": false to create a static baseline. - Provide "dynamic": true to create a dynamic baseline.
results.enabled
results.id
results.installedIntg
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" }
results.name
Unique name to identify a patch baseline.
results.policy
Filter criteria for dynamic baseline: - Match type for the rules. Supported value: ALLPatches 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 Below table provides the list of supported operators and values for the keys. |Key|Operator|Value| |-----|-----|-----| |Category|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Cve|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Rating|Equals, Not Equals|Whitelisted, Blacklisted| |Severity|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| 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" } ] } ```
results.updatedTime
results.updatedUser
totalPages
integer

totalResults
integer

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

Createsa patch baseline.

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.

Path Parameters
tenantId
string

createdTime
string

createdUser
object

createdUser.email
createdUser.firstName
createdUser.lastName
createdUser.loginName
description
string

(Optional) Description of a patch baseline.

dynamic
boolean

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

enabled
boolean

id
string

installedIntg
object

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" }

installedIntg.displayName
installedIntg.id
installedIntg.integration
name
string

Unique name to identify a patch baseline.

policy
object

Filter criteria for dynamic baseline: - Match type for the rules. Supported value: ALLPatches 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 Below table provides the list of supported operators and values for the keys. |Key|Operator|Value| |-----|-----|-----| |Category|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Cve|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Rating|Equals, Not Equals|Whitelisted, Blacklisted| |Severity|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| 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" } ] } ```

policy.actions
policy.id
policy.matchType
policy.rules
policy.uid
updatedTime
string

updatedUser
object

updatedUser.email
updatedUser.firstName
updatedUser.lastName
updatedUser.loginName
{
  "description": "Security_Patches_for_Windows",
  "dynamic": true,
  "installedIntg": {
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6"
  },
  "name": "Security_Patches",
  "policy": {
    "matchType": "ALL",
    "rules": [
      {
        "key": "Category",
        "operator": "Contains",
        "value": "updates"
      },
      {
        "key": "Rating",
        "operator": "Equals",
        "value": "Whitelisted"
      }
    ]
  }
}
{
  "description": "Ubuntu_Vulnerabilities",
  "dynamic": false,
  "installedIntg": {
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6"
  },
  "name": "Linux_Patch_Feed"
}

Responses

OK

createdTime
string

createdUser
object

createdUser.email
createdUser.firstName
createdUser.lastName
createdUser.loginName
description
string

(Optional) Description of a patch baseline.

dynamic
boolean

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

enabled
boolean

id
string

installedIntg
object

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" }

installedIntg.displayName
installedIntg.id
installedIntg.integration
name
string

Unique name to identify a patch baseline.

policy
object

Filter criteria for dynamic baseline: - Match type for the rules. Supported value: ALLPatches 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 Below table provides the list of supported operators and values for the keys. |Key|Operator|Value| |-----|-----|-----| |Category|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Cve|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| |Rating|Equals, Not Equals|Whitelisted, Blacklisted| |Severity|Contains, Not Contains, Equals, Not Equals, Starts with, Ends with|NA| 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" } ] } ```

policy.actions
policy.id
policy.matchType
policy.rules
policy.uid
updatedTime
string

updatedUser
object

updatedUser.email
updatedUser.firstName
updatedUser.lastName
updatedUser.loginName
{
  "createdTime": "2019-02-08T07:45:10+0000",
  "createdUser": {
    "email": "admin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  },
  "description": "Security_Patches_for_Windows",
  "dynamic": true,
  "enabled": false,
  "id": "PBL-198014e3-74c0-4e12-a6e1-c161d9003fd6",
  "installedIntg": {
    "displayName": "Default Windows Feed",
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
    "integration": {
      "id": "WINDOWSPATCH",
      "name": "Windows Patch Feed"
    }
  },
  "name": "Security_Patches",
  "policy": {
    "actions": [],
    "id": 662,
    "matchType": "ALL",
    "rules": [
      {
        "id": 12512,
        "key": "Category",
        "operator": "Contains",
        "resourceType": "DEVICE",
        "value": "updates"
      },
      {
        "id": 12513,
        "key": "Severity",
        "operator": "Contains",
        "resourceType": "DEVICE",
        "value": "critical"
      }
    ],
    "uid": "POLICY-e4780e1f-e707-4858-9c0e-b68b6e8b6bf7"
  },
  "updatedTime": "2019-02-08T07:45:10+0000",
  "updatedUser": {
    "email": "admin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  }
}
{
  "createdTime": "2019-02-08T07:40:05+0000",
  "createdUser": {
    "email": "admin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  },
  "description": "Ubuntu_Vulnerabilities",
  "dynamic": false,
  "enabled": false,
  "id": "PBL-bafd3744-9a59-4cd6-9825-00a0a5a54f6e",
  "installedIntg": {
    "displayName": "Default Linux Feed",
    "id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
    "integration": {
      "id": "LINUXPATCH",
      "name": "Linux Patch Feed"
    }
  },
  "name": "Linux_Patch_Feed",
  "updatedTime": "2019-02-08T07:40:05+0000",
  "updatedUser": {
    "email": "admin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  }
}