cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API PUT blockedUrlCategories won't update. Comes back with not valid

SOLVED
Highlighted
Here to help

API PUT blockedUrlCategories won't update. Comes back with not valid

Trying to update blockedURLCategories I followed the example at the website and I get back blockedURLCategories is not valid. this is using the put request.

If i do a get, works find.

 

{
"allowedUrlPatterns": [
"http://www.example.org",
"http://help.com.au"
],
"blockedUrlPatterns": [
"http://www.example.com",
"http://www.betting.com"
],
"blockedUrlCategories": [
{
"id": "meraki:contentFiltering/category/1",
"name":"Real Estate"
},
{
"id":"meraki:contentFiltering/category/7",
"name":"Shopping"
}
],
"urlCategoryListSize": "topSites"
}

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Building a reputation

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

I had this problem too, and once I removed the category names, it worked fine. I suspect they did it this way so that you could not possibly change a category name associated with a particular ID. Some documentation about this would have been nice.

View solution in original post

7 REPLIES 7
Highlighted
Kind of a big deal

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

I have the same behavior. Feels like a bug.

 

If you take away the contents of blockedUrlCategories it works:

{
	"allowedUrlPatterns": [
		"http://www.example.org",
		"http://help.com.au"
	],
	"blockedUrlPatterns": [
		"http://www.example.com",
		"http://www.betting.com"
	],
	"blockedUrlCategories": [],
	"urlCategoryListSize": "topSites"
}
Highlighted
Conversationalist

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

I have the same issue - we need to have these category APIs fixed so we don't have to go through hundreds of sites to block specific categories.  Also, this applies to blocked countries as well - the support answer of "make a wish" doesn't really seem reasonable here.

 

Highlighted
Getting noticed

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

Hello All,

 

Just been testing this and is working ok Json is in the following format no name details and a list of all the categories you require.

 

"blockedUrlCategories": [

"meraki:contentFiltering/category/11",
"meraki:contentFiltering/category/18",
"meraki:contentFiltering/category/25",
"meraki:contentFiltering/category/27",
"meraki:contentFiltering/category/33",
"meraki:contentFiltering/category/34",
"meraki:contentFiltering/category/46",
"meraki:contentFiltering/category/48",
"meraki:contentFiltering/category/49",
"meraki:contentFiltering/category/53",
"meraki:contentFiltering/category/54",
"meraki:contentFiltering/category/56",
"meraki:contentFiltering/category/57",
"meraki:contentFiltering/category/59",
"meraki:contentFiltering/category/62",
"meraki:contentFiltering/category/64",
"meraki:contentFiltering/category/67",
"meraki:contentFiltering/category/70"

]

 

hope it helps

Highlighted
Building a reputation

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

I had this problem too, and once I removed the category names, it worked fine. I suspect they did it this way so that you could not possibly change a category name associated with a particular ID. Some documentation about this would have been nice.

View solution in original post

Highlighted
New here

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

Still not working for me. All the below iterations gives me "Bad request: There was a problem in the JSON you submitted"

 

"blockedUrlCategories": [
{
"id": "meraki:contentFiltering/category/11",
}
],

 

and

 

"blockedUrlCategories": [
{
"meraki:contentFiltering/category/11",
}
],

 

and

 

"blockedUrlCategories": [
{
"id": "meraki:contentFiltering/category/11",
}
],

 

and

 

"blockedUrlCategories": [
"meraki:contentFiltering/category/11",
],

 

Only one that works is to omit the category to blank:

 

"blockedUrlCategories": [],

 

Can someone print their entire json so that i can copy and paste into mine?

 

 

Highlighted
Getting noticed

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

If you are using 1 category there should be no comma "," at the end of the line then denotes more to action.

 

"blockedUrlCategories": [

"meraki:contentFiltering/category/11"

]

Highlighted
New here

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

I'll just put on my dunce cap and sit in this corner over here. Thanks for the speedy reply.

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.