maintenance

Description

Provides methods to access and modify Maintenance Schedules related entities

Namespace:

maintenance

Method: assignScheduleToSystems

HTTP POST

Description:

Assign schedule with given name to systems with given IDs. Throws a PermissionCheckFailureException when some of the systems are not accessible by the user. Throws a InvalidParameterException when some of the systems have pending actions that are not allowed in the maintenance mode.

Parameters:

  • string sessionKey

  • string scheduleName - The schedule name

  • int array sids - system IDs

  • string array rescheduleStrategy - available:

    • Cancel - cancel actions which are outside the maintenance windows

    • Fail - let assignment fail. No operation will be performed

Returns:

  • int array number of involved systems

Method: createCalendar

HTTP POST

Description:

Create a new maintenance calendar

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

  • string ical - ICal calendar data

Returns:

  • array :

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: createCalendarWithUrl

HTTP POST

Description:

Create a new maintenance calendar

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

  • string url - download URL for ICal calendar data

Returns:

  • array :

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: createSchedule

HTTP POST

Description:

Create a new maintenance Schedule

Parameters:

  • string sessionKey

  • string name - maintenance schedule name

  • string type - schedule type: single, multi

Returns:

  • array :

  • struct maintenance schedule information

    • int "id"

    • int "orgId"

    • string "name"

    • string "type"

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: createSchedule

HTTP POST

Description:

Create a new Maintenance Schedule

Parameters:

  • string sessionKey

  • string name - maintenance schedule name

  • string type - schedule type: single, multi

  • string calendar - maintenance calendar label

Returns:

  • array :

  • struct maintenance schedule information

    • int "id"

    • int "orgId"

    • string "name"

    • string "type"

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: deleteCalendar

HTTP POST

Description:

Remove a maintenance calendar

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

  • boolean cancelScheduledActions - cancel actions of affected schedules

Returns:

  • array :

  • struct reschedule information

    • string "strategy" - selected strategy

    • string "for_schedule_name"

    • boolean "status"

    • string "message"

    • array "actions"

      • struct action information

        • int "id" - action ID

        • string "name" - action name

        • string "type" - action type

        • string "scheduler" - the user that scheduled the action (optional)

        • dateTime.iso8601 "earliest" - the earliest date and time the action will be performed

        • int "prerequisite" - ID of the prerequisite action (optional)

        • int array "affected_system_ids" - affected system IDs

        • string "details" - action details string

Method: deleteSchedule

HTTP POST

Description:

Remove a maintenance schedule

Parameters:

  • string sessionKey

  • string name - maintenance schedule name

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: getCalendarDetails

HTTP POST

Description:

Lookup a specific maintenance schedule

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

Returns:

  • array :

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: getScheduleDetails

HTTP POST

Description:

Lookup a specific maintenance schedule

Parameters:

  • string sessionKey

  • string name - maintenance Schedule Name

Returns:

  • array :

  • struct maintenance schedule information

    • int "id"

    • int "orgId"

    • string "name"

    • string "type"

  • struct maintenance calendar information

    • int "id"

    • int "orgId"

    • string "label"

    • string "url" - calendar url if present

    • string "ical"

Method: listCalendarLabels

HTTP POST

Description:

List schedule names visible to user

Parameters:

  • string sessionKey

Returns:

  • string array maintenance calendar labels

Method: listScheduleNames

HTTP POST

Description:

List Schedule Names visible to user

Parameters:

  • string sessionKey

Returns:

  • string array maintenance schedule names

Method: listSystemsWithSchedule

HTTP POST

Description:

List IDs of systems that have given schedule assigned Throws a PermissionCheckFailureException when some of the systems are not accessible by the user.

Parameters:

  • string sessionKey

  • string scheduleName - the schedule name

Returns:

  • int array system IDs

Method: refreshCalendar

HTTP POST

Description:

Refresh maintenance calendar data using the configured URL

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

  • string array rescheduleStrategy - available:

    • Cancel - cancel actions which are outside the maintenance windows

    • Fail - let update fail. The calendar stay untouched

Returns:

  • array :

  • struct reschedule information

    • string "strategy" - selected strategy

    • string "for_schedule_name"

    • boolean "status"

    • string "message"

    • array "actions"

      • struct action information

        • int "id" - action ID

        • string "name" - action name

        • string "type" - action type

        • string "scheduler" - the user that scheduled the action (optional)

        • dateTime.iso8601 "earliest" - the earliest date and time the action will be performed

        • int "prerequisite" - ID of the prerequisite action (optional)

        • int array "affected_system_ids" - affected system IDs

        • string "details" - action details string

Method: retractScheduleFromSystems

HTTP POST

Description:

Retract schedule with given name from systems with given IDs Throws a PermissionCheckFailureException when some of the systems are not accessible by the user.

Parameters:

  • string sessionKey

  • int array sids - system IDs

Returns:

  • int array number of involved systems

Method: updateCalendar

HTTP POST

Description:

Update a maintenance calendar

Parameters:

  • string sessionKey

  • string label - maintenance calendar label

  • struct details - maintenance calendar details

    • string "ical" - new ical calendar data

    • string "url" - new calendar URL

  • string array rescheduleStrategy - available:

    • Cancel - cancel actions which are outside the maintenance windows

    • Fail - let update fail. The calendar stay untouched

Returns:

  • array :

  • struct reschedule information

    • string "strategy" - selected strategy

    • string "for_schedule_name"

    • boolean "status"

    • string "message"

    • array "actions"

      • struct action information

        • int "id" - action ID

        • string "name" - action name

        • string "type" - action type

        • string "scheduler" - the user that scheduled the action (optional)

        • dateTime.iso8601 "earliest" - the earliest date and time the action will be performed

        • int "prerequisite" - ID of the prerequisite action (optional)

        • int array "affected_system_ids" - affected system IDs

        • string "details" - action details string

Method: updateSchedule

HTTP POST

Description:

Update a maintenance schedule

Parameters:

  • string sessionKey

  • string name - maintenance schedule name

  • struct details - maintenance schedule details

    • string "type" - new schedule type

      • single

      • multi

    • string "calendar" - new calendar label

  • string array rescheduleStrategy - available:

    • Cancel - cancel actions which are outside the maintenance windows

    • Fail - let update fail. The calendar stays untouched

Returns:

  • * struct reschedule information

    • string "strategy" - selected strategy

    • string "for_schedule_name"

    • boolean "status"

    • string "message"

    • array "actions"

      • struct action information

        • int "id" - action ID

        • string "name" - action name

        • string "type" - action type

        • string "scheduler" - the user that scheduled the action (optional)

        • dateTime.iso8601 "earliest" - the earliest date and time the action will be performed

        • int "prerequisite" - ID of the prerequisite action (optional)

        • int array "affected_system_ids" - affected system IDs

        • string "details" - action details string