I'm struggling to find an API call that will return the Switch IP and Switch Port fields for the endpoint. The required data is shown on the endpoint in this view on the portal:
GET /api/endpoint/mac-address/BC-A9-93-08-DB-64 finds the device as expected:
{
"id": 7062,
"mac_address": "bca99308db64",
"description": "AP0141",
"status": "Known",
"randomized_mac": false,
"attributes": {
"EKC-VLAN-ID": "",
"EKC-Device-Type": "AP"
},
"added_at": "Aug 06, 2024 13:34:34 BST",
"updated_at": "Feb 20, 2025 10:43:51 GMT",
"_links": {
"self": {
"href": "https://10.3.3.102/api/endpoint/7062"
}
}
}
But then when I try and filter on the session to find the switch it's connected to with a filter on the mac_address e.g.
GET /api/session?calculate_count=false&offset=0&limit=25&sort=-id&filter={"mac_address":"BC-A9-93-08-DB-64"}
The JSON Response is an empty item array?
{
"_links": {
"self": {
"href": "https://10.3.3.102/api/session?calculate_count=false&offset=0&limit=25&sort=-id&filter=%7B%22mac_address%22%3A%22BC-A9-93-08-DB-64%22%7D"
},
"first": {
"href": "https://10.3.3.102/api/session?calculate_count=false&offset=0&limit=25&sort=-id&filter=%7B%22mac_address%22%3A%22BC-A9-93-08-DB-64%22%7D"
}
},
"_embedded": {
"items": []
}
}
There doesn't seem to be an endpoint I can see in the API docs that would allow me to simply GET the data using the mac_address, id, callingstationid directly, which is why I am calling /session
Is this possible, I simply want to get the Switch IP and Switch Port as shown in the screenshot. Thank you.