Get environment logs
kinsta_get_logsRead-only
Recent lines of an environment's error log, access log or Kinsta cache performance log, optionally within a time range and filtered by a search text. Returns the log as text (the newest lines the API gives). Access logs contain visitor IP addresses. GET /sites/environments/{env_id}/logs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only lines at or before this ISO 8601 date-time. | |
| from | No | Only lines at or after this ISO 8601 date-time, e.g. 2026-10-01T00:00:00Z. | |
| lines | No | Number of lines, 1-2000 (default 200). | |
| search | No | Only lines containing this text. | |
| file_name | No | Which log (default error). | |
| environment_id | Yes | Kinsta environment id (a UUID; from kinsta_list_sites with include_environments, or kinsta_list_site_environments). |