URL
POST https://{api-url}/api/v2/tenants/{tenantId}/patches/configurations
Sample URLs
https://{api-url}/api/v2/tenants/client_13/patches/configurations
Parameters
Field | Sub-Fields | Data Type | Values | Description |
---|---|---|---|---|
patchConfigName | NA | String | NA | Patch configuration name. |
description | NA | String | NA | Description for patch configuration. |
scheduleJob | 1. entities | String | NA | Resources in which the patches are executed. |
2. script
| String | NA | Job type. Example: missingPatchesDownloadUpdate | |
approvalType | 1. approvalType | Integer | 0- Manual, 1- Auto | Approval type for executing patches. |
2. approvalReason | String | (Optional) Approval reason for executing patches. | ||
schedule | (Optional sub-fields) Schedule settings. | |||
1. startDate | String | yyyy-MM-ddTHH:mm:ssZ | Start date for execution of job. | |
2. pattern | ||||
1. type | String | daily, weekly, monthly, never, run once | Recurrence pattern type. Note: The Run On Demand recurrence pattern is not available as an API. | |
2. frequency | String | everyday, every weekday, recurrence | Days on which the schedule is applied. Frequency is dependent on recurrence pattern type. Example: Provide type as weekly, then frequency is the day on which the job is run. | |
3. repeatType | String | days | Run the job constantly on specific days. | |
4. weekDays | String | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | Days on which the job is run. | |
5. dayOfMonth | Integer | 1, 2, 3, 4,..., 31 | Day on which the job is scheduled to run every month. Days range between 1 to 31. Example: Provide dayOfMonth as 4, then the job is run on 4th day of every month. | |
6. weekIndex | String | First, Second, Third, Fourth, Last | Week on which the job is run. Example: First Monday | |
7. dayOfIndex | String | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | Day on which the job is scheduled to run. Example: Provide weekIndex as First and dayOfMonth as Sunday, this indicates that job is run on First Sunday of every month. | |
enablePatching | NA | Boolean | true, false | (Optional) Enable patching. |
maintenancePeriod | NA | Integer | NA | (Optional) Maintenance period for the patches. |
rebootOptions | 1. rebootRequired | Boolean | true, false | Reboot required after execution of patches. |
2. forceReboot | Boolean | true, false | Force reboot after execution of patches. |
NA indicates that the value is not applicable.
Status code
200 OK
Notes
- Approved Windows patches are installed on the device during the scheduled installation window.
- The device is immediately rebooted following any patch that requires a reboot.
- Standard checks are performed on rebooted devices to ensure the device is operating properly.
Sample request
{
"patchConfigName": "Test_Patch_Config",
"description": "testing",
"approvalType": {
"approvalType": 1,
"approvalReason": "testing data"
},
"rebootOptions": {
"rebootRequired": "true",
"forceReboot": "true"
},
"scheduleJob": {
"entities": [{
"resource": {
"id": "04e26c5a-2173-4857-98b5-31190bb9985d",
"type": "DEVICE"
}
},
{
"resource": {
"id": "338382d8-d4e3-4573-85fc-27580b68ac5c",
"type": "DEVICE"
}
}
],
"script": {
"jobType": "missingPatchesDownloadUpdate"
},
"schedule": {
"startDate": "2016-04-14T10:10:10+0000",
"pattern": {
"type": "daily",
"frequency": "recurrence",
"repeatType": "Days",
"repeatFrequency": "2"
}
}
},
"enablePatching": "true",
"maintenancePeriod": "60"
}
Sample response
{
"scheduleJob": {
"name": "test",
"entities": [{
"resource": {
"id": "04e26c5a-2173-4857-98b5-31190bb9985d",
"generalInfo": {
"ipAddresses": "10.21.0.212",
"hostName": "opsramp-demo-ubuntu-2"
},
"clientUniqueId": "client_13",
"type": "DEVICE"
}
},
{
"resource": {
"id": "338382d8-d4e3-4573-85fc-27580b68ac5c",
"generalInfo": {
"ipAddresses": "10.21.0.213",
"hostName": "opsramp-demo-ubuntu-3"
},
"clientUniqueId": "client_13",
"type": "DEVICE"
}
}
],
"schedule": {
"startDate": "2016-04-14T10:10:00+0000",
"pattern": {
"type": "daily",
"frequency": "recurrence",
"repeatFrequency": 2,
"repeatType": "days"
}
},
"client": {
"id": 13,
"uniqueId": "client_13",
"name": "patch client",
"activated": true
},
"script": {
"jobType": "missingPatchesDownloadUpdate"
}
},
"id": "PATCHCONF-9db1451f-1441-4bd9-90b9-aa371fc11e6d",
"patchConfigName": "test",
"description": "testing",
"approvalType": {
"approvalType": 1,
"approvalReason": "testing data"
},
"rebootOptions": {
"rebootRequired": true,
"forceReboot": true
},
"enablePatching": true,
"maintenancePeriod": 60
}