Reports API: エンティティ使用状況レポート
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
エンティティ使用状況レポートでは、エンティティに関連する Google Workspace サービスのアクティビティが返されます。
自動的に表示されます。これらのレポートは、特定の使用状況でカスタマイズしたりフィルタしたりできます。
情報です。過去 30 日間のデータを利用できます。
エンティティの使用状況レポートは、
。これらのレポートは
Google Workspace と Education。
すべてのエンティティ使用状況アクティビティを取得する
現在、この API でサポートされているエンティティ タイプは Google+ コミュニティのみです。取得するには、
アカウントのアプリ エンティティに関連するすべてのアクティビティのレポートを作成するには、以下を使用します。
GET
HTTP リクエストを作成し、次で説明されている認証トークンを含めます。
承認に関するドキュメントをご覧ください。対象
次の例では、改行が挿入されます。
GET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/date
?parameters=applicationParameters
&filters=parameterFilters
&maxResults=maxResults
date 値は使用が発生した日付で、タイムスタンプは
ISO 8601 形式(yyyy-mm-dd)。おすすめの方法
アカウントのタイムゾーンを使用しますクエリ文字列パラメータの詳細と、
レスポンスのプロパティについては、API
リファレンスをご覧ください。エンティティ使用状況レポートのパラメータについては、
エンティティ使用パラメータ
参照をご覧ください。
applicationParameters は、取得するパラメータのカンマ区切りのリストです。
各パラメータは application:parameter_name
の形式になります。たとえば、
gplus:community_name
。使用可能なパラメータについては、
エンティティ使用パラメータ
参照をご覧ください。パラメータが指定されていない場合は、すべてが返されます。
parameterFilters は、結果に適用するフィルタのカンマ区切りのリストです。各
次の形式になります:
application:parameter_name[relational_operator]parameter_value
。たとえば、
フィルタ gplus:num_total_members>100
は、結果のみを含むように結果をフィルタリングします
ここで、gplus:num_total_members
パラメータの値は 100 を超えています。
maxResults は、1 回の取得で返す結果の最大数です。もし
結果の数がこの値より多い場合、レスポンスは切り捨てられ、
nextPageToken
が含まれます(詳しくは
JSON レスポンスの例をご覧ください)。
例
次の例では、すべてのパラメータを含むレポートを取得しています
(すべての gplus_communities
エンティティに対して適用)
GET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all
/dates/2017-12-11
次の例では、community_name
パラメータを含むレポートを取得しています
(すべての gplus_communities
エンティティに対して適用)
GET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all
/dates/2017-12-11?parameters=gplus:community_name
次の例では、community_name
と
gplus_communities
エンティティごとに num_total_members
、次でフィルタ
コミュニティがあります。API レスポンスの例については、このモジュールの
JSON レスポンスの例
GET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-11
?parameters=gplus:community_name,gplus:num_total_members&filters=gplus:num_total_members>100
特定のエンティティのレポートを取得する
特定のエンティティのレポートを取得するには、次の GET
HTTP リクエストを使用します。
認証トークンを含めます。
承認に関するドキュメントをご覧ください。対象
次の例では、改行が挿入されています。
GET https://admin.googleapis.com/admin/reports/v1/gplus_communities/entityKey/dates/date
?parameters=applicationParameters
&filters=parameterFilters
&maxResults=maxResults
entityKey は、アプリケーションに固有のエンティティ ID です。
存続します。API
取得するエンティティの entityKey を取得する方法については、リファレンスをご覧ください。
フィルタできます。その他のパラメータについては、前述の「
すべてのエンティティ使用状況アクティビティを取得します。
クエリ文字列パラメータとレスポンス プロパティの詳細については、API リファレンスをご覧ください。詳細情報
エンティティ使用状況レポートのパラメータの詳細については、
エンティティ使用パラメータ
参照をご覧ください。
例
次の例では、次のフィールドを含む gplus_community
エンティティのエンティティ レポートを取得しています。
entityKey 「1234」。
https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/1234/dates/2017-12-11
使用状況レポートの JSON レスポンスの例
成功すると、HTTP 200 ステータス コードが返されます。さらに
ステータス コードが返された場合、レスポンスはレポートを返します。レスポンスに含まれるパラメータのいくつかを
読みやすくするために省略します。
エンティティ レポートの JSON レスポンスの例
{
"kind": "reports#usageReports",
"nextPageToken": "NjQ1OTgwODk0MzkxNDAwNjQ0OA",
"usageReports": [
{
"kind": "admin#reports#usageReport",
"date": "2017-12-11",
"entity": {
"type": "OBJECT",
"customerId": "C03az79cb",
"objectType": "GPLUS_COMMUNITY",
"objectId": "1234",
},
"parameters": [
{
"name": "gplus:community_name",
"stringValue": "My Community"
},
{
"name": "gplus:num_total_members",
"intValue": 37
},
{
"name": "gplus:num_7day_active_members",
"intValue": 12
},
{
"name": "gplus:num_30day_active_members",
"intValue": 17
},
]
}
]
}
警告を含むエンティティ レポートの JSON レスポンスの例
リクエストを処理できない場合、レスポンスで 1 つ以上の警告が返されることがあります。この
要求が行われた時点ではレポートが利用できない場合などです。
{
"kind": "reports#usageReports",
"warnings": [
{
"code": "PARTIAL_DATA_AVAILABLE"
"message": "Data for date 2017-12-11 for application gplus is not available right now, please try again after a few hours."
"data": [
{
"key": "date"
"value": "2017-12-11"
}
]
}
],
"usageReports": [],
}
warnings
配列の各エントリには次のパラメータがあります。
<ph type="x-smartling-placeholder"></ph>
code
: 機械判読可能な警告コード
message
: 人が読める形式の警告メッセージ
data
: 詳細な警告情報を提供する Key-Value ペアのリスト
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[],[],null,["# Reports API: Entities Usage Report\n\nThe entities usage report returns Google Workspace service activities related to entities\nused by your account's users. These reports can be customized and filtered for specific usage\ninformation. Data is available for the past 30 days.\n\nThe entities usage report may be used only for lawful purposes in\naccordance with your Customer Agreement. These reports also apply to\nGoogle Workspace and Education.\n\nRetrieve all entities usage activities\n--------------------------------------\n\nCurrently, the only entity type supported by this API is Google+ communities. To retrieve a\nreport of all activities related to app entities in your account, use the following\n`GET` HTTP request and include the authorization token described in the\n[authorization documentation](/workspace/admin/reports/v1/guides/authorizing). For\nreadability, the following example is formatted with line returns: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/date\n?parameters=applicationParameters\n&filters=parameterFilters\n&maxResults=maxResults\n```\n\nThe \u003cvar translate=\"no\"\u003edate\u003c/var\u003e value is the date the usage occurred and the timestamp is in the\n[ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601), yyyy-mm-dd. We recommend you\nuse your account's time zone for this. For more information about the query string parameters and\nresponse properties, see the [API\nReference](/workspace/admin/reports/v1/reference/entityUsageReports/get). For information about the entities usage report parameters, see the\n[Entities Usage Parameters\nreference](/workspace/admin/reports/v1/reference/usage-ref-appendix-a/entities).\n\n\u003cvar translate=\"no\"\u003eapplicationParameters\u003c/var\u003e is a comma-separated list of parameters you wish to retrieve.\nEach parameter is formatted as `application:parameter_name`, for example,\n`gplus:community_name`. The available parameters are documented in the\n[Entities Usage Parameters\nreference](/workspace/admin/reports/v1/reference/usage-ref-appendix-a/entities). If no parameters are specified, all are returned.\n\n\u003cvar translate=\"no\"\u003eparameterFilters\u003c/var\u003e is a comma-separated list of filters to apply to the results. Each\nfilter is formatted as\n`application:parameter_name[relational_operator]parameter_value`. For example, the\nfilter `gplus:num_total_members\u003e100` filters the results to contain only results\nwhere the `gplus:num_total_members` parameter has a value greater than 100.\n\n\u003cvar translate=\"no\"\u003emaxResults\u003c/var\u003e is the maximum number of results to return in a single fetch. If the total\nnumber of results is greater than this, the response will be truncated and a\n`nextPageToken` will be included (see the\n[JSON response example](#example_response) below).\n\n### Examples\n\nThe following example gets a report containing all parameters\nfor all `gplus_communities` entities. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all\n/dates/2017-12-11\n```\n\nThe following example gets a report containing the `community_name` parameter\nfor all `gplus_communities` entities. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all\n/dates/2017-12-11?parameters=gplus:community_name\n```\n\nThe following example gets a report of `community_name` and\n`num_total_members` for each `gplus_communities` entity, filtered by\ncommunities with more than 100 members. For an example of an API response, see the\n[JSON response example](#example_response). \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-11\n?parameters=gplus:community_name,gplus:num_total_members&filters=gplus:num_total_members\u003e100\n```\n\nRetrieve a report for a specific entity\n---------------------------------------\n\nTo retrieve a report for a specific entity, use the following `GET` HTTP request and\ninclude the authorization token described in the\n[authorization documentation](/workspace/admin/reports/v1/guides/authorizing). For\nreadability, the following example is formatted with line returns. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/gplus_communities/entityKey/dates/date\n?parameters=applicationParameters\n&filters=parameterFilters\n&maxResults=maxResults\n```\n\nThe \u003cvar translate=\"no\"\u003eentityKey\u003c/var\u003e is an entity identifier which is specific to the application where the\nentity lives. See the [API\nReference](/workspace/admin/reports/v1/reference/userUsageReport/get) for details on how to obtain the \u003cvar translate=\"no\"\u003eentityKey\u003c/var\u003e for the particular entity you\nare interested in. The other parameters are documented above under\n[Retrieve all entities usage activities](#get_all_entities_usage).\n\nFor more information about the query string parameters and response properties, see the [API Reference](/workspace/admin/reports/v1/reference/userUsageReport/get). For information\nabout the entities usage report parameters, see the\n[Entities Usage Parameters\nreference](/workspace/admin/reports/v1/reference/usage-ref-appendix-a/users).\n\n### Examples\n\nThe following example gets the entity report for a `gplus_community` entity with the\n\u003cvar translate=\"no\"\u003eentityKey\u003c/var\u003e \"1234\". \n\n```\nhttps://admin.googleapis.com/admin/reports/v1/usage/gplus_communities/1234/dates/2017-12-11\n```\n\nUsage report example JSON response\n----------------------------------\n\nA successful response returns an [HTTP 200 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes). Along with\nthe status code, the response returns a report. Some of the parameters in the response have been\nomitted for readability.\n\n#### Example JSON response for entities report\n\n```carbon\n{\n \"kind\": \"reports#usageReports\",\n \"nextPageToken\": \"NjQ1OTgwODk0MzkxNDAwNjQ0OA\",\n \"usageReports\": [\n {\n \"kind\": \"admin#reports#usageReport\",\n \"date\": \"2017-12-11\",\n \"entity\": {\n \"type\": \"OBJECT\",\n \"customerId\": \"C03az79cb\",\n \"objectType\": \"GPLUS_COMMUNITY\",\n \"objectId\": \"1234\",\n },\n \"parameters\": [\n {\n \"name\": \"gplus:community_name\",\n \"stringValue\": \"My Community\"\n },\n {\n \"name\": \"gplus:num_total_members\",\n \"intValue\": 37\n },\n {\n \"name\": \"gplus:num_7day_active_members\",\n \"intValue\": 12\n },\n {\n \"name\": \"gplus:num_30day_active_members\",\n \"intValue\": 17\n },\n ]\n }\n ]\n}\n```\n\n#### Example JSON response for entities report with warnings\n\nOne or more warnings may be returned in the response if the request cannot be fulfilled. In this example, the report is not available at the time the request is made. \n\n```scdoc\n{\n \"kind\": \"reports#usageReports\",\n \"warnings\": [\n {\n \"code\": \"PARTIAL_DATA_AVAILABLE\"\n \"message\": \"Data for date 2017-12-11 for application gplus is not available right now, please try again after a few hours.\"\n \"data\": [\n {\n \"key\": \"date\"\n \"value\": \"2017-12-11\"\n }\n ]\n }\n ],\n \"usageReports\": [],\n}\n```\nEach entry in the `warnings` array has the following parameters:\n\n- `code`: machine-readable warning code\n- `message`: human-readable warning message\n- `data`: list of key-value pairs which give detailed warning information"]]