Query environment logs
Returns the environment’s log entries that match the query, read through Kapten’s agent on its cluster.
/project/{project_id}/environment/{environment_id}/logsAuthorizationBearer token (JWT) · headerrequiredJWT token passed in the Authorization header using the Bearer <token> format.
project_iduuidrequiredThe unique identifier for the project
environment_iduuidrequiredThe unique identifier of the environment
application/jsonquerystringrequiredThe user-provided LogsQL query fragment.
limitinteger<int32>Maximum number of most recent log entries to return.
Environment logs retrieved successfully
recordslogs_query_entry[]requiredShow propertiesHide properties
logs_query_entrymsgobject | string | number | boolean | any[] | nullrequiredThe normalized log payload as an arbitrary JSON value.
Show propertiesHide properties
objectstringnumberbooleananyanytimestringrequiredThe RFC3339 or RFC3339Nano timestamp returned by Victoria Logs.
levelstringThe log level, or an empty string when missing from the source record.
project_idstringThe Kapten project identifier associated with the log entry when present in the source record.
environment_idstringThe Kapten environment identifier associated with the log entry when present in the source record.
component_idstringThe Kapten component identifier associated with the log entry when present in the source record.
component_typestringThe Kapten component type associated with the log entry when present in the source record.
component_run_idstringcomponent_kindstringsourcestringcontrol_planeagentbuilderstepstringphasestringbackendstringbackend_stepstringrun_statusstringduration_msinteger<int64>error_kindstringmetadataobjecteventstringkapten.build.phaseevent_versioninteger<int32>platformstringlinux/amd64linux/arm64publicationstringchild_manifestfinal_indexError
codeinteger<int32>requiredmessagestringrequiredreasonstringOptional stable machine-readable reason for programmatic error handling