Skip to content

Commit befd6aa

Browse files
author
Shiyue Cheng
committed
Added getclient function
GDPR PII endpiont for client information
1 parent 23513aa commit befd6aa

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

meraki.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,23 @@ def getclients(apikey, serialnum, timestamp=86400, suppressprint=False):
12981298
return result
12991299

13001300

1301+
# Return the client associated with the given identifier. This endpoint will lookup by client ID or either the MAC or IP depending on whether the network uses Track-by-IP.
1302+
# https://api.meraki.com/api_doc#return-the-client-associated-with-the-given-identifier
1303+
def getclient(apikey, networkid, identifier, suppressprint=False):
1304+
calltype = 'Device Clients'
1305+
geturl = '{0}/networks/{1}/clients/{2}'.format(str(base_url), str(networkid), str(identifier))
1306+
headers = {
1307+
'x-cisco-meraki-api-key': format(str(apikey)),
1308+
'Content-Type': 'application/json'
1309+
}
1310+
dashboard = requests.get(geturl, headers=headers)
1311+
#
1312+
# Call return handler function to parse Dashboard response
1313+
#
1314+
result = __returnhandler(dashboard.status_code, dashboard.text, calltype, suppressprint)
1315+
return result
1316+
1317+
13011318
# Return the policy assigned to a client on the network.
13021319
# https://api.meraki.com/api_docs#return-the-policy-assigned-to-a-client-on-the-network
13031320
def getclientpolicy(apikey, networkid, clientmac, timestamp=86400, suppressprint=False):

0 commit comments

Comments
 (0)