Method: accounts.patch
คำขอ HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{account.name=accounts/*}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
account.name |
string
เอาต์พุตเท่านั้น ชื่อทรัพยากรของบัญชีนี้ รูปแบบ: accounts/{account} ตัวอย่างเช่น "accounts/100"
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
updateMask |
string (FieldMask format)
ต้องระบุ รายการช่องที่จะอัปเดต ชื่อช่องต้องอยู่ในรูปแบบ Snake Case (เช่น "field_to_update") ระบบจะไม่อัปเดตช่องที่ละเว้น หากต้องการแทนที่เอนทิตีทั้งหมด ให้ใช้เส้นทางเดียวที่มีสตริง "*" เพื่อจับคู่กับทุกช่อง ซึ่งเป็นรายการชื่อฟิลด์ที่สมบูรณ์ในตัวเองที่คั่นด้วยคอมมา ตัวอย่าง: "user.displayName,photo"
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Account
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Account
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/analytics.edit
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-01-14 UTC
[null,null,["อัปเดตล่าสุด 2025-01-14 UTC"],[[["This document explains how to update an existing Google Analytics account using the `PATCH` HTTP request method."],["You will need to provide the `account.name` as a path parameter and `updateMask` as a query parameter specifying the fields to update."],["The request body should contain the updated account details in the format of the [Account](/analytics/devguides/config/admin/v1/rest/v1alpha/accounts#Account) object."],["A successful request will return the updated [Account](/analytics/devguides/config/admin/v1/rest/v1alpha/accounts#Account) object in the response body."],["Authorization is required with the `https://www.googleapis.com/auth/analytics.edit` OAuth scope."]]],["This outlines the process of updating an account via a PATCH request to the Google Analytics Admin API. The request URL structure is defined using gRPC Transcoding syntax, with `account.name` as a required path parameter. A `updateMask` query parameter specifies which fields to modify. The request and response bodies use the `Account` resource format. Authorization requires the `analytics.edit` OAuth scope. A try it option is available to help test.\n"]]