- Stitch >
- Application Logs >
- Work with Logs
Access Logs Through the Admin API¶
Overview¶
You can request an application’s logs programmatically by accessing the logging endpoints of the Stitch Admin API.
The examples in this section use the following helper functions in a Function:
Get Recent Logs¶
To return the 100 most recent log entries for your application, call the Logging endpoint with no additional parameters:
Get Logs for a Date Range¶
To return log entries for a specific date range, call the Logging
endpoint with either or both of the start_date
and end_date
fields:
Result Pagination
If the date range that you specify includes more than 100 log entries, you will need to run paginated queries to access all of the entries.
Get Paginated Logs¶
Stitch returns a maximum of 100 log entries for each request. If a request applies to more than 100 log entries, the API will return the first “page” of 100 results and include additional parameters in the response that you can provide to get the next page of up to 100 entries.
Paginated Responses
A paginated response resembles the following document, where
nextEndDate
and nextSkip
are optional: