REST Resource: spaces.spaceEvents

Resource: SpaceEvent

An event that represents a change or activity in a Google Chat space. To learn more, see Work with events from Google Chat.

JSON representation
{
  "name": string,
  "eventTime": string,
  "eventType": string,

  // Union field payload can be only one of the following:
  "messageCreatedEventData": {
    object (MessageCreatedEventData)
  },
  "messageUpdatedEventData": {
    object (MessageUpdatedEventData)
  },
  "messageDeletedEventData": {
    object (MessageDeletedEventData)
  },
  "messageBatchCreatedEventData": {
    object (MessageBatchCreatedEventData)
  },
  "messageBatchUpdatedEventData": {
    object (MessageBatchUpdatedEventData)
  },
  "messageBatchDeletedEventData": {
    object (MessageBatchDeletedEventData)
  },
  "spaceUpdatedEventData": {
    object (SpaceUpdatedEventData)
  },
  "spaceBatchUpdatedEventData": {
    object (SpaceBatchUpdatedEventData)
  },
  "membershipCreatedEventData": {
    object (MembershipCreatedEventData)
  },
  "membershipUpdatedEventData": {
    object (MembershipUpdatedEventData)
  },
  "membershipDeletedEventData": {
    object (MembershipDeletedEventData)
  },
  "membershipBatchCreatedEventData": {
    object (MembershipBatchCreatedEventData)
  },
  "membershipBatchUpdatedEventData": {
    object (MembershipBatchUpdatedEventData)
  },
  "membershipBatchDeletedEventData": {
    object (MembershipBatchDeletedEventData)
  },
  "reactionCreatedEventData": {
    object (ReactionCreatedEventData)
  },
  "reactionDeletedEventData": {
    object (ReactionDeletedEventData)
  },
  "reactionBatchCreatedEventData": {
    object (ReactionBatchCreatedEventData)
  },
  "reactionBatchDeletedEventData": {
    object (ReactionBatchDeletedEventData)
  }
  // End of list of possible types for union field payload.
}
Fields
name

string

Resource name of the space event.

Format: spaces/{space}/spaceEvents/{spaceEvent}

eventTime

string (Timestamp format)

Time when the event occurred.

eventType

string

Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For spaceEvents.list() requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version.

Supported event types for messages:

  • New message: google.workspace.chat.message.v1.created
  • Updated message: google.workspace.chat.message.v1.updated
  • Deleted message: google.workspace.chat.message.v1.deleted
  • Multiple new messages: google.workspace.chat.message.v1.batchCreated
  • Multiple updated messages: google.workspace.chat.message.v1.batchUpdated
  • Multiple deleted messages: google.workspace.chat.message.v1.batchDeleted

Supported event types for memberships:

  • New membership: google.workspace.chat.membership.v1.created
  • Updated membership: google.workspace.chat.membership.v1.updated
  • Deleted membership: google.workspace.chat.membership.v1.deleted
  • Multiple new memberships: google.workspace.chat.membership.v1.batchCreated
  • Multiple updated memberships: google.workspace.chat.membership.v1.batchUpdated
  • Multiple deleted memberships: google.workspace.chat.membership.v1.batchDeleted

Supported event types for reactions:

  • New reaction: google.workspace.chat.reaction.v1.created
  • Deleted reaction: google.workspace.chat.reaction.v1.deleted
  • Multiple new reactions: google.workspace.chat.reaction.v1.batchCreated
  • Multiple deleted reactions: google.workspace.chat.reaction.v1.batchDeleted

Supported event types about the space:

  • Updated space: google.workspace.chat.space.v1.updated
  • Multiple space updates: google.workspace.chat.space.v1.batchUpdated

Union field payload.

payload can be only one of the following:

messageCreatedEventData

object (MessageCreatedEventData)

Event payload for a new message.

Event type: google.workspace.chat.message.v1.created

messageUpdatedEventData

object (MessageUpdatedEventData)

Event payload for an updated message.

Event type: google.workspace.chat.message.v1.updated

