管理 API
這是 Management API 3.0 版參考指南。提供 Google Analytics (分析) 設定資料查詢和回應的完整詳細資料。如需設定資料的概念和結構指南,請參閱第 3.0 版 總覽.
本指南中的各節分別定義已驗證使用者設定資料中某一類實體的要求方法和回應。要求都是以 REST 格式顯示。每個方法的網頁結尾,都可以在 APIs Explorer 中使用「試試看!」連結,以互動方式試用該要求。
資源類型
- 帳戶摘要
- 帳戶連結
- 帳戶
- AdWords 連結
- 自訂資料來源
- 自訂維度
- 自訂指標
- 實驗
- 篩選器
- 目標
- 用戶端 ID
- 設定檔篩選器連結
- 個人資料使用者連結
- 再行銷目標對象
- 區隔
- 未取樣報表
- 上傳
- 檢視畫面 (設定檔)
- 網站資源
- 網站資源使用者連結
帳戶摘要
如需帳戶摘要資源的詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
list |
GET /management/accountSummaries
|
列出使用者有權存取的帳戶摘要 (輕量型樹狀結構,由帳戶/資源/個人資料組成)。 |
帳戶使用者連結
若要進一步瞭解帳戶使用者連結資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/entityUserLinks/linkId
|
從指定帳戶中移除使用者。 |
insert |
POST /management/accounts/accountId/entityUserLinks
|
如果使用者的帳戶少於 100 個,就會將新使用者新增至指定帳戶。 |
list |
GET /management/accounts/accountId/entityUserLinks
|
列出特定帳戶的帳戶使用者連結。 |
更新 |
PUT /management/accounts/accountId/entityUserLinks/linkId
|
更新指定帳戶中現有使用者的權限。 |
帳戶
如要進一步瞭解 Accounts 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
list |
GET /management/accounts
|
列出使用者可存取的所有帳戶。 |
AdWords 連結
如要進一步瞭解 AdWords 連結資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks/webPropertyAdWordsLinkId
|
刪除網站資源 - AdWords 連結。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks/webPropertyAdWordsLinkId
|
傳回使用者有權存取的網站資源 - AdWords 連結。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks
|
建立 webProperty-AdWords 連結。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks
|
列出指定網站資源的 webProperty-AdWords 連結。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks/webPropertyAdWordsLinkId
|
更新現有的 webProperty-AdWords 連結。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/entityAdWordsLinks/webPropertyAdWordsLinkId
|
更新現有的 webProperty-AdWords 連結。 |
自訂資料來源
若要進一步瞭解自訂資料來源資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
list |
GET /management/accounts/accountId/webproperties/webPropertyId/customDataSources
|
列出使用者有權存取的自訂資料來源。 |
自訂維度
若要進一步瞭解自訂維度資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
get |
GET /management/accounts/accountId/webproperties/webPropertyId/customDimensions/customDimensionId
|
取得使用者有權存取的自訂維度。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/customDimensions
|
建立新的自訂維度。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/customDimensions
|
列出使用者有權存取的自訂維度。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/customDimensions/customDimensionId
|
更新現有的自訂維度。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/customDimensions/customDimensionId
|
更新現有的自訂維度。 |
自訂指標
如要進一步瞭解自訂指標資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
get |
GET /management/accounts/accountId/webproperties/webPropertyId/customMetrics/customMetricId
|
取得使用者有權存取的自訂指標。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/customMetrics
|
建立新的自訂指標。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/customMetrics
|
列出使用者有權存取的自訂指標。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/customMetrics/customMetricId
|
更新現有的自訂指標。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/customMetrics/customMetricId
|
更新現有的自訂指標。 |
實驗
若要進一步瞭解實驗資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments/experimentId
|
刪除實驗。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments/experimentId
|
傳回使用者有權存取的實驗。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments
|
建立新實驗。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments
|
列出使用者可以存取的實驗。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments/experimentId
|
更新現有實驗。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/experiments/experimentId
|
更新現有實驗。 |
篩選器
如需篩選器資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/filters/filterId
|
刪除篩選器。 |
get |
GET /management/accounts/accountId/filters/filterId
|
傳回使用者有權存取的篩選器。 |
insert |
POST /management/accounts/accountId/filters
|
建立新篩選器。 |
list |
GET /management/accounts/accountId/filters
|
列出帳戶的所有篩選器 |
修補 |
PATCH /management/accounts/accountId/filters/filterId
|
更新現有的篩選器。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/filters/filterId
|
更新現有的篩選器。 |
目標
若要進一步瞭解目標資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
get |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals/goalId
|
取得使用者可存取的目標。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals
|
建立新目標。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals
|
列出使用者可存取的目標。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals/goalId
|
更新現有目標。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/goals/goalId
|
更新現有目標。 |
用戶端 ID
如要進一步瞭解 Management.clientId 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
hashClientId |
POST /management/clientId:hashClientId
|
雜湊處理指定的用戶端 ID。 |
設定檔篩選器連結
如需設定檔篩選器連結資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks/linkId
|
刪除設定檔篩選器連結。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks/linkId
|
傳回單一設定檔篩選器連結。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks
|
建立新的設定檔篩選器連結。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks
|
列出商家檔案的所有商家檔案篩選器連結。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks/linkId
|
更新現有的設定檔篩選器連結。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks/linkId
|
更新現有的設定檔篩選器連結。 |
個人資料使用者連結
如需設定檔使用者連結資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/entityUserLinks/linkId
|
從指定的資料檢視 (設定檔) 中移除使用者。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/entityUserLinks
|
在指定資料檢視 (個人資料) 中新增使用者。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/entityUserLinks
|
列出特定資料檢視 (個人資料) 的個人資料使用者連結。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/entityUserLinks/linkId
|
更新指定資料檢視 (設定檔) 的現有使用者權限。 |
再行銷目標對象
若要進一步瞭解「再行銷目標對象資源」,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences/remarketingAudienceId
|
刪除再行銷目標對象。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences/remarketingAudienceId
|
取得使用者有權存取的再行銷目標對象。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences
|
建立新的再行銷目標對象。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences
|
列出使用者有權存取的再行銷目標對象。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences/remarketingAudienceId
|
更新現有的再行銷目標對象。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/remarketingAudiences/remarketingAudienceId
|
更新現有的再行銷目標對象。 |
區隔
若要進一步瞭解區隔資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
list |
GET /management/segments
|
列出使用者有權存取的區隔。 |
未取樣報表
若要進一步瞭解「未取樣報表資源」,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/unsampledReports/unsampledReportId
|
刪除未取樣報表。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/unsampledReports/unsampledReportId
|
傳回一份未取樣報表。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/unsampledReports
|
建立新的未取樣報表。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/unsampledReports
|
列出使用者有權存取的未取樣報表。 |
上傳
如要進一步瞭解上傳資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
deleteUploadData |
POST /management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/deleteUploadData
|
刪除與先前上傳作業相關的資料。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/uploads/uploadId
|
列出使用者有權存取的上傳內容。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/uploads
|
列出使用者有權存取的上傳內容。 |
uploadData |
POST
|
上傳自訂資料來源的資料。 |
資料檢視 (設定檔)
如要進一步瞭解檢視表 (設定檔) 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId
|
刪除資料檢視 (設定檔)。 |
get |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId
|
取得使用者有權存取的資料檢視 (設定檔)。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/profiles
|
建立新資料檢視 (設定檔)。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/profiles
|
列出使用者可以存取的資料檢視 (設定檔)。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId
|
更新現有的資料檢視 (設定檔)。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/profiles/profileId
|
更新現有的資料檢視 (設定檔)。 |
網站資源
若要進一步瞭解網站資源資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
get |
GET /management/accounts/accountId/webproperties/webPropertyId
|
取得使用者有權存取的屬性。 |
insert |
POST /management/accounts/accountId/webproperties
|
建立新資源。 |
list |
GET /management/accounts/accountId/webproperties
|
列出使用者有權存取的屬性。 |
修補 |
PATCH /management/accounts/accountId/webproperties/webPropertyId
|
更新現有的資源。這個方法支援修補程式語意。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId
|
更新現有的資源。 |
網站資源使用者連結
如要進一步瞭解網站資源使用者連結資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/analytics/v3 的 URI (除非另外註明) | ||
delete |
DELETE /management/accounts/accountId/webproperties/webPropertyId/entityUserLinks/linkId
|
從指定網站資源中移除使用者。 |
insert |
POST /management/accounts/accountId/webproperties/webPropertyId/entityUserLinks
|
在指定網站資源中新增使用者。 |
list |
GET /management/accounts/accountId/webproperties/webPropertyId/entityUserLinks
|
列出指定網站資源的 webProperty 使用者連結。 |
更新 |
PUT /management/accounts/accountId/webproperties/webPropertyId/entityUserLinks/linkId
|
更新指定網站資源上現有使用者的權限。 |