{"type":"api","title":"Create Network Group Policy","meta":{"id":"/apps/pubhub/media/Meraki-Dashboard-API-v1-Documentation/e92a64d0814b40091de22f4a93378df69809b95e/5c63a5d4-9452-397a-85eb-8b6fec45147e","info":{"title":"Meraki Dashboard API","description":"A RESTful API to programmatically manage and monitor Cisco Meraki networks at scale.\n\n\u003e Date: 06 November, 2024\n\u003e\n\u003e [Recent Updates](https://meraki.io/whats-new/)\n\n---\n\n[API Documentation](https://meraki.io/api)\n\n[Community Support](https://meraki.io/community)\n\n[Meraki Homepage](https://www.meraki.com)\n","contact":{"name":"Meraki Developer Community","url":"https://meraki.io/community"},"version":"1.52.0"},"security":[{"meraki_api_key":[]},{"bearerAuth":[]}],"tags":[{"name":"organizations"},{"name":"networks"},{"name":"devices"},{"name":"insight"},{"name":"wireless"},{"name":"camera"},{"name":"appliance"},{"name":"switch"},{"name":"cellularGateway"},{"name":"sm"},{"name":"sensor"},{"name":"administered"},{"name":"wirelessController"},{"name":"policy"},{"name":"accessControlLists"},{"name":"accessPolicies"},{"name":"accounts"},{"name":"acls"},{"name":"actionBatches"},{"name":"adaptivePolicy"},{"name":"addresses"},{"name":"admins"},{"name":"airMarshal"},{"name":"alertTypes"},{"name":"alerts"},{"name":"alternateManagementInterface"},{"name":"analytics"},{"name":"api"},{"name":"apiRequests"},{"name":"apnsCert"},{"name":"appliances"},{"name":"applicationCategories"},{"name":"applicationUsage"},{"name":"applications"},{"name":"areas"},{"name":"arpInspection"},{"name":"arpTable"},{"name":"artifacts"},{"name":"assets"},{"name":"assignments"},{"name":"authenticationToken"},{"name":"autoLocate"},{"name":"autoRf"},{"name":"availabilities"},{"name":"bandwidthUsageHistory"},{"name":"bgp"},{"name":"billing"},{"name":"bluetooth"},{"name":"bluetoothClients"},{"name":"bonjourForwarding"},{"name":"boundaries"},{"name":"brandingPolicies"},{"name":"bulk"},{"name":"bulkUpdate"},{"name":"byBoundary"},{"name":"byClient"},{"name":"byDevice"},{"name":"byEnergyUsage"},{"name":"byInterval"},{"name":"byMetric"},{"name":"byModel"},{"name":"byNetwork"},{"name":"byStatus"},{"name":"bySwitch"},{"name":"byType"},{"name":"byUsage"},{"name":"byUtilization"},{"name":"bypassActivationLockAttempts"},{"name":"cableTest"},{"name":"callbacks"},{"name":"categories"},{"name":"cellular"},{"name":"cellularFirewallRules"},{"name":"cellularUsageHistory"},{"name":"certs"},{"name":"changeHistory"},{"name":"channelUtilization"},{"name":"channelUtilizationHistory"},{"name":"channels"},{"name":"claim"},{"name":"claimKey"},{"name":"clientCountHistory"},{"name":"clients"},{"name":"cloudMonitoring"},{"name":"commands"},{"name":"communicationPlans"},{"name":"compliance"},{"name":"configTemplates"},{"name":"configurationChanges"},{"name":"configure"},{"name":"configuredDevices"},{"name":"connectionStats"},{"name":"connections"},{"name":"connectivity"},{"name":"connectivityEvents"},{"name":"connectivityMonitoringDestinations"},{"name":"contentFiltering"},{"name":"coterm"},{"name":"current"},{"name":"customAnalytics"},{"name":"customPerformanceClasses"},{"name":"dataRateHistory"},{"name":"delegated"},{"name":"desktopLogs"},{"name":"details"},{"name":"detections"},{"name":"deviceCommandLogs"},{"name":"deviceProfiles"},{"name":"deviceTypeGroupPolicies"},{"name":"dhcp"},{"name":"dhcpServerPolicy"},{"name":"dscpTaggingOptions"},{"name":"dscpToCosMappings"},{"name":"eapOverride"},{"name":"earlyAccess"},{"name":"electronicShelfLabel"},{"name":"entitlements"},{"name":"esims"},{"name":"ethernet"},{"name":"eventTypes"},{"name":"events"},{"name":"exportEvents"},{"name":"failedConnections"},{"name":"failover"},{"name":"features"},{"name":"fields"},{"name":"firewall"},{"name":"firewalledServices"},{"name":"firmware"},{"name":"firmwareUpgrades"},{"name":"floorPlans"},{"name":"groupPolicies"},{"name":"groups"},{"name":"health"},{"name":"healthByTime"},{"name":"historical"},{"name":"history"},{"name":"hotspot20"},{"name":"httpServers"},{"name":"identities"},{"name":"identityPsks"},{"name":"idps"},{"name":"imports"},{"name":"inboundCellularFirewallRules"},{"name":"inboundFirewallRules"},{"name":"interfaces"},{"name":"internetPolicies"},{"name":"intrusion"},{"name":"inventory"},{"name":"ipv6"},{"name":"jobs"},{"name":"keys"},{"name":"l2"},{"name":"l3"},{"name":"l3FirewallRules"},{"name":"l7FirewallRules"},{"name":"lan"},{"name":"latencyHistory"},{"name":"latencyStats"},{"name":"latest"},{"name":"licenses"},{"name":"licensing"},{"name":"lines"},{"name":"linkAggregations"},{"name":"linkLayer"},{"name":"live"},{"name":"liveTools"},{"name":"lldpCdp"},{"name":"loginSecurity"},{"name":"logs"},{"name":"lossAndLatencyHistory"},{"name":"malware"},{"name":"managementInterface"},{"name":"manufacturers"},{"name":"me"},{"name":"merakiAuthUsers"},{"name":"meshStatuses"},{"name":"models"},{"name":"monitor"},{"name":"monitoredMediaServers"},{"name":"mqttBrokers"},{"name":"mtu"},{"name":"multicast"},{"name":"netflow"},{"name":"networkAdapters"},{"name":"networkHealth"},{"name":"objectDetectionModels"},{"name":"onboarding"},{"name":"oneToManyNatRules"},{"name":"oneToOneNatRules"},{"name":"openapiSpec"},{"name":"optIns"},{"name":"order"},{"name":"ospf"},{"name":"overview"},{"name":"packetLoss"},{"name":"packets"},{"name":"payloadTemplates"},{"name":"performance"},{"name":"performanceHistory"},{"name":"permissions"},{"name":"pii"},{"name":"piiKeys"},{"name":"ping"},{"name":"pingDevice"},{"name":"policies"},{"name":"policyObjects"},{"name":"portForwardingRules"},{"name":"portSchedules"},{"name":"ports"},{"name":"power"},{"name":"powerModules"},{"name":"prefixes"},{"name":"prepare"},{"name":"priorities"},{"name":"profiles"},{"name":"provisioning"},{"name":"qosRules"},{"name":"qualityAndRetention"},{"name":"qualityRetentionProfiles"},{"name":"radio"},{"name":"ratePlans"},{"name":"readings"},{"name":"recent"},{"name":"redundancy"},{"name":"relationships"},{"name":"rendezvousPoints"},{"name":"requests"},{"name":"responseCodes"},{"name":"restrictions"},{"name":"rfProfiles"},{"name":"roles"},{"name":"rollbacks"},{"name":"routing"},{"name":"rules"},{"name":"saml"},{"name":"samlRoles"},{"name":"schedules"},{"name":"sdwan"},{"name":"search"},{"name":"security"},{"name":"securityCenters"},{"name":"seen"},{"name":"sense"},{"name":"sentry"},{"name":"servers"},{"name":"serviceProviders"},{"name":"settings"},{"name":"signalQualityHistory"},{"name":"sims"},{"name":"singleLan"},{"name":"siteToSiteVpn"},{"name":"smDevicesForKey"},{"name":"smOwnersForKey"},{"name":"snmp"},{"name":"softwares"},{"name":"splash"},{"name":"splashAuthorizationStatus"},{"name":"splashLoginAttempts"},{"name":"ssids"},{"name":"stacks"},{"name":"staged"},{"name":"stages"},{"name":"staticRoutes"},{"name":"statics"},{"name":"stats"},{"name":"status"},{"name":"statuses"},{"name":"stormControl"},{"name":"stp"},{"name":"subnetPool"},{"name":"subnets"},{"name":"subscription"},{"name":"subscriptions"},{"name":"summary"},{"name":"swap"},{"name":"swaps"},{"name":"switches"},{"name":"syslogServers"},{"name":"system"},{"name":"targetGroups"},{"name":"themes"},{"name":"thirdPartyVPNPeers"},{"name":"throughputTest"},{"name":"top"},{"name":"topology"},{"name":"traffic"},{"name":"trafficAnalysis"},{"name":"trafficHistory"},{"name":"trafficShaping"},{"name":"trustedAccessConfigs"},{"name":"trustedServers"},{"name":"upgrades"},{"name":"uplink"},{"name":"uplinkBandwidth"},{"name":"uplinkSelection"},{"name":"uplinks"},{"name":"uplinksLossAndLatency"},{"name":"usage"},{"name":"usageHistories"},{"name":"usageHistory"},{"name":"userAccessDevices"},{"name":"utilization"},{"name":"v4"},{"name":"video"},{"name":"videoLink"},{"name":"vlanAssignments"},{"name":"vlanProfiles"},{"name":"vlans"},{"name":"vmx"},{"name":"vpn"},{"name":"vpnExclusions"},{"name":"vpnFirewallRules"},{"name":"vppAccounts"},{"name":"wakeOnLan"},{"name":"warmSpare"},{"name":"warnings"},{"name":"webhookTests"},{"name":"webhooks"},{"name":"wirelessControllers"},{"name":"wirelessProfiles"},{"name":"wlanLists"},{"name":"zones"}],"x-parser-conf":{"overview":{"markdownPath":"docs/overview.md"},"theme":"meraki","serverConfig":true,"meta":{"useProxy":true},"httpBearer":{"bearerToken":"75dd5334bef4d2bc96f26138c163c0a3fa0b5ca6"},"labelConfig":{"endpoint":{"field":"operationId","format":"startCase"}},"groupBy":{"$remoteModule":"config/group_platform.js"},"sortBy":{"$remoteModule":"config/sort_by.js"},"exampleAsDefault":true,"expand":3,"sampleCode":{"python":{"folder":"meraki/sdk/python","name":"Meraki Python Library","highlight":"python"}},"variables":{"organizationId":"1215707","networkId":"N_784752235069315754","serial":"QBSB-VQ3J-XZ54"}},"openapi":"3.0.1","servers":[{"url":"https://api.meraki.com/{basePath}","variables":{"basePath":{"default":"api/v1"}}}],"securitySchemes":{"meraki_api_key":{"type":"apiKey","name":"X-Cisco-Meraki-API-Key","in":"header"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}}},"spec":{"description":"Create a group policy","operationId":"createNetworkGroupPolicy","parameters":[{"name":"networkId","in":"path","description":"Network ID","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for your group policy. Required."},"scheduling":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether scheduling is enabled (true) or disabled (false). Defaults to false. If true, the schedule objects for each day of the week (monday - sunday) are parsed."},"monday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Monday."},"tuesday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Tuesday."},"wednesday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Wednesday."},"thursday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Thursday."},"friday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Friday."},"saturday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Saturday."},"sunday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Sunday."}},"description":" The schedule for the group policy. Schedules are applied to days of the week.\n"},"bandwidth":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How bandwidth limits are enforced. Can be 'network default', 'ignore' or 'custom'."},"bandwidthLimits":{"type":"object","properties":{"limitUp":{"type":"integer","description":"The maximum upload limit (integer, in Kbps). null indicates no limit"},"limitDown":{"type":"integer","description":"The maximum download limit (integer, in Kbps). null indicates no limit"}},"description":"The bandwidth limits object, specifying upload and download speed for clients bound to the group policy. These are only enforced if 'settings' is set to 'custom'."}},"description":" The bandwidth settings for clients bound to your group policy.\n"},"firewallAndTrafficShaping":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How firewall and traffic shaping rules are enforced. Can be 'network default', 'ignore' or 'custom'."},"trafficShapingRules":{"type":"array","items":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["application","applicationCategory","host","ipRange","localNet","port"],"description":"The type of definition. Can be one of 'application', 'applicationCategory', 'host', 'port', 'ipRange' or 'localNet'."},"value":{"type":"string","description":" If \"type\" is 'host', 'port', 'ipRange' or 'localNet', then \"value\" must be a string, matching either\n a hostname (e.g. \"somesite.com\"), a port (e.g. 8080), or an IP range (\"192.1.0.0\",\n \"192.1.0.0/16\", or \"10.1.0.0/16:80\"). 'localNet' also supports CIDR notation, excluding\n custom ports.\n If \"type\" is 'application' or 'applicationCategory', then \"value\" must be an object\n with the structure { \"id\": \"meraki:layer7/...\" }, where \"id\" is the application category or\n application ID (for a list of IDs for your network, use the trafficShaping/applicationCategories\n endpoint).\n"}},"required":["type","value"]},"description":" A list of objects describing the definitions of your traffic shaping rule. At least one definition is required.\n"},"perClientBandwidthLimits":{"type":"object","properties":{"settings":{"type":"string","description":"How bandwidth limits are applied by your rule. Can be one of 'network default', 'ignore' or 'custom'."},"bandwidthLimits":{"type":"object","properties":{"limitUp":{"type":"integer","description":"The maximum upload limit (integer, in Kbps)."},"limitDown":{"type":"integer","description":"The maximum download limit (integer, in Kbps)."}},"description":"The bandwidth limits object, specifying the upload ('limitUp') and download ('limitDown') speed in Kbps. These are only enforced if 'settings' is set to 'custom'."}},"description":" An object describing the bandwidth settings for your rule.\n"},"dscpTagValue":{"type":"integer","description":" The DSCP tag applied by your rule. null means 'Do not change DSCP tag'.\n For a list of possible tag values, use the trafficShaping/dscpTaggingOptions endpoint.\n"},"pcpTagValue":{"type":"integer","description":" The PCP tag applied by your rule. Can be 0 (lowest priority) through 7 (highest priority).\n null means 'Do not set PCP tag'.\n"},"priority":{"type":"string","description":" A string, indicating the priority level for packets bound to your rule.\n Can be 'low', 'normal' or 'high'.\n"}},"required":["definitions"]},"description":" An array of traffic shaping rules. Rules are applied in the order that\n they are specified in. An empty list (or null) means no rules. Note that\n you are allowed a maximum of 8 rules.\n"},"l3FirewallRules":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string","description":"Description of the rule (optional)"},"policy":{"type":"string","description":"'allow' or 'deny' traffic specified by this rule"},"protocol":{"type":"string","description":"The type of protocol (must be 'tcp', 'udp', 'icmp', 'icmp6' or 'any')"},"destPort":{"type":"string","description":"Destination port (integer in the range 1-65535), a port range (e.g. 8080-9090), or 'any'"},"destCidr":{"type":"string","description":"Destination IP address (in IP or CIDR notation), a fully-qualified domain name (FQDN, if your network supports it) or 'any'."}},"required":["policy","protocol","destCidr"]},"description":"An ordered array of the L3 firewall rules"},"l7FirewallRules":{"type":"array","items":{"type":"object","properties":{"policy":{"type":"string","enum":["deny"],"description":"The policy applied to matching traffic. Must be 'deny'."},"type":{"type":"string","enum":["application","applicationCategory","host","ipRange","port"],"description":"Type of the L7 Rule. Must be 'application', 'applicationCategory', 'host', 'port' or 'ipRange'"},"value":{"type":"string","description":"The 'value' of what you want to block. If 'type' is 'host', 'port' or 'ipRange', 'value' must be a string matching either a hostname (e.g. somewhere.com), a port (e.g. 8080), or an IP range (e.g. 192.1.0.0/16). If 'type' is 'application' or 'applicationCategory', then 'value' must be an object with an ID for the application."}}},"description":"An ordered array of L7 firewall rules"}},"description":" The firewall and traffic shaping rules and settings for your policy.\n"},"contentFiltering":{"type":"object","properties":{"allowedUrlPatterns":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL patterns are applied. Can be 'network default', 'append' or 'override'."},"patterns":{"type":"array","items":{"type":"string"},"description":"A list of URL patterns that are allowed"}},"description":"Settings for allowed URL patterns"},"blockedUrlPatterns":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL patterns are applied. Can be 'network default', 'append' or 'override'."},"patterns":{"type":"array","items":{"type":"string"},"description":"A list of URL patterns that are blocked"}},"description":"Settings for blocked URL patterns"},"blockedUrlCategories":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL categories are applied. Can be 'network default', 'append' or 'override'."},"categories":{"type":"array","items":{"type":"string"},"description":"A list of URL categories to block"}},"description":"Settings for blocked URL categories"}},"description":"The content filtering settings for your group policy"},"splashAuthSettings":{"type":"string","enum":["bypass","network default"],"description":"Whether clients bound to your policy will bypass splash authorization or behave according to the network's rules. Can be one of 'network default' or 'bypass'. Only available if your network has a wireless configuration."},"vlanTagging":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How VLAN tagging is applied. Can be 'network default', 'ignore' or 'custom'."},"vlanId":{"type":"string","description":"The ID of the vlan you want to tag. This only applies if 'settings' is set to 'custom'."}},"description":"The VLAN tagging settings for your group policy. Only available if your network has a wireless configuration."},"bonjourForwarding":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How Bonjour rules are applied. Can be 'network default', 'ignore' or 'custom'."},"rules":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"A description for your Bonjour forwarding rule. Optional."},"vlanId":{"type":"string","description":"The ID of the service VLAN. Required."},"services":{"type":"array","items":{"type":"string","enum":["AFP","AirPlay","All Services","Apple screen share","BitTorrent","Chromecast","FTP","Printers","SSH","Samba","Scanners","Spotify","iChat","iTunes"]},"description":"A list of Bonjour services. At least one service must be specified. Available services are 'All Services', 'AFP', 'AirPlay', 'Apple screen share', 'BitTorrent', 'Chromecast', 'FTP', 'iChat', 'iTunes', 'Printers', 'Samba', 'Scanners', 'Spotify' and 'SSH'"}},"required":["vlanId","services"]},"description":"A list of the Bonjour forwarding rules for your group policy. If 'settings' is set to 'custom', at least one rule must be specified."}},"description":"The Bonjour settings for your group policy. Only valid if your network has a wireless configuration."}},"example":{"name":"No video streaming","scheduling":{"enabled":true,"monday":{"active":true,"from":"9:00","to":"17:00"},"tuesday":{"active":true,"from":"9:00","to":"17:00"},"wednesday":{"active":true,"from":"9:00","to":"17:00"},"thursday":{"active":true,"from":"9:00","to":"17:00"},"friday":{"active":true,"from":"9:00","to":"17:00"},"saturday":{"active":true,"from":"9:00","to":"17:00"},"sunday":{"active":true,"from":"9:00","to":"17:00"}},"bandwidth":{"settings":"custom","bandwidthLimits":{"limitUp":1000000,"limitDown":1000000}},"firewallAndTrafficShaping":{"settings":"custom","trafficShapingRules":[{"definitions":[{"type":"host","value":"google.com"}],"perClientBandwidthLimits":{"settings":"custom","bandwidthLimits":{"limitUp":1000000,"limitDown":1000000}},"dscpTagValue":0,"pcpTagValue":0,"priority":"normal"}],"l3FirewallRules":[{"comment":"Allow TCP traffic to subnet with HTTP servers.","policy":"allow","protocol":"tcp","destPort":"443","destCidr":"192.168.1.0/24"}],"l7FirewallRules":[{"policy":"deny","type":"host","value":"google.com"}]},"contentFiltering":{"allowedUrlPatterns":{"settings":"network default","patterns":[]},"blockedUrlPatterns":{"settings":"append","patterns":["http://www.example.com","http://www.betting.com"]},"blockedUrlCategories":{"settings":"override","categories":["meraki:contentFiltering/category/1","meraki:contentFiltering/category/7"]}},"splashAuthSettings":"bypass","vlanTagging":{"settings":"custom","vlanId":"1"},"bonjourForwarding":{"settings":"custom","rules":[{"description":"A simple bonjour rule","vlanId":"1","services":["All Services"]}]}},"required":["name"]}}},"required":true},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"groupPolicyId":{"type":"string","description":"The ID of the group policy"},"scheduling":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether scheduling is enabled (true) or disabled (false). Defaults to false. If true, the schedule objects for each day of the week (monday - sunday) are parsed."},"monday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Monday."},"tuesday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Tuesday."},"wednesday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Wednesday."},"thursday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Thursday."},"friday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Friday."},"saturday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Saturday."},"sunday":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the schedule is active (true) or inactive (false) during the time specified between 'from' and 'to'. Defaults to true."},"from":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be less than the time specified in 'to'. Defaults to '00:00'. Only 30 minute increments are allowed."},"to":{"type":"string","description":"The time, from '00:00' to '24:00'. Must be greater than the time specified in 'from'. Defaults to '24:00'. Only 30 minute increments are allowed."}},"description":"The schedule object for Sunday."}},"description":" The schedule for the group policy. Schedules are applied to days of the week.\n"},"bandwidth":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How bandwidth limits are enforced. Can be 'network default', 'ignore' or 'custom'."},"bandwidthLimits":{"type":"object","properties":{"limitUp":{"type":"integer","description":"The maximum upload limit (integer, in Kbps). null indicates no limit"},"limitDown":{"type":"integer","description":"The maximum download limit (integer, in Kbps). null indicates no limit"}},"description":"The bandwidth limits object, specifying upload and download speed for clients bound to the group policy. These are only enforced if 'settings' is set to 'custom'."}},"description":" The bandwidth settings for clients bound to your group policy.\n"},"firewallAndTrafficShaping":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How firewall and traffic shaping rules are enforced. Can be 'network default', 'ignore' or 'custom'."},"trafficShapingRules":{"type":"array","items":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["application","applicationCategory","host","ipRange","localNet","port"],"description":"The type of definition. Can be one of 'application', 'applicationCategory', 'host', 'port', 'ipRange' or 'localNet'."},"value":{"type":"string","description":" If \"type\" is 'host', 'port', 'ipRange' or 'localNet', then \"value\" must be a string, matching either\n a hostname (e.g. \"somesite.com\"), a port (e.g. 8080), or an IP range (\"192.1.0.0\",\n \"192.1.0.0/16\", or \"10.1.0.0/16:80\"). 'localNet' also supports CIDR notation, excluding\n custom ports.\n If \"type\" is 'application' or 'applicationCategory', then \"value\" must be an object\n with the structure { \"id\": \"meraki:layer7/...\" }, where \"id\" is the application category or\n application ID (for a list of IDs for your network, use the trafficShaping/applicationCategories\n endpoint).\n"}},"required":["type","value"]},"description":" A list of objects describing the definitions of your traffic shaping rule. At least one definition is required.\n"},"perClientBandwidthLimits":{"type":"object","properties":{"settings":{"type":"string","description":"How bandwidth limits are applied by your rule. Can be one of 'network default', 'ignore' or 'custom'."},"bandwidthLimits":{"type":"object","properties":{"limitUp":{"type":"integer","description":"The maximum upload limit (integer, in Kbps)."},"limitDown":{"type":"integer","description":"The maximum download limit (integer, in Kbps)."}},"description":"The bandwidth limits object, specifying the upload ('limitUp') and download ('limitDown') speed in Kbps. These are only enforced if 'settings' is set to 'custom'."}},"description":" An object describing the bandwidth settings for your rule.\n"},"dscpTagValue":{"type":"integer","description":" The DSCP tag applied by your rule. null means 'Do not change DSCP tag'.\n For a list of possible tag values, use the trafficShaping/dscpTaggingOptions endpoint.\n"},"pcpTagValue":{"type":"integer","description":" The PCP tag applied by your rule. Can be 0 (lowest priority) through 7 (highest priority).\n null means 'Do not set PCP tag'.\n"},"priority":{"type":"string","description":" A string, indicating the priority level for packets bound to your rule.\n Can be 'low', 'normal' or 'high'.\n"}},"required":["definitions"]},"description":" An array of traffic shaping rules. Rules are applied in the order that\n they are specified in. An empty list (or null) means no rules. Note that\n you are allowed a maximum of 8 rules.\n"},"l3FirewallRules":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string","description":"Description of the rule (optional)"},"policy":{"type":"string","description":"'allow' or 'deny' traffic specified by this rule"},"protocol":{"type":"string","description":"The type of protocol (must be 'tcp', 'udp', 'icmp', 'icmp6' or 'any')"},"destPort":{"type":"string","description":"Destination port (integer in the range 1-65535), a port range (e.g. 8080-9090), or 'any'"},"destCidr":{"type":"string","description":"Destination IP address (in IP or CIDR notation), a fully-qualified domain name (FQDN, if your network supports it) or 'any'."}},"required":["policy","protocol","destCidr"]},"description":"An ordered array of the L3 firewall rules"},"l7FirewallRules":{"type":"array","items":{"type":"object","properties":{"policy":{"type":"string","enum":["deny"],"description":"The policy applied to matching traffic. Must be 'deny'."},"type":{"type":"string","enum":["application","applicationCategory","host","ipRange","port"],"description":"Type of the L7 Rule. Must be 'application', 'applicationCategory', 'host', 'port' or 'ipRange'"},"value":{"type":"string","description":"The 'value' of what you want to block. If 'type' is 'host', 'port' or 'ipRange', 'value' must be a string matching either a hostname (e.g. somewhere.com), a port (e.g. 8080), or an IP range (e.g. 192.1.0.0/16). If 'type' is 'application' or 'applicationCategory', then 'value' must be an object with an ID for the application."}}},"description":"An ordered array of L7 firewall rules"}},"description":" The firewall and traffic shaping rules and settings for your policy.\n"},"contentFiltering":{"type":"object","properties":{"allowedUrlPatterns":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL patterns are applied. Can be 'network default', 'append' or 'override'."},"patterns":{"type":"array","items":{"type":"string"},"description":"A list of URL patterns that are allowed"}},"description":"Settings for allowed URL patterns"},"blockedUrlPatterns":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL patterns are applied. Can be 'network default', 'append' or 'override'."},"patterns":{"type":"array","items":{"type":"string"},"description":"A list of URL patterns that are blocked"}},"description":"Settings for blocked URL patterns"},"blockedUrlCategories":{"type":"object","properties":{"settings":{"type":"string","enum":["append","network default","override"],"description":"How URL categories are applied. Can be 'network default', 'append' or 'override'."},"categories":{"type":"array","items":{"type":"string"},"description":"A list of URL categories to block"}},"description":"Settings for blocked URL categories"}},"description":"The content filtering settings for your group policy"},"splashAuthSettings":{"type":"string","enum":["bypass","network default"],"description":"Whether clients bound to your policy will bypass splash authorization or behave according to the network's rules. Can be one of 'network default' or 'bypass'. Only available if your network has a wireless configuration."},"vlanTagging":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How VLAN tagging is applied. Can be 'network default', 'ignore' or 'custom'."},"vlanId":{"type":"string","description":"The ID of the vlan you want to tag. This only applies if 'settings' is set to 'custom'."}},"description":"The VLAN tagging settings for your group policy. Only available if your network has a wireless configuration."},"bonjourForwarding":{"type":"object","properties":{"settings":{"type":"string","enum":["custom","ignore","network default"],"description":"How Bonjour rules are applied. Can be 'network default', 'ignore' or 'custom'."},"rules":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"A description for your Bonjour forwarding rule. Optional."},"vlanId":{"type":"string","description":"The ID of the service VLAN. Required."},"services":{"type":"array","items":{"type":"string","enum":["AFP","AirPlay","All Services","Apple screen share","BitTorrent","Chromecast","FTP","Printers","SSH","Samba","Scanners","Spotify","iChat","iTunes"]},"description":"A list of Bonjour services. At least one service must be specified. Available services are 'All Services', 'AFP', 'AirPlay', 'Apple screen share', 'BitTorrent', 'Chromecast', 'FTP', 'iChat', 'iTunes', 'Printers', 'Samba', 'Scanners', 'Spotify' and 'SSH'"}},"required":["vlanId","services"]},"description":"A list of the Bonjour forwarding rules for your group policy. If 'settings' is set to 'custom', at least one rule must be specified."}},"description":"The Bonjour settings for your group policy. Only valid if your network has a wireless configuration."}}},"example":{"groupPolicyId":"101","scheduling":{"enabled":true,"monday":{"active":true,"from":"9:00","to":"17:00"},"tuesday":{"active":true,"from":"9:00","to":"17:00"},"wednesday":{"active":true,"from":"9:00","to":"17:00"},"thursday":{"active":true,"from":"9:00","to":"17:00"},"friday":{"active":true,"from":"9:00","to":"17:00"},"saturday":{"active":true,"from":"9:00","to":"17:00"},"sunday":{"active":true,"from":"9:00","to":"17:00"}},"bandwidth":{"settings":"custom","bandwidthLimits":{"limitUp":1000000,"limitDown":1000000}},"firewallAndTrafficShaping":{"settings":"custom","trafficShapingRules":[{"definitions":[{"type":"host","value":"google.com"}],"perClientBandwidthLimits":{"settings":"custom","bandwidthLimits":{"limitUp":1000000,"limitDown":1000000}},"dscpTagValue":0,"pcpTagValue":0,"priority":"normal"}],"l3FirewallRules":[{"comment":"Allow TCP traffic to subnet with HTTP servers.","policy":"allow","protocol":"tcp","destPort":"443","destCidr":"192.168.1.0/24"}],"l7FirewallRules":[{"policy":"deny","type":"host","value":"google.com"}]},"contentFiltering":{"allowedUrlPatterns":{"settings":"network default","patterns":[]},"blockedUrlPatterns":{"settings":"append","patterns":["http://www.example.com","http://www.betting.com"]},"blockedUrlCategories":{"settings":"override","categories":["meraki:contentFiltering/category/1","meraki:contentFiltering/category/7"]}},"splashAuthSettings":"bypass","vlanTagging":{"settings":"custom","vlanId":"1"},"bonjourForwarding":{"settings":"custom","rules":[{"description":"A simple bonjour rule","vlanId":"1","services":["All Services"]}]}}}}}},"summary":"Create a group policy","tags":["networks","configure","groupPolicies"],"__originalOperationId":"createNetworkGroupPolicy","security":[{"meraki_api_key":[]},{"bearerAuth":[]}],"method":"post","path":"/networks/{networkId}/groupPolicies","sampleCode":{"Meraki Python Library":{"code":"import meraki\n\n# Defining your API key as a variable in source code is discouraged.\n# This API key is for a read-only docs-specific environment.\n# In your own code, use an environment variable as shown under the Usage section\n# @ https://github.com/meraki/dashboard-api-python/\n\nAPI_KEY = '75dd5334bef4d2bc96f26138c163c0a3fa0b5ca6'\n\ndashboard = meraki.DashboardAPI(API_KEY)\n\nnetwork_id = 'L_646829496481105433'\nname = 'No video streaming'\n\nresponse = dashboard.networks.createNetworkGroupPolicy(\n network_id, name, \n scheduling={'enabled': True, 'monday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'tuesday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'wednesday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'thursday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'friday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'saturday': {'active': True, 'from': '9:00', 'to': '17:00'}, 'sunday': {'active': True, 'from': '9:00', 'to': '17:00'}}, \n bandwidth={'settings': 'custom', 'bandwidthLimits': {'limitUp': 1000000, 'limitDown': 1000000}}, \n firewallAndTrafficShaping={'settings': 'custom', 'trafficShapingRules': [{'definitions': [{'type': 'host', 'value': 'google.com'}], 'perClientBandwidthLimits': {'settings': 'custom', 'bandwidthLimits': {'limitUp': 1000000, 'limitDown': 1000000}}, 'dscpTagValue': 0, 'pcpTagValue': 0, 'priority': 'normal'}], 'l3FirewallRules': [{'comment': 'Allow TCP traffic to subnet with HTTP servers.', 'policy': 'allow', 'protocol': 'tcp', 'destPort': '443', 'destCidr': '192.168.1.0/24'}], 'l7FirewallRules': [{'policy': 'deny', 'type': 'host', 'value': 'google.com'}]}, \n contentFiltering={'allowedUrlPatterns': {'settings': 'network default', 'patterns': []}, 'blockedUrlPatterns': {'settings': 'append', 'patterns': ['http://www.example.com', 'http://www.betting.com']}, 'blockedUrlCategories': {'settings': 'override', 'categories': ['meraki:contentFiltering/category/1', 'meraki:contentFiltering/category/7']}}, \n splashAuthSettings='bypass', \n vlanTagging={'settings': 'custom', 'vlanId': '1'}, \n bonjourForwarding={'settings': 'custom', 'rules': [{'description': 'A simple bonjour rule', 'vlanId': '1', 'services': ['All Services']}]}\n)\n\nprint(response)","highlight":"python"}}}}