Modify an existing scheduled action

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Update the schedule repeatedly details for restart and shutdown commands

Request URL

https://{server-hostname}:8383/api/v1/mdm/actions/scheduled/{action_name}

Scope

MDMDeviceMgmt.UPDATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

action_namestringMandatory

Name of the scheduled action

- Request Body

application/json
JSON Object
Hide Sub-Attributes
group_action_idlongMandatory

ID for the action scheduled to be executed on a group (required)

groupsarrayMandatory

Array of group IDs with devices that need to be restarted or shutdown (required)

time_zonestringOptional

Timezone for which the scheduled action is to be executed (required)

schedule_paramsJSON ObjectOptional

Parameters for the schedule (required)

Show Sub-Attributes
schedule_typestringOptional

Schedule Type: Daily, Weekly, or Monthly

daily_interval_typestringOptional

Type of daily schedule: everyday, weekDays, or alternativeDays (Daily only)

daily_timestringOptional

Execution time for daily type schedule (Daily only)

days_of_weekstringOptional

Comma-separated days of the week (Weekly only)

weekly_timestringOptional

Execution time for weekly type schedule (Weekly only)

monthly_performstringOptional

Type of monthly schedule: WeekDay or Day (Monthly only)

monthly_daystringOptional

Day of the month for execution (Monthly only)

monthly_timestringOptional

Execution time for monthly type schedule (Monthly only)

monthly_week_daystringOptional

Day of the week for monthly type schedule (Monthly only)

monthly_week_numstringOptional

Execution week for monthly type schedule (Monthly only)

months_liststringOptional

Comma-separated list of months for monthly schedule (Monthly only)

scheduler_disabledstringOptional

Value indicating whether the schedule is disabled

reason_messagestringOptional

Reason for scheduling the action, used for auditing purposes (required)

execution_typeintegerOptional

Type of execution: 1 = Once, 2 = Repeat (required)

expirylongOptional

Time in milliseconds at which the scheduled command expires (required)

schedule_once_timelongOptional

Current time in milliseconds when action is scheduled to be executed once (required)

action_namestringOptional

Name of the action: restart or shutdown

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request PUT \
  --url https://appdomain/api/v1/mdm/actions/scheduled/{action_name} \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"schedule_params":{"days_of_week":"1,3,5","schedule_type":"Weekly","weekly_time":"1430"},"reason_message":"Weekly maintenance window","action_name":"restart","group_action_id":9007199254741060,"groups":["9007199254741037","9007199254741038","9007199254741039"],"execution_type":2,"expiry":600000,"time_zone":"America/Los_Angeles","schedule_once_time":1627970696000}'

Sample Request Body

Modify an existing schedule to weekly on Mon/Wed/Fri

Copied!
  {
    "schedule_params": {
      "days_of_week": "1,3,5",
      "schedule_type": "Weekly",
      "weekly_time": "1430"
    },
    "reason_message": "Weekly maintenance window",
    "action_name": "restart",
    "group_action_id": 9007199254741060,
    "groups": [
      "9007199254741037",
      "9007199254741038",
      "9007199254741039"
    ],
    "execution_type": 2,
    "expiry": 600000,
    "time_zone": "America/Los_Angeles",
    "schedule_once_time": 1627970696000
  }
                
Show full

Possible Response Codes

202HTTP code

Sample Response: HTTP 202

Copied!
202 Accepted
Show full

Duration: 1 minute | Threshold: 60 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.