v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1320145229.2 KB
v1

Issue a job that queries assets using a SQL statement compatible with BigQuery SQL. If the query execution finishes within timeout and there's no pagination, the full query results will be returned in the QueryAssetsResponse. Otherwise, full query results can be obtained by issuing extra requests with the job_reference from the a previous QueryAssets call. Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.

post/v1/{+parent}:queryAssets

Path parameters

parentstring required

Required. The relative name of the root asset. This 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"), or a folder number (such as "folders/123"). Only assets belonging to the parent will be returned.

Request body

readTimestring google-datetime

Optional. Queries cloud assets as they appeared at the specified point in time.

statementstring

Optional. A SQL statement that's compatible with BigQuery SQL.

timeoutstring google-duration

Optional. Specifies the maximum amount of time that the client is willing to wait for the query to complete. By default, this limit is 5 min for the first query, and 1 minute for the following queries. If the query is complete, the done field in the QueryAssetsResponse is true, otherwise false. Like BigQuery jobs.query API The call is not guaranteed to wait for the specified timeout; it typically returns after around 200 seconds (200,000 milliseconds), even if the query is not complete. The field will be ignored when [output_config] is specified.

pageTokenstring

Optional. A page token received from previous QueryAssets. The field will be ignored when [output_config] is specified.

jobReferencestring

Optional. Reference to the query job, which is from the QueryAssetsResponse of previous QueryAssets call.

pageSizeinteger

Optional. The maximum number of rows to return in the results. Responses are limited to 10 MB and 1000 rows. By default, the maximum row count is 1000. When the byte or row count limit is reached, the rest of the query results will be paginated. The field will be ignored when [output_config] is specified.

Response

Successful response