Content filtering

Solved
RaresPauna
Getting noticed

Content filtering

Hello guys, i am trying to update the content filtering rules for all networks within a organization but i get this error 

RaresPauna_0-1677748291624.png

With a GET i took from a template the configuration for content filtering which i considered to be complete.

    blockedUrlCategories=[
            'meraki:contentFiltering/category/6',

           'meraki:contentFiltering/category/10',

         'meraki:contentFiltering/category/11',

          'meraki:contentFiltering/category/13',

       'meraki:contentFiltering/category/18',

            'meraki:contentFiltering/category/27',

           'meraki:contentFiltering/category/31',

           'meraki:contentFiltering/category/32',

            'meraki:contentFiltering/category/33',

           'meraki:contentFiltering/category/36',
           
            'meraki:contentFiltering/category/37',

            '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/58',
 
           'meraki:contentFiltering/category/59','meraki:contentFiltering/category/62','meraki:contentFiltering/category/64','meraki:contentFiltering/category/67','meraki:contentFiltering/category/68', 'meraki:contentFiltering/category/70','meraki:contentFiltering/category/71', 'meraki:contentFiltering/category/72','meraki:contentFiltering/category/73','meraki:contentFiltering/category/76'
         
    ],
    urlCategoryListSize='fullList'
 
 
 
 
The same error i also get in postman
1 Accepted Solution
RaresPauna
Getting noticed

After investigating i found that some categories disappeared, and the new syntax is 'meraki:contentFiltering/category/C1', there needs to be added " C " before the number. The name of the category is not needed in the POST, you only see it in the GET. So the solution is using " C". 

View solution in original post

3 Replies 3
RaresPauna
Getting noticed

I even tried with the example given on the developer hub : 

 dashboard.appliance.updateNetworkApplianceContentFiltering(
    network_id,
    allowedUrlPatterns=['http://www.example.org', 'http://help.com.au'],
    blockedUrlPatterns=['http://www.example.com', 'http://www.betting.com'],
    blockedUrlCategories=['meraki:contentFiltering/category/1', 'meraki:contentFiltering/category/7'],
    urlCategoryListSize='topSites'
) , but i get the same error
RaphaelL
Kind of a big deal
Kind of a big deal

Have you tried to configure a simple content filtering policy on the dashboard , then retreived the rule via a GET ?https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-content-filtering

 

Looking at the documentation , it seems that the output for categories is different from what you are using. It 'should' include the category name.

 

https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-content-filtering-categories

RaresPauna
Getting noticed

After investigating i found that some categories disappeared, and the new syntax is 'meraki:contentFiltering/category/C1', there needs to be added " C " before the number. The name of the category is not needed in the POST, you only see it in the GET. So the solution is using " C". 

Get notified when there are additional replies to this discussion.