<?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 Re: How to get Last seen and switch nickname through API (GraphQL) in ExtremeCloud IQ- Site Engine Management Center</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121457#M12915</link>
    <description>&lt;P&gt;The 'Switch Nickname' is not part of the accessControl table so it can not be included in the response to the query.&lt;/P&gt;&lt;P&gt;There is a way however. You will need to do a network query using the switchIP from your first query.&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;network {&lt;BR /&gt;device(ip: "' + sw_ip + '") {&lt;BR /&gt;nickName&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2026 13:40:37 GMT</pubDate>
    <dc:creator>MEChilds</dc:creator>
    <dc:date>2026-04-09T13:40:37Z</dc:date>
    <item>
      <title>How to get Last seen and switch nickname through API (GraphQL)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121436#M12913</link>
      <description>&lt;P&gt;For Site Engine, I'm trying to create a query in GraphQL where I can enter the MAC address of an end-system and get the last time it was on the network, and what switch (wireless access point) it was connected to at that time.&amp;nbsp; Basically, trying to locate where it was when it dropped off the network.&lt;/P&gt;&lt;P&gt;I can successfully query 'lastSeenTime' but I need it to also return the result for the 'Switch Nickname' column within Control-&amp;gt;End-Systems for that MAC address - the switch nickname is the hostname of the wireless access point.&amp;nbsp; I don't see any variables for 'Switch Nickname' even though there is a column for it in the same table as the 'Last seen Time'&lt;/P&gt;&lt;P&gt;'locationInfo' only provides a MAC address of the BSSID the pulled from the 'AP MAC' column of the same table - it's not the switch/wireless AP interface&lt;/P&gt;&lt;P&gt;Here is my current GraphQL query:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;accessControl {&lt;BR /&gt;endSystemByMac(macAddress: "58:6D:67:97:3A:XX") {&lt;BR /&gt;endSystem {&lt;BR /&gt;lastSeenTime&lt;BR /&gt;switchIP&lt;BR /&gt;locationInfo&lt;BR /&gt;ipAddress&lt;BR /&gt;operatingSystemName&lt;BR /&gt;state&lt;BR /&gt;extendedState&lt;BR /&gt;nacApplianceGroupName&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Has anyone done this successfully, and if so, how?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2026 04:24:12 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121436#M12913</guid>
      <dc:creator>brs21</dc:creator>
      <dc:date>2026-04-06T04:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Last seen and switch nickname through API (GraphQL)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121457#M12915</link>
      <description>&lt;P&gt;The 'Switch Nickname' is not part of the accessControl table so it can not be included in the response to the query.&lt;/P&gt;&lt;P&gt;There is a way however. You will need to do a network query using the switchIP from your first query.&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;network {&lt;BR /&gt;device(ip: "' + sw_ip + '") {&lt;BR /&gt;nickName&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2026 13:40:37 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121457#M12915</guid>
      <dc:creator>MEChilds</dc:creator>
      <dc:date>2026-04-09T13:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Last seen and switch nickname through API (GraphQL)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121535#M12918</link>
      <description>&lt;P&gt;How would I make it a nested query?&amp;nbsp; A lot of what I've read on GraphQL shows for the way SiteEngine handles schema you can't nest queries into a single query.&amp;nbsp; Or at least I can't combine the query you typed into the query in my post.&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 19:30:25 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121535#M12918</guid>
      <dc:creator>brs21</dc:creator>
      <dc:date>2026-04-14T19:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Last seen and switch nickname through API (GraphQL)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121546#M12920</link>
      <description>&lt;P&gt;I've only ever done this as a script. Here is a sample of a python script that I have for something similar:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;query = '{ accessControl {endSystemByMac(macAddress: "' + mac + '") {endSystem{switchIP,reason}}}}'
        
        response = emc_nbi.query(query)
        if response and 'accessControl' in response and response['accessControl']['endSystemByMac']['endSystem']:
            data = response['accessControl']['endSystemByMac']['endSystem']

            sw_ip = data['switchIP']
            reason = data['reason']

            if sw_ip:
               
                # Use the switchIP to pull the name of the AP the device is connected to.
                queryD = '{ network {device(ip: "' + sw_ip + '") {nickName}}}'
                responseD = emc_nbi.query(queryD)
                dataD = responseD['network']['device']
                apName = dataD['nickName']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 13:20:54 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/how-to-get-last-seen-and-switch-nickname-through-api-graphql/m-p/121546#M12920</guid>
      <dc:creator>MEChilds</dc:creator>
      <dc:date>2026-04-16T13:20:54Z</dc:date>
    </item>
  </channel>
</rss>

