--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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 http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/bbe14f03-9a65-47f9-8885-4f961b1445e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Any "single operation" GAM command (e.g. create user, suspend user, add member to group) that gets an API failure should return a non-zero exit code to the OS. You should be able to check for this and your script take action.
Jay Lee
On Mon, Oct 20, 2014 at 8:24 AM, Raghuram P <ragr...@gmail.com> wrote:
Hello All,
New to GAM, have browsed thru GAM documentation and was able get the basics working.
Need support in trying to find how to capture "Command Status", for example if I create / update a user, I would like to know if the operation was success or failure, and use this status code in a script that would update user entries in a database (For example when a new user is created, if user creation was success, would log a entry to database that user was created else log to a file that user creation failed).
Simply put how to capture the status/error code (for example when suspend an user that doesn't exist, 404 is shown on the screen) so that further actions can be taken inside a script. Currently using a simple perl script that updates a database and calling the gam.exe via system ("gam command") and need to know the status and also capture the output of "gam command" for further processing.
Thanks in Advance
-Raghu
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Any "single operation" GAM command (e.g. create user, suspend user, add member to group) that gets an API failure should return a non-zero exit code to the OS. You should be able to check for this and your script take action.
>KeegansMac$ gam update user baduser password d57f11f8casdf1569e727430ca64b4c621fc12ed sha
>updating user bad...@domain.com...
>Error 404: Resource Not Found: userKey - notFound
>KeegansMac $ echo $?
>0
Any "single operation" GAM command (e.g. create user, suspend user, add member to group) that gets an API failure should return a non-zero exit code to the OS. You should be able to check for this and your script take action.
Jay Lee
On Mon, Oct 20, 2014 at 8:24 AM, Raghuram P <ragr...@gmail.com> wrote:
Hello All,
New to GAM, have browsed thru GAM documentation and was able get the basics working.
Need support in trying to find how to capture "Command Status", for example if I create / update a user, I would like to know if the operation was success or failure, and use this status code in a script that would update user entries in a database (For example when a new user is created, if user creation was success, would log a entry to database that user was created else log to a file that user creation failed).
Simply put how to capture the status/error code (for example when suspend an user that doesn't exist, 404 is shown on the screen) so that further actions can be taken inside a script. Currently using a simple perl script that updates a database and calling the gam.exe via system ("gam command") and need to know the status and also capture the output of "gam command" for further processing.
Thanks in Advance
-Raghu
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.