Skip to main content
Solved

Retrieving MobileDevices based on Site

  • September 15, 2015
  • 1 reply
  • 7 views

Forum|alt.badge.img+4

Is it possible to retrieve a list of devices based on a Site?
When retrieving a list of all devices, no site or anything related to a device's building/site is being exposed through the api. See the XMl below:

<mobile_devices>
  <size>2</size>
  <mobile_device>
    <id>6</id>
    <name>iPad</name>
    <device_name>iPad</device_name>
    <udid>dd1dff5d598e3fce####16288f0b9bf1551d0eb2</udid>
    <serial_number>DMPPQ7BZ##VJ</serial_number>
    <phone_number/>
    <wifi_mac_address>9C:35:##:53:##:84</wifi_mac_address>
    <managed>true</managed>
    <supervised>true</supervised>
    <model>iPad Air 2 (Wi-Fi)</model>
    <model_identifier>iPad5,3</model_identifier>
    <modelDisplay deprecated="9.4">iPad Air 2 (Wi-Fi)</modelDisplay>
    <model_display>iPad Air 2 (Wi-Fi)</model_display>
    <username/>
  </mobile_device>
  <mobile_device>
    <id>5</id>
    <name>Alexander’s iPad</name>
    <device_name>Alexander’s iPad</device_name>
    <udid>fc7f1d1fe8484####86c2a8ec07b7ce30a6f98ac</udid>
    <serial_number>DMP###NKDFHW</serial_number>
    <phone_number/>
    <wifi_mac_address>FC:##:3F:##:18:2C</wifi_mac_address>
    <managed>true</managed>
    <supervised>false</supervised>
    <model>iPad 2 (Wi-Fi)</model>
    <model_identifier>iPad2,1</model_identifier>
    <modelDisplay deprecated="9.4">iPad 2 (Wi-Fi)</modelDisplay>
    <model_display>iPad 2 (Wi-Fi)</model_display>
    <username/>
  </mobile_device>
</mobile_devices>

Since we are working with educational customers, this is essential to us.
The only way to retrieve a device's site is through reading that specific device.
That would result in the fact that we have to read every device through the Api in order to distinguish what device belongs to which site?

Best answer by brandonusher

Have you tried making a Smart group and pulling the results from that via the API? I don't have multiple sites setup in our JSS so I can't test this, but I imagine that in the criteria is an option to filter by site.

1 reply

Forum|alt.badge.img+12
  • Contributor
  • Answer
  • September 15, 2015

Have you tried making a Smart group and pulling the results from that via the API? I don't have multiple sites setup in our JSS so I can't test this, but I imagine that in the criteria is an option to filter by site.