Skip to main content

api_observations

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

Overview

Nameapi_observations
TypeResource
Idgoogle.apim.api_observations

Fields

NameDatatypeDescription
namestringIdentifier. Name of resource
apiOperationCountstringThe number of observed API Operations.
createTimestringCreate time stamp
hostnamestringThe hostname of requests processed for this Observation.
lastEventDetectedTimestringLast 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
updateTimestringUpdate time stamp

Methods

NameAccessible byRequired ParamsDescription
getSELECTapiObservationsId, locationsId, observationJobsId, projectsIdGetApiObservation retrieves a single ApiObservation by name.
listSELECTlocationsId, observationJobsId, projectsIdListApiObservations gets all ApiObservations for a given project and location and ObservationJob.
batch_edit_tagsEXEClocationsId, observationJobsId, projectsIdBatchEditTagsApiObservations adds or removes Tags for ApiObservations.

SELECT examples

ListApiObservations gets all ApiObservations for a given project and location and ObservationJob.

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