REST Resource: organizations.locations.recentQueries

Resource: RecentQuery

Describes a recent query executed on the Logs Explorer or Log Analytics page within the last ~ 30 days.

JSON representation
{
  "name": string,
  "lastRunTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "loggingQuery": {
    object (LoggingQuery)
  },
  "opsAnalyticsQuery": {
    object (OpsAnalyticsQuery)
  }
  // End of mutually exclusive fields.
}
Fields
name

string

Output only. Resource name of the recent query.

In the format:

"projects/[PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]"

For a list of supported locations, see Supported Regions

The [QUERY_ID] is a system generated alphanumeric ID.

lastRunTime

string (Timestamp format)

Output only. The timestamp when this query was last run.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

The query that was executed. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
loggingQuery

object (LoggingQuery)

Logging query that can be executed in Logs Explorer or via Logging API.

opsAnalyticsQuery

object (OpsAnalyticsQuery)

Analytics query that can be executed in Log Analytics.

End of mutually exclusive fields.

Methods

list

Lists the RecentQueries that were created by the user making the request.