Query database run logs
Returns the deployment logs of one database run: what Kapten did while deploying it, and what its agent on the cluster did. For the database’s own output, use the component logs.
Without from or to, the window spans the run, from its start to its end. Logs follow the retention of the log backend, so the logs of an old run may be gone, and runs from before run logs existed return an empty list.
/project/{project_id}/environment/{environment_id}/database/{database_id}/runs/{component_run_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
database_iduuidrequiredUnique identifier of the database.
component_run_iduuidrequiredThe unique identifier for the component run
application/jsonviewstringWhich run log projection to return.
timelinerawbothfromstring<date-time>Inclusive lower bound for the run log time range.
tostring<date-time>Inclusive upper bound for the run log time range.
limitinteger<int32>Maximum number of most recent raw backend records to query.
levelsstring[]Optional log levels to include.
sourcestring[]Optional timeline event sources to include.
textstringOptional phrase to search in the log message.
{
"view": "timeline",
"limit": 200,
"source": [
"control_plane",
"agent"
]
}{
"view": "raw",
"levels": [
"info",
"warn",
"error"
],
"text": "helm"
}{
"view": "both",
"from": "2026-07-03T10:00:00Z",
"to": "2026-07-03T10:30:00Z",
"limit": 500
}Database run logs retrieved successfully
timelinecomponent_run_timeline_event[]requiredShow propertiesHide properties
component_run_timeline_eventtimestringrequiredThe RFC3339 or RFC3339Nano timestamp returned by Victoria Logs.
levelstringrequiredsourcestringrequiredstepstringrequiredphasestringrequiredbackendstringbackend_stepstringmessagestringrequiredmetadataobjectSafe structured metadata parsed from kapten_io_metadata when present.
duration_msinteger<int64> | nullrun_statusstringerror_kindstringeventstringVersioned event discriminator when this is a structured build event.
kapten.build.phaseevent_versioninteger<int32>platformstringlinux/amd64linux/arm64publicationstringchild_manifestfinal_indexlogslogs_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_indexmetacomponent_run_logs_metarequiredShow propertiesHide properties
component_run_iduuidrequiredA universally unique identifier (UUID) string
logs_backendstringrequiredvictoria_logsdefault_time_range_appliedbooleanrequireddetails_availablebooleanrequiredWhether retained Agent or Builder log details were available for this run.
details_unavailable_reasonstringSafe user-facing reason returned when run details are unavailable or expired.
pipeline_contextcomponent_run_pipeline_context | nullShow propertiesHide properties
pipeline_iduuidrequiredA universally unique identifier (UUID) string
pipeline_run_iduuidrequiredA universally unique identifier (UUID) string
stage_run_iduuidrequiredA universally unique identifier (UUID) string
pipeline_component_run_iduuidrequiredA universally unique identifier (UUID) string
stage_component_iduuidrequiredA universally unique identifier (UUID) string
requiredbooleanrequiredtimeout_secondsinteger | nullnullError
codeinteger<int32>requiredmessagestringrequiredreasonstringOptional stable machine-readable reason for programmatic error handling