messageDeletedEventData

object (MessageDeletedEventData)

Event payload for a deleted message.

Event type: google.workspace.chat.message.v1.deleted

messageBatchCreatedEventData

object (MessageBatchCreatedEventData)

Event payload for multiple new messages.

Event type: google.workspace.chat.message.v1.batchCreated

messageBatchUpdatedEventData

object (MessageBatchUpdatedEventData)

Event payload for multiple updated messages.

Event type: google.workspace.chat.message.v1.batchUpdated

messageBatchDeletedEventData

object (MessageBatchDeletedEventData)

Event payload for multiple deleted messages.

Event type: google.workspace.chat.message.v1.batchDeleted

spaceUpdatedEventData

object (SpaceUpdatedEventData)

Event payload for a space update.

Event type: google.workspace.chat.space.v1.updated

spaceBatchUpdatedEventData

object (SpaceBatchUpdatedEventData)

Event payload for multiple updates to a space.

Event type: google.workspace.chat.space.v1.batchUpdated

membershipCreatedEventData

object (MembershipCreatedEventData)

Event payload for a new membership.

Event type: google.workspace.chat.membership.v1.created

membershipUpdatedEventData

object (MembershipUpdatedEventData)

Event payload for an updated membership.

Event type: google.workspace.chat.membership.v1.updated

membershipDeletedEventData

object (MembershipDeletedEventData)

Event payload for a deleted membership.

Event type: google.workspace.chat.membership.v1.deleted

membershipBatchCreatedEventData

object (MembershipBatchCreatedEventData)

Event payload for multiple new memberships.

Event type: google.workspace.chat.membership.v1.batchCreated

membershipBatchUpdatedEventData

object (MembershipBatchUpdatedEventData)

Event payload for multiple updated memberships.

Event type: google.workspace.chat.membership.v1.batchUpdated

membershipBatchDeletedEventData

object (MembershipBatchDeletedEventData)

Event payload for multiple deleted memberships.

Event type: google.workspace.chat.membership.v1.batchDeleted

reactionCreatedEventData

object (ReactionCreatedEventData)

Event payload for a new reaction.

Event type: google.workspace.chat.reaction.v1.created

reactionDeletedEventData

object (ReactionDeletedEventData)

Event payload for a deleted reaction.

Event type: google.workspace.chat.reaction.v1.deleted

reactionBatchCreatedEventData

object (ReactionBatchCreatedEventData)

Event payload for multiple new reactions.

Event type: google.workspace.chat.reaction.v1.batchCreated

reactionBatchDeletedEventData

object (ReactionBatchDeletedEventData)

Event payload for multiple deleted reactions.

Event type: google.workspace.chat.reaction.v1.batchDeleted

MessageCreatedEventData

Event payload for a new message.

Event type: google.workspace.chat.message.v1.created

JSON representation
{
  "message": {
    object (Message)
  }
}
Fields
message

object (Message)

The new message.

MessageUpdatedEventData

Event payload for an updated message.

Event type: google.workspace.chat.message.v1.updated

JSON representation
{
  "message": {
    object (Message)
  }
}
Fields
message

object (Message)

The updated message.

MessageDeletedEventData

Event payload for a deleted message.

Event type: google.workspace.chat.message.v1.deleted

JSON representation
{
  "message": {
    object (Message)
  }
}
Fields
message

object (Message)

The deleted message. Only the name, createTime, deleteTime, and deletionMetadata fields are populated.

MessageBatchCreatedEventData

Event payload for multiple new messages.

Event type: google.workspace.chat.message.v1.batchCreated

JSON representation
{
  "messages": [
    {
      object (MessageCreatedEventData)
    }
  ]
}
Fields
messages[]

object (MessageCreatedEventData)

A list of new messages.

MessageBatchUpdatedEventData

Event payload for multiple updated messages.

Event type: google.workspace.chat.message.v1.batchUpdated

JSON representation
{
  "messages": [
    {
      object (MessageUpdatedEventData)
    }
  ]
}
Fields
messages[]

