Coba server MCP untuk Google Analytics. Instal dari
GitHub, dan lihat
pengumuman untuk mengetahui detail selengkapnya.
Method: properties.getDataRetentionSettings
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menampilkan setelan retensi data singleton untuk properti ini.
Permintaan HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataRetentionSettings}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
Wajib. Nama setelan yang akan dicari. Format: properties/{property}/dataRetentionSettings Contoh: "properties/1000/dataRetentionSettings"
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons akan berisi instance DataRetentionSettings
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 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`"]]