<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic API - Block a device from an SSID in Wireless</title>
    <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498724#M300972</link>
    <description>&lt;P&gt;I need help with blocking a device from a specific SSID using API.&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;BR /&gt;There is an option to do so in the Meraki UI by selecting the client:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DevPolicy.PNG" style="width: 439px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/268767iD6F08EB0AC9D0E99/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It does the work just fine. I am looking to find a way to &lt;U&gt;do the same using an API request.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;checking client policy by&lt;/P&gt;&lt;PRE&gt;/networks/[networkId]/clients/[client_mac]/policy&lt;/PRE&gt;&lt;P&gt;Before changing:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "mac": "__MAC___",&lt;/P&gt;&lt;P&gt;    "type": "Normal"&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;After changing&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "mac": "__MAC___",&lt;/P&gt;&lt;P&gt;    "type": "Different policies by SSID",&lt;/P&gt;&lt;P&gt;    "ssids": {&lt;/P&gt;&lt;P&gt;        "0": {&lt;/P&gt;&lt;P&gt;            "type": "Normal",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name0"&lt;/P&gt;&lt;P&gt;        },&lt;/P&gt;&lt;P&gt;        "1": {&lt;/P&gt;&lt;P&gt;            "type": "Normal",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name1"&lt;/P&gt;&lt;P&gt;        },&lt;/P&gt;&lt;P&gt;        "3": {&lt;/P&gt;&lt;P&gt;            "type": "Blocked",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name3"&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;I know I can send a request with device policy being whitelisted/blocked/normal/group, but I aim for "Different policies by SSID" or any other way to achieve it, if anyone knows.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Sun, 17 Feb 2019 16:53:59 GMT</pubDate>
    <dc:creator>CiscoUser14</dc:creator>
    <dc:date>2019-02-17T16:53:59Z</dc:date>
    <item>
      <title>API - Block a device from an SSID</title>
      <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498724#M300972</link>
      <description>&lt;P&gt;I need help with blocking a device from a specific SSID using API.&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;BR /&gt;There is an option to do so in the Meraki UI by selecting the client:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DevPolicy.PNG" style="width: 439px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/268767iD6F08EB0AC9D0E99/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It does the work just fine. I am looking to find a way to &lt;U&gt;do the same using an API request.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;checking client policy by&lt;/P&gt;&lt;PRE&gt;/networks/[networkId]/clients/[client_mac]/policy&lt;/PRE&gt;&lt;P&gt;Before changing:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "mac": "__MAC___",&lt;/P&gt;&lt;P&gt;    "type": "Normal"&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;After changing&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "mac": "__MAC___",&lt;/P&gt;&lt;P&gt;    "type": "Different policies by SSID",&lt;/P&gt;&lt;P&gt;    "ssids": {&lt;/P&gt;&lt;P&gt;        "0": {&lt;/P&gt;&lt;P&gt;            "type": "Normal",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name0"&lt;/P&gt;&lt;P&gt;        },&lt;/P&gt;&lt;P&gt;        "1": {&lt;/P&gt;&lt;P&gt;            "type": "Normal",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name1"&lt;/P&gt;&lt;P&gt;        },&lt;/P&gt;&lt;P&gt;        "3": {&lt;/P&gt;&lt;P&gt;            "type": "Blocked",&lt;/P&gt;&lt;P&gt;            "name": "SSID_Name3"&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;I know I can send a request with device policy being whitelisted/blocked/normal/group, but I aim for "Different policies by SSID" or any other way to achieve it, if anyone knows.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2019 16:53:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498724#M300972</guid>
      <dc:creator>CiscoUser14</dc:creator>
      <dc:date>2019-02-17T16:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: API - Block a device from an SSID</title>
      <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498725#M300973</link>
      <description>&lt;P&gt;The API does not appear to support setting different group policies for a client by SSID.  I'm not aware of any workaround.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2019 17:22:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498725#M300973</guid>
      <dc:creator>hody.crouch</dc:creator>
      <dc:date>2019-02-17T17:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: API - Block a device from an SSID</title>
      <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498726#M300974</link>
      <description>&lt;P&gt;Thanks for trying to help, found the way.&lt;BR /&gt;&lt;BR /&gt;PUT request to&lt;BR /&gt;api.meraki.com/api/v0/networks/{{NetworkId}}/clients/{{ClientMac}}/policy?timespan=86400&amp;amp;devicePolicy=&lt;STRONG&gt;Different policies by SSID&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;with the body&lt;/P&gt;&lt;P&gt;blocked_msg=&amp;amp;access=custom&amp;amp;custom_policy%5B&lt;SPAN&gt;0&lt;/SPAN&gt;%5D=&lt;STRONG&gt;-1&lt;/STRONG&gt;&amp;amp;custom_policy%5B&lt;SPAN&gt;1&lt;/SPAN&gt;%5D=&lt;STRONG&gt;-1&lt;/STRONG&gt;&amp;amp;custom_policy%5B&lt;SPAN&gt;3&lt;/SPAN&gt;%5D=&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;amp;ids%5B%5D=DEVICE_ID&lt;/P&gt;&lt;P&gt;(when parsed it looks like this:)&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parsed.png" style="width: 267px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/268770i4A336F18720547BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Will get the result of the client having 'Normal' policy towards ssids with ID 0 and 1&lt;BR /&gt;'Blocked' for ssid with ID 3 &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 09:57:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498726#M300974</guid>
      <dc:creator>CiscoUser14</dc:creator>
      <dc:date>2019-02-26T09:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: API - Block a device from an SSID</title>
      <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498727#M300975</link>
      <description>&lt;P&gt;Would love to use this myself! I'm not following the url you're using for the request. As far as I know you can't put spaces in the url, so how were you able to accomplish adding "devicePolicy=Different policies by SSID" to the end of the put request?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 20:23:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498727#M300975</guid>
      <dc:creator>kris.monier</dc:creator>
      <dc:date>2019-12-06T20:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: API - Block a device from an SSID</title>
      <link>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498728#M300976</link>
      <description>&lt;P&gt;I tried &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/14807"&gt;@CiscoUser14&lt;/A&gt; 's solution and could not make it work.&lt;/P&gt;&lt;P&gt;However, I managed to find the documentation of that functionality under the following API:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api/#!provision-network-clients" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api/#!provision-network-clients&lt;/A&gt;&lt;/P&gt;&lt;P&gt;under schema definition.&lt;/P&gt;&lt;P&gt;You should set Per connection policy and list the SSIDs you would like to change the device's policy for them&lt;/P&gt;&lt;P&gt;Here is an example for a request's body that would block device for specific SSIDs:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;   "mac"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"aa:aa:aa:aa:aa:aa"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    "devicePolicy"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Per connection"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    "timespan"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;2592000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    "policiesBySsid"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;       "9"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;         "devicePolicy"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Blocked"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;       }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Sending this body in a post request to &lt;SPAN&gt;/networks/&lt;/SPAN&gt;&lt;STRONG&gt;{networkId}&lt;/STRONG&gt;&lt;SPAN&gt;/clients/provision will block any device with MAC aa:aa:aa:aa:aa:aa from connecting to SSID on index 9(you can get that using GET /networks/&lt;STRONG&gt;{networkId}&lt;/STRONG&gt;/ssids)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 16:25:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/api-block-a-device-from-an-ssid/m-p/5498728#M300976</guid>
      <dc:creator>Gal_Tfilin</dc:creator>
      <dc:date>2021-11-08T16:25:12Z</dc:date>
    </item>
  </channel>
</rss>

