Method: subscriptions.patch

อัปเดตหรือต่ออายุการสมัครใช้บริการ Google Workspace ดูวิธีใช้เมธอดนี้ได้ที่ อัปเดตหรือต่ออายุการสมัครใช้บริการ Google Workspace

สำหรับการสมัครใช้บริการในแหล่งข้อมูลเป้าหมายของ Chat คุณสามารถอัปเดตการสมัครใช้บริการได้ดังนี้

คำขอ HTTP

PATCH https://workspaceevents.googleapis.com/v1/{subscription.name=subscriptions/*}

URL ใช้ไวยากรณ์การแปลงรหัส gRPC

พารามิเตอร์เส้นทาง

พารามิเตอร์
subscription.name

string

ตัวระบุ ชื่อแหล่งข้อมูลของการสมัครใช้บริการ

รูปแบบ: subscriptions/{subscription}

พารามิเตอร์การค้นหา

พารามิเตอร์
updateMask

string (FieldMask format)

ไม่บังคับ ช่องที่จะอัปเดต หากละเว้น ระบบจะอัปเดตช่องใดก็ตามที่รวมอยู่ในคำขอ

คุณสามารถอัปเดตช่องใดช่องหนึ่งต่อไปนี้ในการสมัครใช้บริการ

  • expireTime: การประทับเวลาเมื่อการสมัครใช้บริการหมดอายุ
  • ttl: Time to Live (TTL) หรือระยะเวลาของการสมัครใช้บริการ
  • eventTypes: รายการประเภทเหตุการณ์ที่จะได้รับเกี่ยวกับแหล่งข้อมูลเป้าหมาย

เมื่อใช้ไวลด์การ์ด * (เทียบเท่ากับ PUT) ระบบจะตั้งค่าช่องที่ละเว้นเป็นค่าว่างและปฏิเสธหากค่าดังกล่าวไม่ถูกต้อง

validateOnly

boolean

ไม่บังคับ หากตั้งค่าเป็น true ระบบจะตรวจสอบและแสดงตัวอย่างคำขอ แต่จะไม่ทำการอัปเดตการสมัครใช้บริการ

เนื้อความของคำขอ

เนื้อความของคำขอมีอินสแตนซ์ของ Subscription

เนื้อหาการตอบกลับ

หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ของ Operation

  • ช่อง metadata มีอาร์เรย์ว่าง
  • ช่อง response มีอินสแตนซ์ที่อัปเดตของ Subscription

ขอบเขตการให้สิทธิ์

ต้องใช้ขอบเขต 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.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.all.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.all.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/chat.app.all.spaces.readonly
  • https://www.googleapis.com/auth/chat.app.all.users.readstate.readonly
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์