Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
HTTP request
GET https://cloudasset.googleapis.com/v1/{parent=*/*}:batchGetAssetsHistory
Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").
Authorization requires one or more of the following IAM permissions on the specified resource parent:
Optional. The time window for the asset history. Both startTime and endTime are optional and if set, it must be after the current time minus 35 days. If endTime is not set, it is default to current timestamp. If startTime is not set, the snapshot of the assets at endTime will be returned. The returned results contain all temporal assets whose time window overlap with readTimeWindow.
relationshipTypes[]
string
Optional. A list of relationship types to output, for example: INSTANCE_TO_INSTANCEGROUP. This field should only be specified if contentType=RELATIONSHIP. * If specified: it outputs specified relationships' history on the [assetNames]. It returns an error if any of the [relationshipTypes] doesn't belong to the supported relationship types of the [assetNames] or if any of the [assetNames]'s types doesn't belong to the source types of the [relationshipTypes]. * Otherwise: it outputs the supported relationships' history on the [assetNames] or returns an error if any of the [assetNames]'s types has no relationship support. See Introduction to Cloud Asset Inventory for all supported asset types and relationship types.
Request body
The request body must be empty.
Response body
Batch get assets history response.
If successful, the response body contains data with the following structure:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-30 UTC."],[[["\u003cp\u003eThis API allows users to batch retrieve the update history of assets within a specified time window, including data on asset existence and any attached IAM policies.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for this operation is a \u003ccode\u003eGET\u003c/code\u003e method, utilizing a URL that follows gRPC Transcoding syntax with a required \u003ccode\u003eparent\u003c/code\u003e path parameter specifying the root asset (e.g., organization or project).\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify various query parameters, such as \u003ccode\u003eassetNames[]\u003c/code\u003e to filter the history for specific assets, \u003ccode\u003econtentType\u003c/code\u003e to define the type of content, \u003ccode\u003ereadTimeWindow\u003c/code\u003e to define a time window, and \u003ccode\u003erelationshipTypes[]\u003c/code\u003e for relationship history.\u003c/p\u003e\n"],["\u003cp\u003eThe response body contains an array of \u003ccode\u003eTemporalAsset\u003c/code\u003e objects, each providing a snapshot of an asset's state at a given time, along with details on whether the asset was deleted and its prior state, along with prior asset data if present.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be empty for this request to function properly.\u003c/p\u003e\n"]]],[],null,["# Method: batchGetAssetsHistory\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetAssetsHistoryResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [TemporalAsset](#TemporalAsset)\n - [JSON representation](#TemporalAsset.SCHEMA_REPRESENTATION)\n- [PriorAssetState](#PriorAssetState)\n- [Try it!](#try-it)\n\nBatch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.\n\n### HTTP request\n\n`GET https://cloudasset.googleapis.com/v1/{parent=*/*}:batchGetAssetsHistory`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nBatch get assets history response.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nTemporalAsset\n-------------\n\nAn asset in Google Cloud and its temporal metadata, including the time window when it was observed and its status during that window.\n\nPriorAssetState\n---------------\n\nState of prior asset."]]