Last week this worked... UpdateGroupPolicies with ContentFiltering

DaveRey
Here to help

Last week this worked... UpdateGroupPolicies with ContentFiltering

Last week I was able to update a group policy content filtering rule.  Either I have forgotten something over the weekend, or something changed?  This is the json I'm trying to get to work.

{"groupPolicyId":101,
"name":"test101",
"contentFiltering":{
	"allowedUrlPatterns":{"settings":"override","patterns":["whynot.com","shouldwork.org"]},
	"blockedUrlPatterns":{"settings":"override","patterns":["frustrated.com","meraki.net"]}
},
"blockedUrlCategories":
	{"settings":"override",
		"categories":["meraki:contentFiltering/category/11",
			"meraki:contentFiltering/category/64",
			"meraki:contentFiltering/category/56",
			"meraki:contentFiltering/category/62",
			"meraki:contentFiltering/category/59"]
	}
}
9 REPLIES 9
SoCalRacer
Kind of a big deal

Have you run a query to get the policy info? This way to verify the name and id are still the same and that it exists.

Thanks, yes, I'm able to get and change the name of the GP, so my get and put are correct.

 

About 2 weeks ago, when I GOT my GP, it showed the content filtering allowed sites.

 

Now when I do the same GET it does not show those settings at all.  😞

 

 

SoCalRacer
Kind of a big deal

Possibly it is code before the json is delivered, but doubtful. Interesting the API doesn't show those parameters on Group Policies, but instead under Content Filtering. Also there were no changes in the change log to group policies.

 

https://dashboard.meraki.com/api_docs#group-policies

 

https://api.meraki.com/api_docs#content-filtering-categories

 

https://developer.cisco.com/meraki/whats-new/#!2019/may-2019

jdsilva
Kind of a big deal

You're hitting this endpoint?

 

/networks/{networkId}/groupPolicies/{groupPolicyId}

 

It looks like there's been a pile of changes over the last week, but I don't see anything that says content filtering was removed. However, it's  not show in the docs anymore.

 

https://api.meraki.com/api_docs#update-a-group-policy

 

Yes, I was able to apply content filtering settings to a numbered group policy.

 

*I never said it was documented. 😉   I just have a strong need for that, and it worked when I tried it.  I only tried it because when I did a GET on the group policies they DID include content filtering.  Now they don't.

 

This is what I got 2 weeks ago when I did the GET on /groupPolicies/100

{"groupPolicyId":100,
"name":"Trust",
"scheduling":
{"enabled":false,
"monday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"tuesday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"wednesday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"thursday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"friday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"saturday":
{"active":true,
"from":"00:00",
"to":"24:00"},
"sunday":
{"active":true,
"from":"00:00",
"to":"24:00"}},
"bandwidth":
{"settings":"network default",
"bandwidthLimits":
{"limitUp":null,
"limitDown":null}},
"firewallAndTrafficShaping":
{"settings":"network default",
"trafficShapingRules":[],
"l3FirewallRules":[],
"l7FirewallRules":[]},
"contentFiltering":
{"allowedUrlPatterns":
{"settings":"override",
"patterns":["statflow.com",
"google.com"'
"yellowpages.ca",
"411.ca"]},
"blockedUrlPatterns":
{"settings":"override",
"patterns":[".ca",
".com",
".pw"]},
"blockedUrlCategories":
{"settings":"override",
"categories":["meraki:contentFiltering/category/11",
"meraki:contentFiltering/category/64",
"meraki:contentFiltering/category/56",
"meraki:contentFiltering/category/62",
"meraki:contentFiltering/category/25"]}}}

 

 

jdsilva
Kind of a big deal

Ahh, gotcha. 

 

Unfortunately, if it was there before, and not now, then I think you're answering your own question 😞

 

 

 

 

Yeah, I guess so.  It's too bad, it saved me a lot of clicks last time I had to up date all my GP's.

jdsilva
Kind of a big deal

Awesome!  "Just keep swimming, just keep swimming.."  🙂

Get notified when there are additional replies to this discussion.