Documentation is now available for the Fall 2020 Update release!

Update patch baseline

This endpoint is used to update details of a patch baseline.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/patches/baselines/{baselineId}

Sample URLs

https://{api-url}/api/v2/tenants/client_16/patches/baselines/PBL-0c5d43b1-5633-423f-8d2d-6aa4c67a8cd0

Parameters

All fields are optional:

FieldData TypeDescription
nameStringUnique name to identify a patch baseline.
descriptionString(Optional) Description of a patch baseline.
dynamicBoolean
  • Provide "dynamic": false to create a static baseline.
  • Provide "dynamic": true to create a dynamic baseline.
installedIntg
  • id
ObjectID 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" }
policy
  • matchType
  • rules
    • key
    • operator
    • value
ObjectFilter 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.
KeyOperatorValue
CategoryContains, Not Contains, Equals, Not Equals, Starts with, Ends withNA
CveContains, Not Contains, Equals, Not Equals, Starts with, Ends withNA
RatingEquals, Not EqualsWhitelisted, Blacklisted
SeverityContains, Not Contains, Equals, Not Equals, Starts with, Ends withNA
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" } ] }

Static baseline

Sample request

{
	"name": "Windows_Patch_Feed",
	"description": "Windows_Vulnerabilities",
	"dynamic": true,
	"installedIntg": {
		"id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6"
	}
}

Sample response

{
	"id": "PBL-bafd3744-9a59-4cd6-9825-00a0a5a54f6e",
	"name": "Windows_Patch_Feed",
	"description": "Windows_Vulnerabilities",
	"dynamic": false,
	"enabled": false,
	"createdUser": {
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com"
	},
	"updatedUser": {
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com"
	},
	"createdTime": "2019-02-08T07:40:06+0000",
	"updatedTime": "2019-02-08T09:11:19+0000",
	"installedIntg": {
		"id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
		"displayName": "Default Windows Feed",
		"integration": {
			"id": "WINDOWSPATCH",
			"name": "Windows Patch Feed"
		}
	}
}

Dynamic baseline

Sample request

{
	"name": "Linux_Patch_Baseline",
	"description": "Linux_Patches_for_SJ_Devices",
	"dynamic": true,
	"policy": {
		"matchType": "ALL",
		"rules": [{
			"key": "Category",
			"operator": "Contains",
			"value": "Updates"
		}, {
			"key": "Rating",
			"operator": "Equals",
			"value": "WHITELISTED"
		}, {
			"key": "Severity",
			"operator": "Not Equals",
			"value": "Critical"
		}]
	},
	"installedIntg": {
		"id": "INTG-35160619-ea2d-4450-8b8d-7c4bc51ebc92"
	}
}

Sample response

{
	"id": "PBL-198014e3-74c0-4e12-a6e1-c161d9003fd6",
	"name": "Linux_Patch_Baseline",
	"description": "Linux_Patches_for_SJ_Devices",
	"dynamic": true,
	"enabled": false,
	"createdUser": {
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com"
	},
	"updatedUser": {
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com"
	},
	"createdTime": "2019-02-08T07:45:10+0000",
	"updatedTime": "2019-02-08T09:18:21+0000",
	"policy": {
		"id": 663,
		"uid": "POLICY-1308aebb-94a8-4bde-aed9-1dd4aafe78a8",
		"matchType": "ALL",
		"rules": [{
				"id": 12514,
				"key": "Category",
				"operator": "Contains",
				"value": "Updates",
				"resourceType": "DEVICE"
			},
			{
				"id": 12515,
				"key": "Rating",
				"operator": "Equals",
				"value": "WHITELISTED",
				"resourceType": "DEVICE"
			},
			{
				"id": 12516,
				"key": "Severity",
				"operator": "Not Equals",
				"value": "Critical",
				"resourceType": "DEVICE"
			}
		],
		"actions": []
	},
	"installedIntg": {
		"id": "INTG-c2f39b7b-ad25-11e8-924d-080027f0b4d6",
		"displayName": "Default Linux Feed",
		"integration": {
			"id": "LINUXPATCH",
			"name": "Linux Patch Feed"
		}
	}
}