Develop > API calls > Scheduler APIs > Modify cleanup scheduler

Modify cleanup scheduler

This API modifies the cleanup schedules for deployments and packages for a specified schedule ID.

Users with 'Application Architect' or 'Admin' roles only can modify cleanup schedules.
URI Method Parameters Returns
/codar/app/scheduler/{scheduleId}/cleanup PUT The scheduleId for cleanup package or cleanup deploy action

200 - updated
400 - bad request
404 - not found

Examples

The following URL was sent:

https://<<codarhost>>:<<port>>/csa/api/codar/app/scheduler/08867aaf-faec-4d08-a7ab-c18c486e1a91/cleanup

The following JSON was sent:

{
"scheduledJobName":"name",
"cleanupInterval":20,
"advanceNotificationInterval":1,
"scheduledOn":"04/01/2017 2:30 PM"
}

The following JSON was returned:

{
  "cleanupSchedules": [
  {
  "@self": "/csa/api/codar/app/scheduler/08867aaf-faec-4d08-a7ab-c18c486e1a91",
  "@type": "urn:x-hp:2012:software:cloud:data_model:scheduler",
  "id": "08867aaf-faec-4d08-a7ab-c18c486e1a91",
  "name": "name",
  "scheduledOn": "2017-04-01T09:00:00.000Z",
  "status": "PENDING",
  "eventType": "RECURRING",
  "type": "CLEAN_UP_DEPLOYMENTS",
  "createdBy": "admin",
  "createdOn": "2016-04-27T10:11:44.530Z",
  "cleanupSchedule": {
  "lifecycleStage": "STAGING",
  "modelId": "9dac9358-09a3-4e29-bbdd-45f36c27245f",
  "cleanupInterval": 20,
  "advanceNotificationInterval": 1,
  "recurInterval": 0
}
}
]
}