security_reports
Creates, updates, deletes, gets or lists a security_reports
resource.
Overview
Name | security_reports |
Type | Resource |
Id | google.apigee.security_reports |
Fields
The following fields are returned by SELECT
queries:
- organizations_environments_security_reports_get
- organizations_environments_security_reports_list
Successful response
Name | Datatype | Description |
---|---|---|
created | string | Creation time of the query. |
displayName | string | Display Name specified by the user. |
envgroupHostname | string | Hostname is available only when query is executed at host level. |
error | string | Error is set when query fails. |
executionTime | string | ExecutionTime is available only after the query is completed. |
queryParams | object | Contains information like metrics, dimenstions etc of the Security Report. (id: GoogleCloudApigeeV1SecurityReportMetadata) |
reportDefinitionId | string | Report Definition ID. |
result | object | Result is available only after the query is completed. (id: GoogleCloudApigeeV1SecurityReportResultMetadata) |
resultFileSize | string | ResultFileSize is available only after the query is completed. |
resultRows | string (int64) | ResultRows is available only after the query is completed. |
self | string | Self 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 |
state | string | Query state could be "enqueued", "running", "completed", "expired" and "failed". |
updated | string | Output only. Last updated timestamp for the query. |
Successful response
Name | Datatype | Description |
---|---|---|
created | string | Creation time of the query. |
displayName | string | Display Name specified by the user. |
envgroupHostname | string | Hostname is available only when query is executed at host level. |
error | string | Error is set when query fails. |
executionTime | string | ExecutionTime is available only after the query is completed. |
queryParams | object | Contains information like metrics, dimenstions etc of the Security Report. (id: GoogleCloudApigeeV1SecurityReportMetadata) |
reportDefinitionId | string | Report Definition ID. |
result | object | Result is available only after the query is completed. (id: GoogleCloudApigeeV1SecurityReportResultMetadata) |
resultFileSize | string | ResultFileSize is available only after the query is completed. |
resultRows | string (int64) | ResultRows is available only after the query is completed. |
self | string | Self 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 |
state | string | Query state could be "enqueued", "running", "completed", "expired" and "failed". |
updated | string | Output only. Last updated timestamp for the query. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_environments_security_reports_get | select | organizationsId , environmentsId , securityReportsId | 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" | |
organizations_environments_security_reports_list | select | organizationsId , environmentsId | submittedBy , status , from , to , dataset , pageSize , pageToken | Return a list of Security Reports |
organizations_environments_security_reports_create | insert | organizationsId , environmentsId | 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. |
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.
Name | Datatype | Description |
---|---|---|
environmentsId | string | |
organizationsId | string | |
securityReportsId | string | |
dataset | string | |
from | string | |
pageSize | integer (int32) | |
pageToken | string | |
status | string | |
submittedBy | string | |
to | string |
SELECT
examples
- organizations_environments_security_reports_get
- organizations_environments_security_reports_list
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;
Return a list of Security Reports
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 submittedBy = '{{ submittedBy }}'
AND status = '{{ status }}'
AND from = '{{ from }}'
AND to = '{{ to }}'
AND dataset = '{{ dataset }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- organizations_environments_security_reports_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: security_reports
props:
- name: organizationsId
value: string
description: Required parameter for the security_reports resource.
- name: environmentsId
value: string
description: Required parameter for the security_reports resource.
- name: metrics
value: array
description: >
A list of Metrics.
- name: dimensions
value: array
description: >
A list of dimensions. https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions
- name: timeRange
value: any
description: >
Required. Time range for the query. Can use the following predefined strings to specify the time range: `last60minutes` `last24hours` `last7days` Or, specify the timeRange as a structure describing start and end timestamps in the ISO format: yyyy-mm-ddThh:mm:ssZ. Example: "timeRange": { "start": "2018-07-29T00:13:00Z", "end": "2018-08-01T00:18:00Z" }
- name: filter
value: string
description: >
Boolean expression that can be used to filter data. Filter expressions can be combined using AND/OR terms and should be fully parenthesized to avoid ambiguity. See Analytics metrics, dimensions, and filters reference https://docs.apigee.com/api-platform/analytics/analytics-reference for more information on the fields available to filter on. For more information on the tokens that you use to build filter expressions, see Filter expression syntax. https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax
- name: groupByTimeUnit
value: string
description: >
Time unit used to group the result set. Valid values include: second, minute, hour, day, week, or month. If a query includes groupByTimeUnit, then the result is an aggregation based on the specified time unit and the resultant timestamp does not include milliseconds precision. If a query omits groupByTimeUnit, then the resultant timestamp includes milliseconds precision.
- name: limit
value: integer
description: >
Maximum number of rows that can be returned in the result.
- name: mimeType
value: string
description: >
Valid values include: `csv` or `json`. Defaults to `json`. Note: Configure the delimiter for CSV output using the csvDelimiter property.
- name: csvDelimiter
value: string
description: >
Delimiter used in the CSV file, if `outputFormat` is set to `csv`. Defaults to the `,` (comma) character. Supported delimiter characters include comma (`,`), pipe (`|`), and tab (`\t`).
- name: envgroupHostname
value: string
description: >
Hostname needs to be specified if query intends to run at host level. This field is only allowed when query is submitted by CreateHostSecurityReport where analytics data will be grouped by organization and hostname.
- name: reportDefinitionId
value: string
description: >
Report Definition ID.
- name: displayName
value: string
description: >
Security Report display name which users can specify.