Skip to main content

api_observations

Creates, updates, deletes, gets or lists an api_observations resource.

Overview

Nameapi_observations
TypeResource
Idgoogle.apim.api_observations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of resource
apiOperationCountstring (int64)The number of observed API Operations.
createTimestring (google-datetime)Create time stamp
hostnamestringThe hostname of requests processed for this Observation.
lastEventDetectedTimestring (google-datetime)Last event detected time stamp
serverIpsarrayThe IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
sourceLocationsarrayLocation of the Observation Source, for example "us-central1" or "europe-west1."
stylestringStyle of ApiObservation
tagsarrayUser-defined tags to organize and sort
updateTimestring (google-datetime)Update time stamp

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, observationJobsId, apiObservationsIdGetApiObservation retrieves a single ApiObservation by name.
listselectprojectsId, locationsId, observationJobsIdpageSize, pageTokenListApiObservations gets all ApiObservations for a given project and location and ObservationJob.
batch_edit_tagsexecprojectsId, locationsId, observationJobsIdBatchEditTagsApiObservations adds or removes Tags for ApiObservations.

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
apiObservationsIdstring
locationsIdstring
observationJobsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

GetApiObservation retrieves a single ApiObservation by name.

SELECT
name,
apiOperationCount,
createTime,
hostname,
lastEventDetectedTime,
serverIps,
sourceLocations,
style,
tags,
updateTime
FROM google.apim.api_observations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND observationJobsId = '{{ observationJobsId }}' -- required
AND apiObservationsId = '{{ apiObservationsId }}' -- required;

Lifecycle Methods

BatchEditTagsApiObservations adds or removes Tags for ApiObservations.

EXEC google.apim.api_observations.batch_edit_tags 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@observationJobsId='{{ observationJobsId }}' --required
@@json=
'{
"requests": "{{ requests }}"
}';