object (MessageUpdatedEventData)

A list of updated messages.

MessageBatchDeletedEventData

Event payload for multiple deleted messages.

Event type: google.workspace.chat.message.v1.batchDeleted

JSON representation
{
  "messages": [
    {
      object (MessageDeletedEventData)
    }
  ]
}
Fields
messages[]

object (MessageDeletedEventData)

A list of deleted messages.

SpaceUpdatedEventData

Event payload for an updated space.

Event type: google.workspace.chat.space.v1.updated

JSON representation
{
  "space": {
    object (Space)
  }
}
Fields
space

object (Space)

The updated space.

SpaceBatchUpdatedEventData

Event payload for multiple updates to a space.

Event type: google.workspace.chat.space.v1.batchUpdated

JSON representation
{
  "spaces": [
    {
      object (SpaceUpdatedEventData)
    }
  ]
}
Fields
spaces[]

object (SpaceUpdatedEventData)

A list of updated spaces.

MembershipCreatedEventData

Event payload for a new membership.

Event type: google.workspace.chat.membership.v1.created.

JSON representation
{
  "membership": {
    object (Membership)
  }
}
Fields
membership

object (Membership)

The new membership.

MembershipUpdatedEventData

Event payload for an updated membership.

Event type: google.workspace.chat.membership.v1.updated

JSON representation
{
  "membership": {
    object (Membership)
  }
}
Fields
membership

object (Membership)

The updated membership.

MembershipDeletedEventData

Event payload for a deleted membership.

Event type: google.workspace.chat.membership.v1.deleted

JSON representation
{
  "membership": {
    object (Membership)
  }
}
Fields
membership

object (Membership)

The deleted membership. Only the name and state fields are populated.

MembershipBatchCreatedEventData

Event payload for multiple new memberships.

Event type: google.workspace.chat.membership.v1.batchCreated

JSON representation
{
  "memberships": [
    {
      object (MembershipCreatedEventData)
    }
  ]
}
Fields
memberships[]

object (MembershipCreatedEventData)

A list of new memberships.

MembershipBatchUpdatedEventData

Event payload for multiple updated memberships.

Event type: google.workspace.chat.membership.v1.batchUpdated

JSON representation
{
  "memberships": [
    {
      object (MembershipUpdatedEventData)
    }
  ]
}
Fields
memberships[]

object (MembershipUpdatedEventData)

A list of updated memberships.

MembershipBatchDeletedEventData

Event payload for multiple deleted memberships.

Event type: google.workspace.chat.membership.v1.batchDeleted

JSON representation
{
  "memberships": [
    {
      object (MembershipDeletedEventData)
    }
  ]
}
Fields
memberships[]

object (MembershipDeletedEventData)

A list of deleted memberships.

ReactionCreatedEventData

Event payload for a new reaction.

Event type: google.workspace.chat.reaction.v1.created

JSON representation
{
  "reaction": {
    object (Reaction)
  }
}
Fields
reaction

object (Reaction)

The new reaction.

ReactionDeletedEventData

Event payload for a deleted reaction.

Type: google.workspace.chat.reaction.v1.deleted

JSON representation
{
  "reaction": {
    object (Reaction)
  }
}
Fields
reaction

object (Reaction)

The deleted reaction.

ReactionBatchCreatedEventData

Event payload for multiple new reactions.

Event type: google.workspace.chat.reaction.v1.batchCreated

JSON representation
{
  "reactions": [
    {
      object (ReactionCreatedEventData)
    }
  ]
}
Fields
reactions[]

object (ReactionCreatedEventData)

A list of new reactions.

ReactionBatchDeletedEventData

Event payload for multiple deleted reactions.

Event type: google.workspace.chat.reaction.v1.batchDeleted

JSON representation
{
  "reactions": [
    {
      object (ReactionDeletedEventData)
    }
  ]
}
Fields
reactions[]

object (ReactionDeletedEventData)

A list of deleted reactions.

Methods

get

Returns an event from a Google Chat space.

list

Lists events from a Google Chat space.