Method: properties.list

傳回指定上層帳戶下的子屬性。

系統只會傳回「GA4」資源。如果呼叫端沒有存取權,屬性會遭到排除。虛刪除 (例如「垃圾桶」) 資源會預設為排除,如果找不到相關屬性,系統會傳回空白清單。

HTTP 要求

GET https://analyticsadmin.googleapis.com/v1beta/properties

這個網址使用 gRPC 轉碼語法。

查詢參數

參數
filter

string

必要欄位。用於篩選要求結果的運算式。符合篩選條件的欄位如下:parent:(上層帳戶/資源的資源名稱) 或 ancestor:(上層帳戶的資源名稱) 或 firebase_project:(已連結的 Firebase 專案的 ID 或編號)。以下列舉幾個篩選器範例:

| Filter                      | Description                               |
|-----------------------------|-------------------------------------------|
| parent:accounts/123         | The account with account id: 123.       |
| parent:properties/123       | The property with property id: 123.       |
| ancestor:accounts/123       | The account with account id: 123.         |
| firebase_project:project-id | The firebase project with id: project-id. |
| firebase_project:123        | The firebase project with number: 123.    |
pageSize

integer

要傳回的資源數量上限。即使還有網頁,服務傳回的結果仍可能少於這個值。如未指定,最多將傳回 50 項資源。許可的最大值為 200;(較高的值將強制設定為上限)

pageToken

string

屬於接收自前一個 properties.list 呼叫的網頁權杖。提供此項目即可擷取後續網頁。進行分頁時,提供至 properties.list 的所有其他參數須與提供網頁權杖的呼叫相符。

showDeleted

boolean

是否要在結果中納入虛刪除 (例如「垃圾桶」) 的屬性。您可以檢查屬性,判斷這些屬性是否遭到刪除。

要求主體

要求主體必須為空白。

回應主體

「Properties.list」遠端程序呼叫 (RPC) 的回應訊息。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "properties": [
    {
      object (Property)
    }
  ],
  "nextPageToken": string
}
欄位
properties[]

object (Property)

符合篩選條件且可供呼叫端存取的結果。

nextPageToken

string

可做為 pageToken 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit