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 |
resourceNames[] |
Required. Names of one or more parent resources from which to retrieve log entries:
May alternatively be one or more views:
Projects listed in the Authorization requires one or more of the following IAM permissions on the specified resource
|
filter |
Optional. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in |
orderBy |
Optional. How the results should be sorted. Presently, the only permitted values are |
pageSize |
Optional. The maximum number of results to return from this request. Default is 50. If the value is negative or exceeds 1000, the request is rejected. The presence of |
pageToken |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
Response body
If successful, the response body contains data with the following structure:
Result returned from entries.list
.
JSON representation |
---|
{
"entries": [
{
object ( |
Fields | |
---|---|
entries[] |
A list of log entries. If |
nextPageToken |
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.