Logs

Use the logs endpoint to get your site's log files, including the error.log, kinsta-cache-perf.log, and access.log.

Get site logs

SecuritybearerAuth
Request
path Parameters
env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
query Parameters
file_name
required
string
Default: "error"
Enum: "error" "access" "kinsta-cache-perf"
Example: file_name=error
lines
required
number <= 20000
Default: 1000
Example: lines=1000
Responses
200

Successfully found site logs

400

One or more of the required parameters were not provided to the request

401

No or invalid API key provided to the request

404

Could not find the site logs or the user does not have permissions to retrieve data

500

Error occurred while retrieving site logs

get/sites/environments/{env_id}/logs
Request samples
Response samples
application/json
{
  • "environment": {
    }
}