cancel
Showing results for 
Search instead for 
Did you mean: 

XMC API Graphql directed query

XMC API Graphql directed query

Johnny69
New Contributor II

Hi, I have the following query, for which i would like to retrieve all the information below for a specific site-id. The whole graphql query structure is a bit confusing. Where in this query would i specify the siteId:424 to return information only for this specific site?

query {
  network {
    devices {
     ip
     sysName
      deviceData{
        vendor
        serialNumber
        family
        subFamily
        status
      }
      siteData{
        siteName
      }
    }
  }
}

 

2 REPLIES 2

Markus_Nikulski
Extreme Employee

you can use siteId, but is not much use behind, because is the DB table reference. Is better to use the SitePath. This gives you the unique pass where the device is located.

you can call in example
{
network {
devices {
ip
sysName
sitePath
status
deviceData {
vendor
serialNumber
family
subFamily
}
}
}
}

you get the site path and you can look for all the devices in this site only.
{
network {
devicesBySiteLocation(location: "/World/Local") {
ip
sysName
deviceDisplayFamily
}
}
}

I Noticed that some of the newer devices only returns 'Extreme' when queried for deviceDisplayType, while all the older switches return their model name. Is there any other field i should query to get the model for these newer switches? 

GTM-P2G8KFN