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, seeExporting Logs.
HTTP request
POST https://logging.googleapis.com/v2/entries:list
Optional. Deprecated. UseresourceNames instead. One or more project identifiers or project numbers from which to retrieve log entries. Example:"my-project-1A".
resourceNames[]
string
Required. Names of one or more parent resources from which to retrieve log entries. Resources may either be resource containers or specificLogViews. For the case of resource containers, all logs ingested into that container will be returned regardless of whichLogBuckets they are actually stored in - i.e. these queries may fan out to multiple regions. In the event of region unavailability, specify a specific set ofLogViews that do not include the unavailable region.
Projects listed in theprojectIds field are added to this list. A maximum of 100 resources may be specified in a single request.
Authorization requires one or more of the followingIAM permissions on the specified resourceresourceNames:
logging.logEntries.list
logging.privateLogEntries.list
logging.views.access
filter
string
Optional. A filter that chooses which log entries to return. For more information, seeLogging query language.
Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed inresourceNames. Referencing a parent resource that is not listed inresourceNames will cause the filter to return no results. The maximum length of a filter is 20,000 characters.
To make queries faster, you can make the filter more selective by using restrictions onindexed fields as well as limit the time range of the query by adding range restrictions on thetimestamp field.
orderBy
string
Optional. How the results should be sorted. Presently, the only permitted values are"timestamp asc" (default) and"timestamp desc". The first option returns entries in order of increasing values ofLogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of theirinsertId values.
We recommend setting theorderBy field to"timestamp desc" when listing recently ingested log entries. If not set, the default value of"timestamp asc" may take a long time to fetch matching logs that are only recently ingested.
pageSize
integer
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 ofnextPageToken in the response indicates that more results might be available.
pageToken
string
Optional. If present, then retrieve the next batch of results from the preceding call to this method.pageToken must be the value ofnextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.
Response body
Result returned fromentries.list.
If successful, the response body contains data with the following structure:
A list of log entries. Ifentries is empty,nextPageToken may still be returned, indicating that more entries may exist. SeenextPageToken for more information.
nextPageToken
string
If there might be more results than those appearing in this response, thennextPageToken is included. To get the next set of results, call this method again using the value ofnextPageToken aspageToken.
If a value fornextPageToken appears and theentries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value forpageToken to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-04 UTC."],[],[]]