ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: properties.getDataRetentionSettings
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงการตั้งค่าการเก็บรักษาข้อมูลซิงเกิลสำหรับพร็อพเพอร์ตี้นี้
คำขอ HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataRetentionSettings}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ต้องระบุ ชื่อของการตั้งค่าที่จะค้นหา รูปแบบ: พร็อพเพอร์ตี้/{property}/dataStorageSettings เช่น "พร็อพเพอร์ตี้/1000/datareservationSettings"
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ DataRetentionSettings
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eRetrieves the data retention settings for a specific Google Analytics 4 property.\u003c/p\u003e\n"],["\u003cp\u003eUses an HTTP GET request with the property ID specified in the path parameter.\u003c/p\u003e\n"],["\u003cp\u003eRequires authentication with appropriate OAuth scopes for read or edit access to Analytics data.\u003c/p\u003e\n"],["\u003cp\u003eReturns a DataRetentionSettings object containing the property's data retention configuration upon successful execution.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be empty.\u003c/p\u003e\n"]]],["This document details retrieving data retention settings for a specific property. A `GET` request is made to a URL containing the property's name, using gRPC Transcoding syntax. The `name` path parameter, formatted as \"properties/{property}/dataRetentionSettings,\" is required. The request body must be empty. A successful response returns `DataRetentionSettings`. Authorization requires either `analytics.readonly` or `analytics.edit` OAuth scopes.\n"],null,["# Method: properties.getDataRetentionSettings\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns the singleton data retention settings for this property.\n\n### HTTP request\n\n`GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataRetentionSettings}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\" |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [DataRetentionSettings](/analytics/devguides/config/admin/v1/rest/v1alpha/DataRetentionSettings).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/analytics.readonly`\n- `https://www.googleapis.com/auth/analytics.edit`"]]