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