Skip to main content

security_reports

Creates, updates, deletes, gets or lists a security_reports resource.

Overview

Namesecurity_reports
TypeResource
Idgoogle.apigee.security_reports

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
createdstringCreation time of the query.
displayNamestringDisplay Name specified by the user.
envgroupHostnamestringHostname is available only when query is executed at host level.
errorstringError is set when query fails.
executionTimestringExecutionTime is available only after the query is completed.
queryParamsobjectContains information like metrics, dimenstions etc of the Security Report. (id: GoogleCloudApigeeV1SecurityReportMetadata)
reportDefinitionIdstringReport Definition ID.
resultobjectResult is available only after the query is completed. (id: GoogleCloudApigeeV1SecurityReportResultMetadata)
resultFileSizestringResultFileSize is available only after the query is completed.
resultRowsstring (int64)ResultRows is available only after the query is completed.
selfstringSelf link of the query. Example: /organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd or following format if query is running at host level: /organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd
statestringQuery state could be "enqueued", "running", "completed", "expired" and "failed".
updatedstringOutput only. Last updated timestamp for the query.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_security_reports_getselectorganizationsId, environmentsId, securityReportsIdGet security report status If the query is still in progress, the state is set to "running" After the query has completed successfully, state is set to "completed"
organizations_environments_security_reports_listselectorganizationsId, environmentsIdsubmittedBy, status, from, to, dataset, pageSize, pageTokenReturn a list of Security Reports
organizations_environments_security_reports_createinsertorganizationsId, environmentsIdSubmit a report request to be processed in the background. If the submission succeeds, the API returns a 200 status and an ID that refer to the report request. In addition to the HTTP status 200, the state of "enqueued" means that the request succeeded.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
organizationsIdstring
securityReportsIdstring
datasetstring
fromstring
pageSizeinteger (int32)
pageTokenstring
statusstring
submittedBystring
tostring

SELECT examples

Get security report status If the query is still in progress, the state is set to "running" After the query has completed successfully, state is set to "completed"

SELECT
created,
displayName,
envgroupHostname,
error,
executionTime,
queryParams,
reportDefinitionId,
result,
resultFileSize,
resultRows,
self,
state,
updated
FROM google.apigee.security_reports
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND securityReportsId = '{{ securityReportsId }}' -- required;

INSERT examples

Submit a report request to be processed in the background. If the submission succeeds, the API returns a 200 status and an ID that refer to the report request. In addition to the HTTP status 200, the state of "enqueued" means that the request succeeded.

INSERT INTO google.apigee.security_reports (
data__metrics,
data__dimensions,
data__timeRange,
data__filter,
data__groupByTimeUnit,
data__limit,
data__mimeType,
data__csvDelimiter,
data__envgroupHostname,
data__reportDefinitionId,
data__displayName,
organizationsId,
environmentsId
)
SELECT
'{{ metrics }}',
'{{ dimensions }}',
'{{ timeRange }}',
'{{ filter }}',
'{{ groupByTimeUnit }}',
{{ limit }},
'{{ mimeType }}',
'{{ csvDelimiter }}',
'{{ envgroupHostname }}',
'{{ reportDefinitionId }}',
'{{ displayName }}',
'{{ organizationsId }}',
'{{ environmentsId }}'
RETURNING
created,
displayName,
envgroupHostname,
error,
executionTime,
queryParams,
reportDefinitionId,
result,
resultFileSize,
resultRows,
self,
state,
updated
;