Reference for translating query commands to columns in data?

56 views
Skip to first unread message

Daryl Henson

unread,
Mar 4, 2020, 10:21:53 AM3/4/20
to GAM for G Suite
I'm probably so far off base with my terminology that the question title might not even make sense... Sorry for that.

When I'm using GAM, I often times find myself in a situation where I don't know exactly what the field of data is titled - for example:
I was trying to move a chromebook to a different OU. The exported data I'm using titles the column "orgUnitPath", but if I run the command:
gam update cros [device-id-here] orgUnitPath "/Chromebooks/OU/Here"
I get
ERROR: orgUnitPath is not a valid argument for "gam update cros"

I got lucky this time and just tried org instead of orgUnitPath and that works.

Another example, when trying to print a report of chromebooks enrolled as a certain user, I initially tried the following

gam print cros query "annotatedUser:user...@ourname.org"

again, using "annotatedUser" based on the report I printed using GAM "gam print cros ...". But annotatedUser doesn't work - "user" does!

So - all of that to say - is there a clear place to see what the actual data fields are titled? I'm aware of the GAM documentation saying that queries should conform to the "API search for users format". But even that doesn't seem to give me the actual field names.

I assume there is some reference sheet somewhere that I just haven't found yet...

Ross Scroggs

unread,
Mar 4, 2020, 10:40:48 AM3/4/20
to google-ap...@googlegroups.com
Daryl,

In the same folder as your Gam executable, there is a file named GamCommands.txt that shows the syntax for all Gam commands.
That will help with you first question.

You have to consult the API documentation for making a valid query:

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-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/b857fa0c-e9d9-47ae-b468-4747932575a5%40googlegroups.com.


--

Daryl Henson

unread,
Mar 5, 2020, 10:00:17 AM3/5/20
to GAM for G Suite
Perfect. Those dev docs from Google are exactly what I was looking for. Thank you so much for clearing up my own confusion!
gam print cros query "annotatedUs...@ourname.org"

again, using "annotatedUser" based on the report I printed using GAM "gam print cros ...". But annotatedUser doesn't work - "user" does!

So - all of that to say - is there a clear place to see what the actual data fields are titled? I'm aware of the GAM documentation saying that queries should conform to the "API search for users format". But even that doesn't seem to give me the actual field names.

I assume there is some reference sheet somewhere that I just haven't found yet...

--
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.


--
Ross Scroggs
Reply all
Reply to author
Forward
0 new messages