Optional. The location level of the reservations usage timeseries.
machineFamily
string
The machine family for the UsageHistory values to return. Possible values include "n1", and "n2d". See https://cloud.google.com/compute/docs/machine-types for more examples. Empty machineFamily will return results matching all machine families.
Optional. The machine shape for the UsageHistory values to return.
diskType
string
Optional. The diskType for the UsageHistory values to return request with persistent-disk cloudResourceType. Empty diskType will return results matching all disk types.
gpuType
string
Optional. The GPU type for the UsageHistory values to return. Sample values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See https://cloud.google.com/compute/docs/gpus for a list. Empty gpuType will return results matching all GPUs.
tpuType
string
Optional. The TPU type for the UsageHistory values to return. Empty tpuType will return results matching all TPUs.
cloudResourceType
string
The resource for the UsageHistory values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloudResourceType will return results matching all resources.
The method that should be used to convert sampled usage data to daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results matching all the aggregation methods.
[[["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-08-29 UTC."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nReturns a list of the usage histories that are in the parent parameter and match your specified filters.\n\nHTTP request\n\n`POST https://capacityplanner.googleapis.com/v1beta/{parent=organizations/*/locations/*}/usageHistories:query`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"locationLevel\": enum (/capacity-planner/docs/reference/rest/v1beta/LocationType), \"machineFamily\": string, \"machineShape\": { object (/capacity-planner/docs/reference/rest/v1beta/MachineShape) }, \"diskType\": string, \"gpuType\": string, \"tpuType\": string, \"cloudResourceType\": string, \"usageAggregationMethod\": enum (/capacity-planner/docs/reference/rest/v1beta/AggregationMethod), \"startDate\": { object (/capacity-planner/docs/reference/rest/v1beta/Date) }, \"endDate\": { object (/capacity-planner/docs/reference/rest/v1beta/Date) } } ``` |\n\n| Fields ||\n|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locationLevel` | `enum (`[LocationType](/capacity-planner/docs/reference/rest/v1beta/LocationType)`)` Optional. The location level of the reservations usage timeseries. |\n| `machineFamily` | `string` The machine family for the `UsageHistory` values to return. Possible values include \"n1\", and \"n2d\". See \u003chttps://cloud.google.com/compute/docs/machine-types\u003e for more examples. Empty machineFamily will return results matching all machine families. |\n| `machineShape` | `object (`[MachineShape](/capacity-planner/docs/reference/rest/v1beta/MachineShape)`)` Optional. The machine shape for the `UsageHistory` values to return. |\n| `diskType` | `string` Optional. The diskType for the `UsageHistory` values to return request with persistent-disk cloudResourceType. Empty diskType will return results matching all disk types. |\n| `gpuType` | `string` Optional. The GPU type for the `UsageHistory` values to return. Sample values are \"nvidia-tesla-t4\", and \"nvidia-tesla-a100\". See \u003chttps://cloud.google.com/compute/docs/gpus\u003e for a list. Empty gpuType will return results matching all GPUs. |\n| `tpuType` | `string` Optional. The TPU type for the `UsageHistory` values to return. Empty tpuType will return results matching all TPUs. |\n| `cloudResourceType` | `string` The resource for the `UsageHistory` values to return. Possible values include \"gce-vcpus\", \"gce-ram\", \"gce-local-ssd\", \"gce-persistent-disk\", \"gce-gpu\" and \"gce-tpu\". Empty cloudResourceType will return results matching all resources. |\n| `usageAggregationMethod` | `enum (`[AggregationMethod](/capacity-planner/docs/reference/rest/v1beta/AggregationMethod)`)` The method that should be used to convert sampled usage data to daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results matching all the aggregation methods. |\n| `startDate` | `object (`[Date](/capacity-planner/docs/reference/rest/v1beta/Date)`)` Optional. The start date of reservations usage. |\n| `endDate` | `object (`[Date](/capacity-planner/docs/reference/rest/v1beta/Date)`)` Optional. The end date of reservations usage. |\n\nResponse body\n\nIf successful, the response body contains an instance of [QueryUsageHistoriesResponse](/capacity-planner/docs/reference/rest/v1beta/QueryUsageHistoriesResponse).\n\nAuthorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/devstorage.full_control`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nIAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `capacityplanner.usageHistories.list`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]