Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.
HTTP request
POST https://logging.googleapis.com/v2/entries:list
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "projectIds": [ string ], "resourceNames": [ string ], "filter": string, "orderBy": string, "pageSize": integer, "pageToken": string } |
Fields | |
---|---|
projectIds[] |
Optional. Deprecated. Use |
resource |
Required. Names of one or more parent resources from which to retrieve log entries. Resources may either be resource containers or specific
Projects listed in the Authorization requires one or more of the following IAM permissions on the specified resource
|
filter |
Optional. A filter that chooses which log entries to return. For more information, see Logging query language. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in To make queries faster, you can make the filter more selective by using restrictions on indexed fields as well as limit the time range of the query by adding range restrictions on the |
order |
Optional. How the results should be sorted. Presently, the only permitted values are We recommend setting the |
page |
Optional. The maximum number of results to return from this request. Default is 50. If the value is negative, the request is rejected. The presence of |
page |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
Response body
Result returned from entries.list
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"entries": [
{
object ( |
Fields | |
---|---|
entries[] |
A list of log entries. If |
next |
If there might be more results than those appearing in this response, then If a value for |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/logging.read
https://www.googleapis.com/auth/logging.admin
https://www.googleapis.com/auth/cloud-platform.read-only
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.