update/info cros query:id:[serialNumber] no longer works

1,147 views
Skip to first unread message

Ryan Adams

unread,
Nov 1, 2016, 4:33:02 PM11/1/16
to GAM for G Suite
Using the command "gam update cros query:id:[serialNumber] has been a godsend, but for the past 2 months, this has stopped working for me. Every time I try to use this (whether doing it in bulk with ~~, or as a one-off without ~~), the following message is returned every time:

ERROR: 404: Resource Not Found: query:id:[any serial i try] - notFound

Initially, I thought this was due to the chrome device itself not being enrolled in the domain, but if I run gam info cros [device ID of the serial i've tried], it returns with all of the device's information.

Am i missing something?
Did the command/arguments change?

Any help would be greatly appreciated.

Jay Lee

unread,
Nov 1, 2016, 4:39:54 PM11/1/16
to GAM for G Suite
Just tested this with 3.8 and it's working as expected. Can you update to 3.8 and confirm the issue still exists?

The error indicates GAM is sending "query:id:<sn>" as the deviceId to update when instead it should be first doing a lookup of id:<sn> to determine the correct deviceID and then using that deviceId for the update.

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4342634d-4a21-497a-af8f-f9cd183df2e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jay

Ross Scroggs

unread,
Nov 1, 2016, 4:49:23 PM11/1/16
to google-ap...@googlegroups.com
Ryan,

What version do you have?

Ross

On Tue, Nov 1, 2016 at 1:39 PM, Jay Lee <jay...@gmail.com> wrote:
Just tested this with 3.8 and it's working as expected. Can you update to 3.8 and confirm the issue still exists?

The error indicates GAM is sending "query:id:<sn>" as the deviceId to update when instead it should be first doing a lookup of id:<sn> to determine the correct deviceID and then using that deviceId for the update.

Jay
On Tue, Nov 1, 2016 at 4:33 PM Ryan Adams <all...@gmail.com> wrote:
Using the command "gam update cros query:id:[serialNumber] has been a godsend, but for the past 2 months, this has stopped working for me. Every time I try to use this (whether doing it in bulk with ~~, or as a one-off without ~~), the following message is returned every time:

ERROR: 404: Resource Not Found: query:id:[any serial i try] - notFound

Initially, I thought this was due to the chrome device itself not being enrolled in the domain, but if I run gam info cros [device ID of the serial i've tried], it returns with all of the device's information.

Am i missing something?
Did the command/arguments change?

Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
--

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ryan Adams

unread,
Nov 4, 2016, 9:09:02 AM11/4/16
to GAM for G Suite
Hi Jay,

Before posting here, I had already upgraded to 3.8 to no avail; sorry for not stating that in my OP. I even tried to downgrade as far back as 3.65 to see if that would work - no dice there either. I see there's a new version, 4.01. I will try to use 3.8 again and let you know. I see 4.01 is out for pre-release, do you think I should try that out? 

For now, I've figured out a workaround in which I use chromebookInventory Google Sheets add-on to pull the serial/deviceID information, and then use GAM to move devices into their new OU's en masse. 

Thanks for getting back to me!

On Tuesday, November 1, 2016 at 4:39:54 PM UTC-4, Jay Lee wrote:
Just tested this with 3.8 and it's working as expected. Can you update to 3.8 and confirm the issue still exists?

The error indicates GAM is sending "query:id:<sn>" as the deviceId to update when instead it should be first doing a lookup of id:<sn> to determine the correct deviceID and then using that deviceId for the update.

Jay

On Tue, Nov 1, 2016 at 4:33 PM Ryan Adams <all...@gmail.com> wrote:
Using the command "gam update cros query:id:[serialNumber] has been a godsend, but for the past 2 months, this has stopped working for me. Every time I try to use this (whether doing it in bulk with ~~, or as a one-off without ~~), the following message is returned every time:

ERROR: 404: Resource Not Found: query:id:[any serial i try] - notFound

Initially, I thought this was due to the chrome device itself not being enrolled in the domain, but if I run gam info cros [device ID of the serial i've tried], it returns with all of the device's information.

Am i missing something?
Did the command/arguments change?

Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
--

Jay

Ryan Adams

unread,
Nov 4, 2016, 9:22:28 AM11/4/16
to GAM for G Suite
Hi All,

I just installed 3.8 again, and it's still not working. I even performed a clean install of GAM, with the same issues. Let me know if I should give 4.01 a spin.

Ross Scroggs

unread,
Nov 4, 2016, 10:33:48 AM11/4/16
to google-ap...@googlegroups.com
Ryan,

I can duplicate your problem in Windows/Command Prompt if I surround the query with single quotes. Is this what you're doing?
If so, change the single quotes to double quotes.

c:\GamTest>gam update cros 'query:id:1234' notes BlueChromeBook10
 updating 'query:id:1234' (1 of 1)

ERROR: 404: Resource Not Found: 'query:id:1234' - resourceNotFound

c:\GamTest>

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ryan Adams

unread,
Nov 4, 2016, 10:57:18 AM11/4/16
to google-ap...@googlegroups.com
Hi Ross,

I'm not using any quotes. I just tried using single/double quotes and the issue persists.

Thanks

On Fri, Nov 4, 2016 at 10:33 AM, Ross Scroggs <ross.s...@gmail.com> wrote:
Ryan,

I can duplicate your problem in Windows/Command Prompt if I surround the query with single quotes. Is this what you're doing?
If so, change the single quotes to double quotes.

c:\GamTest>gam update cros 'query:id:1234' notes BlueChromeBook10
 updating 'query:id:1234' (1 of 1)

ERROR: 404: Resource Not Found: 'query:id:1234' - resourceNotFound

c:\GamTest>

Ross
On Fri, Nov 4, 2016 at 6:22 AM, Ryan Adams <all...@gmail.com> wrote:
Hi All,

I just installed 3.8 again, and it's still not working. I even performed a clean install of GAM, with the same issues. Let me know if I should give 4.01 a spin.

On Tuesday, November 1, 2016 at 4:33:02 PM UTC-4, Ryan Adams wrote:
Using the command "gam update cros query:id:[serialNumber] has been a godsend, but for the past 2 months, this has stopped working for me. Every time I try to use this (whether doing it in bulk with ~~, or as a one-off without ~~), the following message is returned every time:

ERROR: 404: Resource Not Found: query:id:[any serial i try] - notFound

Initially, I thought this was due to the chrome device itself not being enrolled in the domain, but if I run gam info cros [device ID of the serial i've tried], it returns with all of the device's information.

Am i missing something?
Did the command/arguments change?

Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ross Scroggs

unread,
Nov 4, 2016, 11:10:22 AM11/4/16
to google-ap...@googlegroups.com
Ryan,

You are on Windows?
Here is the code:

def doUpdateCros():

  cd = buildGAPIObject(u'directory')

  deviceId = sys.argv[3]

  if deviceId[:6].lower() == u'query:':

    query = deviceId[6:]

    devices_result = callGAPIpages(cd.chromeosdevices(), u'list', u'chromeosdevices',

                                   query=query, customerId=GC_Values[GC_CUSTOMER_ID], fields=u'chromeosdevices/deviceId,nextPageToken')

    devices = list()

    for a_device in devices_result:

      devices.append(a_device[u'deviceId'])

  else:

    devices = [deviceId,]


gam update cros query:id:[serialNumber]
0      1          2      3
The only way to get the error you're describing is for the code to not recognize the query: on the front of sys.argv[3].
Can you send me a screenshot?

Ross

To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.



--

Ryan Adams

unread,
Nov 4, 2016, 1:06:06 PM11/4/16
to google-ap...@googlegroups.com
Hey Ross,

What screenshot should I be supplying?




--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ryan Adams

unread,
Nov 4, 2016, 1:08:33 PM11/4/16
to google-ap...@googlegroups.com
And yes, I'm on Windows 10.

To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ross Scroggs

unread,
Nov 4, 2016, 1:55:52 PM11/4/16
to google-ap...@googlegroups.com
Ryan,

Show me the command you're issuing and all output, you don't have to use a real serial number as the command blows up anyway.

Ross

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.



--

Ryan Adams

unread,
Nov 4, 2016, 2:47:11 PM11/4/16
to google-ap...@googlegroups.com
Here you go:

Inline image 1




--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ryan Adams

unread,
Nov 4, 2016, 2:49:00 PM11/4/16
to google-ap...@googlegroups.com
Here's another screenshot to show that I'm on 3.8.

Inline image 1

To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Jay Lee

unread,
Nov 4, 2016, 3:29:17 PM11/4/16
to google-ap...@googlegroups.com
Currently "gam info cros" does not allow query:, it can only handle device IDs. "gam update cros" commands can handle the query: format.

Ross or I can see about adding query: format to the cros info command.

Can you confirm:

gam update cros query:id:<sn> asset_id 1234

works?

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Jay

Ryan Adams

unread,
Nov 4, 2016, 4:07:11 PM11/4/16
to google-ap...@googlegroups.com
Hey Jay,

Thanks for clarifying the difference between 'update cros' and 'info cros' when using the query: format. I was able to successfully update a ChromeOS device using the query format. 

Cheers!

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.



--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
--

Jay

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gQuUF0lg1jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages