Gam calendar <email> deleteevent query <query>

1,656 views
Skip to first unread message

Matthew Russell

unread,
Dec 21, 2016, 8:35:34 PM12/21/16
to GAM for G Suite
Hi.  Can someone provide me with a working example of this?  I would like to delete a bunch of events from a user's google calendar that match a set search criteria, e.g. all events that contain the words "Test Event" within date range Nov 1 2016 and Dec 31 2016.  I spoke to Google and they say that it is not possible to type the search terms in a single-line in the search window on the Web UI for Google Calendar, so I think I am lost in the definition of the "query" parameter for this GAM command.  The wiki says "Query operates in a similar fashion to Calendar UIs search".

Thanks in advance all.

Steve Larsen

unread,
Jan 4, 2017, 5:35:26 PM1/4/17
to GAM for G Suite
Also interested in understanding how query should be structured. It looks very different to a gmail query. I see this below the search box other than in like gmail

52 results for bridge when: 2017-01-01 - 2017-12-31 on UK Conference Bridge

The url isn't much help either

Steve Larsen

unread,
Jan 4, 2017, 5:50:32 PM1/4/17
to GAM for G Suite
Now that I try to even run a command with query in it I get an error

user:~ $ gam calendar domain.co...@resource.calendar.google.com query "Bridge"
ERROR: Service not applicable for this address

running the following fails on all 
user:~ $ gam user domain.co...@resource.calendar.google.com check serviceaccount

Ross Scroggs

unread,
Jan 4, 2017, 5:57:04 PM1/4/17
to google-ap...@googlegroups.com
Steve,

Do the following and follow instructions for some non-admin user: gam us...@domain.com check serviceaccount 

Ross

On Wed, Jan 4, 2017 at 2:50 PM, Steve Larsen <steve....@gettaxi.com> wrote:
Now that I try to even run a command with query in it I get an error

user:~ $ gam calendar domain.com_1234456@resource.calendar.google.com query "Bridge"
ERROR: Service not applicable for this address

running the following fails on all 
user:~ $ gam user domain.com_1234456@resource.calendar.google.com check serviceaccount


On Wednesday, 4 January 2017 22:35:26 UTC, Steve Larsen wrote:
Also interested in understanding how query should be structured. It looks very different to a gmail query. I see this below the search box other than in like gmail

52 results for bridge when: 2017-01-01 - 2017-12-31 on UK Conference Bridge

The url isn't much help either


On Thursday, 22 December 2016 01:35:34 UTC, Matthew Russell wrote:
Hi.  Can someone provide me with a working example of this?  I would like to delete a bunch of events from a user's google calendar that match a set search criteria, e.g. all events that contain the words "Test Event" within date range Nov 1 2016 and Dec 31 2016.  I spoke to Google and they say that it is not possible to type the search terms in a single-line in the search window on the Web UI for Google Calendar, so I think I am lost in the definition of the "query" parameter for this GAM command.  The wiki says "Query operates in a similar fashion to Calendar UIs search".

Thanks in advance all.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/a7659996-0932-4ae7-ad5c-e59f2c3c16e9%40googlegroups.com.

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



--

Ross Scroggs

unread,
Jan 4, 2017, 6:08:03 PM1/4/17
to google-ap...@googlegroups.com
Matthew/Steve,

gam calendar event queries are basic, what the GUI does is more that gam can do.
If you say: gam calendar cale...@domain.com deleteevent query "foo bar com"
The events with "foo" and "bar" and "com" are selected.

If you say: gam calendar cale...@domain.com deleteevent query "foo" query "bar" query "com"
The events with "foo" or "bar" or "com" are selected.

Ross


On Wed, Jan 4, 2017 at 2:56 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
Steve,

Do the following and follow instructions for some non-admin user: gam us...@domain.com check serviceaccount 

Ross
On Wed, Jan 4, 2017 at 2:50 PM, Steve Larsen <steve....@gettaxi.com> wrote:
Now that I try to even run a command with query in it I get an error

user:~ $ gam calendar domain.com_1234456@resource.calendar.google.com query "Bridge"
ERROR: Service not applicable for this address

running the following fails on all 
user:~ $ gam user domain.co...@resource.calendar.google.com check serviceaccount


On Wednesday, 4 January 2017 22:35:26 UTC, Steve Larsen wrote:
Also interested in understanding how query should be structured. It looks very different to a gmail query. I see this below the search box other than in like gmail

52 results for bridge when: 2017-01-01 - 2017-12-31 on UK Conference Bridge

The url isn't much help either


On Thursday, 22 December 2016 01:35:34 UTC, Matthew Russell wrote:
Hi.  Can someone provide me with a working example of this?  I would like to delete a bunch of events from a user's google calendar that match a set search criteria, e.g. all events that contain the words "Test Event" within date range Nov 1 2016 and Dec 31 2016.  I spoke to Google and they say that it is not possible to type the search terms in a single-line in the search window on the Web UI for Google Calendar, so I think I am lost in the definition of the "query" parameter for this GAM command.  The wiki says "Query operates in a similar fashion to Calendar UIs search".

Thanks in advance all.

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



--



--

Matthew Russell

unread,
Jan 4, 2017, 6:29:54 PM1/4/17
to GAM for G Suite
Thanks Ross.  Is it possible to include date/time parameters in the search as well?  Or will it search all events in the user's calendar that contain "foo" and/or "bar"

Matthew

On Thursday, January 5, 2017 at 9:08:03 AM UTC+10, Ross Scroggs wrote:
Matthew/Steve,

gam calendar event queries are basic, what the GUI does is more that gam can do.
If you say: gam calendar cale...@domain.com deleteevent query "foo bar com"
The events with "foo" and "bar" and "com" are selected.

If you say: gam calendar cale...@domain.com deleteevent query "foo" query "bar" query "com"
The events with "foo" or "bar" or "com" are selected.

Ross

On Wed, Jan 4, 2017 at 2:56 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
Steve,

Do the following and follow instructions for some non-admin user: gam us...@domain.com check serviceaccount 

Ross
On Wed, Jan 4, 2017 at 2:50 PM, Steve Larsen <steve....@gettaxi.com> wrote:
Now that I try to even run a command with query in it I get an error

user:~ $ gam calendar domain.co...@resource.calendar.google.com query "Bridge"
ERROR: Service not applicable for this address

running the following fails on all 
user:~ $ gam user domain.co...@resource.calendar.google.com check serviceaccount


On Wednesday, 4 January 2017 22:35:26 UTC, Steve Larsen wrote:
Also interested in understanding how query should be structured. It looks very different to a gmail query. I see this below the search box other than in like gmail

52 results for bridge when: 2017-01-01 - 2017-12-31 on UK Conference Bridge

The url isn't much help either


On Thursday, 22 December 2016 01:35:34 UTC, Matthew Russell wrote:
Hi.  Can someone provide me with a working example of this?  I would like to delete a bunch of events from a user's google calendar that match a set search criteria, e.g. all events that contain the words "Test Event" within date range Nov 1 2016 and Dec 31 2016.  I spoke to Google and they say that it is not possible to type the search terms in a single-line in the search window on the Web UI for Google Calendar, so I think I am lost in the definition of the "query" parameter for this GAM command.  The wiki says "Query operates in a similar fashion to Calendar UIs search".

Thanks in advance all.

--
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-ap...@googlegroups.com.



--



--

Steve - DynTech

unread,
Jan 4, 2017, 6:32:11 PM1/4/17
to GAM for G Suite
should have said that running the check serviceaccount passed all for a user. it fails when passing it a resource calendar address. user calendars are fine.
intention is to leave calendar events on individuals calendar but remove all events on the resource calendar 

This is successful
gam calendar domain.c...@resource.calendar.google.com deleteevent eventid 1234abcd_170107T100000Z*

this always fails
gam calendar domain.c...@resource.calendar.google.com deleteevent query "bridge"


On Wednesday, 4 January 2017 23:08:03 UTC, Ross Scroggs wrote:
Matthew/Steve,

gam calendar event queries are basic, what the GUI does is more that gam can do.
If you say: gam calendar cale...@domain.com deleteevent query "foo bar com"
The events with "foo" and "bar" and "com" are selected.

If you say: gam calendar cale...@domain.com deleteevent query "foo" query "bar" query "com"
The events with "foo" or "bar" or "com" are selected.

Ross

On Wed, Jan 4, 2017 at 2:56 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
Steve,

Do the following and follow instructions for some non-admin user: gam us...@domain.com check serviceaccount 

Ross
On Wed, Jan 4, 2017 at 2:50 PM, Steve Larsen <steve....@gettaxi.com> wrote:
Now that I try to even run a command with query in it I get an error

user:~ $ gam calendar domain.co...@resource.calendar.google.com query "Bridge"
ERROR: Service not applicable for this address

running the following fails on all 
user:~ $ gam user domain.co...@resource.calendar.google.com check serviceaccount


On Wednesday, 4 January 2017 22:35:26 UTC, Steve Larsen wrote:
Also interested in understanding how query should be structured. It looks very different to a gmail query. I see this below the search box other than in like gmail

52 results for bridge when: 2017-01-01 - 2017-12-31 on UK Conference Bridge

The url isn't much help either


On Thursday, 22 December 2016 01:35:34 UTC, Matthew Russell wrote:
Hi.  Can someone provide me with a working example of this?  I would like to delete a bunch of events from a user's google calendar that match a set search criteria, e.g. all events that contain the words "Test Event" within date range Nov 1 2016 and Dec 31 2016.  I spoke to Google and they say that it is not possible to type the search terms in a single-line in the search window on the Web UI for Google Calendar, so I think I am lost in the definition of the "query" parameter for this GAM command.  The wiki says "Query operates in a similar fashion to Calendar UIs search".

Thanks in advance all.

--
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-ap...@googlegroups.com.



--



--

Steve - DynTech

unread,
Jan 4, 2017, 6:36:20 PM1/4/17
to GAM for G Suite
Once I put doit on the end after seeing the results of events that would be deleted, I actually get the same error message


On Wednesday, 4 January 2017 23:32:11 UTC, Steve - DynTech wrote:
should have said that running the check serviceaccount passed all for a user. it fails when passing it a resource calendar address. user calendars are fine.
intention is to leave calendar events on individuals calendar but remove all events on the resource calendar 

This is successful
gam calendar domain.com_123456@resource.calendar.google.com deleteevent eventid 1234abcd_170107T100000Z*

this always fails
gam calendar domain.com_123456@resource.calendar.google.com deleteevent query "bridge"
Reply all
Reply to author
Forward
0 new messages