Method: accountSummaries.list

傳回呼叫者可存取的所有帳戶摘要。

HTTP 要求

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

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

查詢參數

參數
pageSize

integer

(選用步驟) 要傳回的 AccountSummary 資源數量上限。即使有其他頁面,服務傳回的產品數量也可能會少於這個值。如未指定,最多將傳回 50 項資源。最大值為 200 (較高的值會強制設為最大值)

pageToken

string

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

要求主體

要求主體必須為空白。

回應主體

accountSummaries.list 遠端程序呼叫的回應訊息。

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

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

object (AccountSummary)

呼叫方可存取的所有帳戶摘要。

nextPageToken

string

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

授權範圍

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

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

AccountSummary

虛擬資源,代表帳戶和所有子 Google Analytics 資源的總覽。

JSON 表示法
{
  "name": string,
  "account": string,
  "displayName": string,
  "propertySummaries": [
    {
      object (PropertySummary)
    }
  ]
}
欄位
name

string

ID。這個帳戶摘要的資源名稱。格式:accountSummaries/{account_id} 範例:「accountSummaries/1000」

account

string

此帳戶摘要所指帳戶的資源名稱。格式:accounts/{account_id}。範例:「accounts/1000」

displayName

string

這個帳戶摘要中提及的帳戶顯示名稱。

propertySummaries[]

object (PropertySummary)

這個帳戶的子帳戶摘要清單。

PropertySummary

代表 Google Analytics 資源中繼資料的虛擬資源。

JSON 表示法
{
  "property": string,
  "displayName": string,
  "propertyType": enum (PropertyType),
  "parent": string,
  "canEdit": boolean
}
欄位
property

string

這個屬性摘要所指屬性的資源名稱。格式:properties/{property_id}。範例:「properties/1000」

displayName

string

這份資源摘要中提及的資源顯示名稱。

propertyType

enum (PropertyType)

屬性的屬性類型。

parent

string

這個資源的邏輯父項資源名稱。

注意:您可以使用「資源移動」使用者介面變更父項。格式:accounts/{account}、properties/{property},例如「accounts/100」、「properties/200」

canEdit

boolean

如果為 true,表示使用者具備可編輯資源的 Google Analytics 角色。