Method: spaces.spaceEvents.list
Google Chat 스페이스의 이벤트를 표시합니다. 각 이벤트의 페이로드에는 Chat 리소스의 최신 버전이 포함됩니다. 예를 들어 새 스페이스 회원에 관한 이벤트를 나열하면 서버는 최신 멤버십 세부정보가 포함된 Membership
리소스를 반환합니다. 요청된 기간 동안 신규 회원이 삭제된 경우 이벤트 페이로드에 빈 Membership
리소스가 포함됩니다.
사용자 인증이 필요합니다. 이벤트를 나열하려면 인증된 사용자가 스페이스의 구성원여야 합니다.
예를 보려면 Google Chat 스페이스의 이벤트 목록 보기를 참고하세요.
HTTP 요청
GET https://chat.googleapis.com/v1/{parent=spaces/*}/spaceEvents
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
parent |
string
필수입니다. 이벤트가 발생한 Google Chat 스페이스의 리소스 이름입니다. 형식: spaces/{space}
|
쿼리 매개변수
매개변수 |
pageSize |
integer
선택사항입니다. 반환된 최대 스페이스 이벤트 수입니다. 서비스가 이 값보다 더 적게 반환할 수 있습니다. 음수 값은 INVALID_ARGUMENT 오류를 반환합니다.
|
pageToken |
string
선택사항입니다. 이전 list space events 호출에서 수신된 페이지 토큰입니다. 후속 페이지를 검색하려면 이를 입력합니다. 페이지로 나누는 경우, 공간 이벤트 목록에 제공하는 다른 모든 매개변수가 페이지 토큰을 제공한 호출과 일치해야 합니다. 다른 매개변수에 다른 값을 전달하면 예기치 않은 결과가 발생할 수 있습니다.
|
filter |
string
필수입니다. 쿼리 필터입니다. has : 연산자를 사용하여 이벤트 유형 (eventType )을 하나 이상 지정해야 합니다. 여러 이벤트 유형으로 필터링하려면 OR 연산자를 사용하세요. 필터에서 일괄 이벤트 유형을 생략합니다. 요청은 관련 일괄 이벤트를 자동으로 반환합니다. 예를 들어 새 리액션 (google.workspace.chat.reaction.v1.created )으로 필터링하면 서버에서 새 리액션 이벤트 (google.workspace.chat.reaction.v1.batchCreated )도 일괄 반환합니다. 지원되는 이벤트 유형 목록은 SpaceEvents 참조 문서를 참고하세요. 원하는 경우 시작 시간 (startTime ) 및 종료 시간 (endTime )으로 필터링할 수도 있습니다.
startTime : 스페이스 이벤트 목록을 시작할 타임스탬프입니다. 최대 28일 전에 발생한 이벤트를 표시할 수 있습니다. 지정하지 않으면 지난 28일 동안의 스페이스 이벤트가 표시됩니다.
endTime : 스페이스 이벤트가 표시되는 타임스탬프까지의 범위입니다. 지정하지 않으면 요청 시간까지의 이벤트가 표시됩니다.
시작 시간 또는 종료 시간을 지정하려면 RFC-3339의 등호 = 연산자와 형식을 사용합니다. startTime 및 endTime 로 모두 필터링하려면 AND 연산자를 사용하세요. 예를 들어 다음 쿼리는 유효합니다.
startTime="2023-08-23T19:20:33+00:00" AND
endTime="2023-08-23T19:21:54+00:00"
startTime="2023-08-23T19:20:33+00:00" AND
(eventTypes:"google.workspace.chat.space.v1.updated" OR
eventTypes:"google.workspace.chat.message.v1.created")
다음 쿼리는 유효하지 않습니다.
startTime="2023-08-23T19:20:33+00:00" OR
endTime="2023-08-23T19:21:54+00:00"
eventTypes:"google.workspace.chat.space.v1.updated" AND
eventTypes:"google.workspace.chat.message.v1.created"
잘못된 쿼리는 서버에서 INVALID_ARGUMENT 오류와 함께 거부됩니다.
|
응답 본문
스페이스 이벤트를 나열하기 위한 응답 메시지입니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"spaceEvents": [
{
object (SpaceEvent )
}
],
"nextPageToken": string
} |
필드 |
spaceEvents[] |
object (SpaceEvent )
결과는 시간순으로 반환됩니다 (가장 오래된 이벤트부터 먼저 반환됨). 참고: 목록 요청의 경우 스페이스 객체에 permissionSettings 필드가 반환되지 않습니다.
|
nextPageToken |
string
더 많은 이벤트를 가져오는 데 사용되는 연속 토큰입니다. 이 필드를 생략하면 후속 페이지가 표시되지 않습니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.messages
https://www.googleapis.com/auth/chat.messages.readonly
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.memberships.readonly
https://www.googleapis.com/auth/chat.messages.reactions
https://www.googleapis.com/auth/chat.messages.reactions.readonly
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-02-27(UTC)
[null,null,["최종 업데이트: 2025-02-27(UTC)"],[[["Lists events from a specified Google Chat space, including new members, messages, and reactions, with the payload containing the most recent version of the resource."],["Requires user authentication and membership in the space to list events, returning data chronologically with optional pagination."],["Allows filtering by event types, start time, and end time to refine the results of the listed events."],["The response includes an array of space events and a token for retrieving subsequent pages if available."],["Needs specific authorization scopes for accessing and retrieving the chat space data."]]],["This documentation outlines how to list events from a Google Chat space using the `GET` method. Key actions include: specifying the space via the `parent` path parameter, filtering events by type and time using the `filter` query parameter, and setting the number of events returned with `pageSize`. `pageToken` is used for pagination. Authentication requires user membership in the space and specific OAuth scopes. The response body includes a list of `spaceEvents` and a `nextPageToken` for further results.\n"]]