Add A Switch Port Schedule

POST {{baseUrl}}/networks/:networkId/switch/portSchedules

Add a switch port schedule #### Body Parameters Parameter|Type|Description :-------------: |:-------------: |:-------------: name| string| The name for your port schedule. Required portSchedule| object| The schedule for switch port scheduling. Schedules are applied to days of the week. When it's empty, default schedule with all days of a week are configured. Any unspecified day in the schedule is added as a default schedule configuration of the day.

Request Body

{"name"=>"<string>", "portSchedule"=>{"monday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "tuesday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "wednesday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "thursday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "friday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "saturday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}, "sunday"=>{"active"=>"<boolean>", "from"=>"<string>", "to"=>"<string>"}}}

HEADERS

KeyDatatypeRequiredDescription
X-Cisco-Meraki-API-Keynull
Content-Typestring

RESPONSES

status: Created

{&quot;id&quot;:&quot;1234&quot;,&quot;networkId&quot;:&quot;N_24329156&quot;,&quot;name&quot;:&quot;Weekdays schedule&quot;,&quot;portSchedule&quot;:{&quot;monday&quot;:{&quot;active&quot;:true,&quot;from&quot;:&quot;9:00&quot;,&quot;to&quot;:&quot;17:00&quot;},&quot;tuesday&quot;:{&quot;active&quot;:true,&quot;from&quot;:&quot;9:00&quot;,&quot;to&quot;:&quot;17:00&quot;},&quot;wednesday&quot;:{&quot;active&quot;:true,&quot;from&quot;:&quot;9:00&quot;,&quot;to&quot;:&quot;17:00&quot;},&quot;thursday&quot;:{&quot;active&quot;:true,&quot;from&quot;:&quot;9:00&quot;,&quot;to&quot;:&quot;17:00&quot;},&quot;friday&quot;:{&quot;active&quot;:true,&quot;from&quot;:&quot;9:00&quot;,&quot;to&quot;:&quot;17:00&quot;},&quot;saturday&quot;:{&quot;active&quot;:false,&quot;from&quot;:&quot;0:00&quot;,&quot;to&quot;:&quot;24:00&quot;},&quot;sunday&quot;:{&quot;active&quot;:false,&quot;from&quot;:&quot;0:00&quot;,&quot;to&quot;:&quot;24:00&quot;}}}