You can set the group policy of a client by using this call: https://dashboard.meraki.com/api_docs#update-the-policy-assigned-to-a-client-on-the-network You will need to pass the groupPolicyId of the policy you want to activate as JSON body. Postman proposes this as Python 3 code to do it: import http.client
conn = http.client.HTTPConnection("api,meraki,com")
payload = "{\n \"groupPolicyId\": 102\n}"
headers = {
'X-Cisco-Meraki-API-Key': {{apiKey}},
'Content-Type': "application/json"
}
conn.request("PUT", "api,v0,networks,{{networkId}},clients,{{clientMac}},policy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8")) The example above assumes you want to activate a Group Policy with ID 102. Substitute {{apiKey}}, {{networkId}} and {{clientMac}} for actual values in your organization. Even better, you could use the Meraki Python module to do it: https://github.com/meraki/dashboard-api-python The correct call in the module is: meraki.updateclientpolicy(apikey, networkid, clientmac, policy, policyid=None, suppressprint=False) You can find the groupPolicyId of your policy by listing the Group Policies available in your Network: https://dashboard.meraki.com/api_docs#list-the-group-policies-in-a-network Hope this helps.
... View more