Hello,
We have a GAM command that looks at groups created starting from 8/8/18 then modifies the view membership setting to all in domain.
However, my question is if there's a way to automate the first GAM command below so that the start time of the admin report log it's gathering changes based on system time, or something similiar, so that it looks back at the last 30 days at the time the GAM command is ran?
gam report admin start 2018-08-08T00:00:00.000Z event CREATE_GROUP > groups.csv
gam csv groups.csv gam update group ~parameters.0.value who_can_view_membership all_in_domain_can_view > DLViewingresults.csv
I couldn't find any conditions that are configurable in the API documentation, but basically I would like this command to pull reports of groups created in the past 30 days at the time the script is ran. I'm not sure if there's a way you can do this with the API itself, or if this would require a python/PS script in order to run. In essence, I want this command to be fully automated so that it doesn't require anyone to modify the script later on.
I do know there's this command:
gam report groups start -30d event create_group parameters group_email > groups.csv
But the problem with this command is the Groups reports API doesn't log groups created via Google Cloud Directory Sync (which is what we're trying to pull logs of). However, the parameter "-30d" would be exactly what I want for the script above, I just couldn't find this in the documentation for Admin Reports API.
Thanks,
Nick