Aggregate Maintenance Schedule

Aggregate Maintenance Schedule

List and Create

HTTP REQUEST: GET

Get all active maintenance schedules.

GET/aggregates/maintenance/scheduler/jobs/orgId/{orgId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID for which you want to get the active maintenance schedules.
QUERY PARAMETERS
NameTypeDescription
activebooleanWhen set to 'true' you would get only active scheduled jobs. When set to 'false' you would get only deactivated scheduled jobs. If not present, you would get all scheduled jobs.
RESPONSES
CodeDescription
200Success.
400Invalid request for example: Invalid parameters, missing parameters.
401Unauthorized. This error will occur if calling user does not have access right for the API.
404Unauthorized. This error will occur if calling user does not have access right for the API.
500A server error occurred. Check the logs for more details.
200 Response Body
{
  "status": {
    "code": 200,
    "message": "success"
  },
  "responseCreated": "2022-04-02T14:34:23.585278Z",
  "response": [
    {
      "job_id": "3740f5fd-a6b8-45fb-a3ab-313bf8481af3",
      "organization_Id": "default",
      "full_build": false,
      "time_expression": "0 0 4 ? * * *",
      "created_by_user": "admin",
      "created_at": "2022-03-31T15:18:50.311944Z",
      "latest_execution": {
        "id": "8fe6e402-843b-4d04-a441-38ae4cc330b3",
        "jobId": "3740f5fd-a6b8-45fb-a3ab-313bf8481af3",
        "executedAt": "2022-04-02T10:56:35.160070Z"
      },
      "path": "time-based"
    }
  ]
}

HTTP REQUEST: POST

Create a new maintenance schedule using cron time expression.

POST/aggregates/maintenance/scheduler/jobs/orgId/{orgId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID for which you want to get the active maintenance schedules.
QUERY PARAMETERS
NameTypeDescription
time_expressionstringWhen the maintenance schedule should be executed. Defined similarly to Cron job time format, with one more field (seconds) in the beginning. For example: 0 0 0 ? * MON
scheduler_typestringUse the following value: time-based
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
Request Body
{
  "time_expression": "0 0 0 ? * MON",
  "scheduler_type": "time-based"
}
200 Response Body
{
  "status": {
    "code": 200,
    "message": "Time-based schedule successfully created."
  },
  "responseCreated": "2021-08-11T12:17:04.308417Z",
  "response": {
    "job_id": "73274ded-b1cf-4c9b-bf25-c8d2e418ef90",
    "time_expression": "0 0 0 ? * MON",
    "scheduler_type": "time-based/maintenance",
    "created_at": "2021-06-17T12:17:03.964072Z",
    "created_by_user": "devUser"
  }
}

Delete

Delete a maintenance schedule

HTTP REQUEST: DELETE

Delete a maintenance schedule

DELETE/api/1.0/aggregates/maintenance-schedule/jobs/orgId/{orgId}/jobId/{jobId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID in which you want to delete a maintenance schedule .
jobIdstringThe Job ID (UUID) of the maintenance schedule you want to delete.
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
200 Response Body
{
  "status": {
    "code": 200,
    "message": "success"
  },
  "responseCreated": "2021-06-17T11:53:47.091620Z",
  "response": "successfully deleted job with Id: [9ec0e32f-53cb-4d90-8843-e39a0eac61f4]"
}