顧客の使用状況レポート は、ドメイン全体のすべてのユーザーの Google Workspace サービス使用状況に関する情報を集約します。 ユーザーの使用状況レポートでは、アカウント全体の Google Workspace サービスの使用状況に関する情報が返されます。 この使用状況に関する情報は、アプリケーション固有のパラメータで構成されるアプリケーション タイプ別にまとめられています。 各レポートのデフォルトおよび最長期間は過去 450 日間です。
これらの使用状況レポートは、顧客契約に従い、合法的な目的でのみ使用することができます。また、 レポートが Google Workspace と Education に適用されます。
顧客の使用状況レポートを取得する
アカウント アクティビティのレポートを取得するには、次の GET
HTTP リクエストを使用し、認証トークンを含めます。
承認に関するドキュメントに記載されている読みやすくするために
次の例では、改行コードが返されます。
GET https://admin.googleapis.com/admin/reports/v1/usage/dates/yyyy-mm-dd date ?parameters=app name: usage parameter,... &customerId=the customer's ID &maxResults=number of events listed on each page of the report
dates
値は使用が発生した日付で、タイムスタンプは ISO 8601 形式(yyyy-mm-dd)です。アカウントのタイムゾーンを使用することをおすすめします。リクエストのクエリ文字列とレスポンス プロパティの詳細については、API リファレンスと顧客使用状況レポートのパラメータ リファレンスをご覧ください。
次の例では、過去 30 日間に成功したアカウントへのすべてのログインの合計と、そのリストを含むレポートを取得します。
2013 年 3 月 3 日以降、アプリケーションごとのユーザー承認数を含む、承認済みアプリケーションの数。maxResults
クエリ文字列によると、このレポートはレポートページごとに 2 つのイベントを返します。
GET https://admin.googleapis.com/admin/reports/v1/usage/dates/2013-03-03 ?parameters=accounts:num_30day_logins%2Caccounts:authorized_apps&maxResults=2
顧客の使用状況レポートの JSON レスポンス
{
"kind": "reports#usageReports",
"warnings": [
{
"code": warning machine-readable code,
"message": warning human-readable message,
"data": [
{
"key": key for key-value pair that gives detailed warning information,
"value": value for key-value pair giving detailed warning information
}
]
}
],
"nextPageToken": "N:NNN:NNN:N:C03az79cb",
"usageReports": [
{
"kind": "usageReport",
"date": "2013-03-03",
"entity": {
"type": "CUSTOMER",
"customerId": "C03az79cb"
},
"parameters": [
{
"name": "accounts:num_1day_logins",
"intValue": "1"
},
{
"name": "accounts:num_30day_logins",
"intValue": "1"
},
{
"name": "accounts:num_7day_logins",
"intValue": "1"
},
{
"name": "accounts:num_disabled_accounts",
"intValue": "5"
},
{
"name": "accounts:authorized_apps",
"msgValue": [
{
"client_id": "1234.apps.googleusercontent.com",
"client_name": "www.example.com",
"num_users": 2
},
{
"client_id": "4567.apps.googleusercontent.com",
"client_name": "Example",
"num_users": 1
},
...
]
}
]
}
]
}