Skip to main content

discovered_api_observations

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

Overview

Namediscovered_api_observations
TypeResource
Idgoogle.apihub.discovered_api_observations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the discovered API Observation. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
apiOperationCountstring (int64)Optional. The number of observed API Operations.
createTimestring (google-datetime)Output only. Create time stamp of the observation in API Hub.
hostnamestringOptional. The hostname of requests processed for this Observation.
knownOperationsCountstring (int64)Output only. The number of known API Operations.
lastEventDetectedTimestring (google-datetime)Optional. Last event detected time stamp
originstringOptional. For an observation pushed from a gcp resource, this would be the gcp project id.
serverIpsarrayOptional. The 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".
sourceLocationsarrayOptional. The location of the observation source.
sourceMetadataobjectSourceMetadata represents the metadata for a resource at the source. (id: GoogleCloudApihubV1SourceMetadata)
sourceTypesarrayOptional. The type of the source from which the observation was collected.
stylestringOptional. Style of ApiObservation
unknownOperationsCountstring (int64)Output only. The number of unknown API Operations.
updateTimestring (google-datetime)Output only. Update time stamp of the observation in API Hub.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, discoveredApiObservationsIdGets a DiscoveredAPIObservation in a given project, location and ApiObservation.
listselectprojectsId, locationsIdpageSize, pageTokenLists all the DiscoveredAPIObservations in a given project and location.

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

SELECT examples

Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.

SELECT
name,
apiOperationCount,
createTime,
hostname,
knownOperationsCount,
lastEventDetectedTime,
origin,
serverIps,
sourceLocations,
sourceMetadata,
sourceTypes,
style,
unknownOperationsCount,
updateTime
FROM google.apihub.discovered_api_observations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND discoveredApiObservationsId = '{{ discoveredApiObservationsId }}' -- required;