stats

List agent logs

Cursor-paginated feed of the log lines agents wrote during runs in one environment (trace entries of type log). Pass next_cursor back as cursor to load the next page in the same direction. To fetch logs written after the first page, pass its first_cursor with direction=newer. Time filters apply to the log timestamp and take the same values as GET /runs.

Required permission: logs.view.

get/v1/projects/{project_id}/logs

Request

  • Base URL: https://api.connic.co
  • URL: https://api.connic.co/v1/projects/{project_id}/logs
  • Auth: HTTP bearer

Path parameters

project_idstring uuid required

ID of the project the API key belongs to.

Query parameters

environment_idstring uuid required

Environment to list logs from

time_range'1h' | '6h' | '24h' | '7d' | '30d' | 'today' | 'this_month' | 'last_month' | 'this_year' nullable

Preset window ending now, or a calendar period in UTC. Ignored when both start_date and end_date are set.

start_datestring date-time nullable

Custom window start; applies only together with end_date and overrides time_range.

end_datestring date-time nullable

Custom window end; applies only together with start_date.

deployment_idstring uuid nullable

Filter by deployment

exclude_test_runsboolean

Exclude logs from runs with a test name

agent_namestring[] nullable

Filter by one or more agent names

levelstring[] nullable

Filter by one or more log levels

sourcestring[] nullable

Filter by one or more log sources

searchstring nullable

Match log message, source, or agent name

cursorstring nullable

Opaque cursor returned by the previous logs response

direction'older' | 'newer'

older returns logs before cursor, newest first; newer returns logs after cursor, oldest first.

limitinteger

Page size, 1 to 250.

Response

Successful Response

has_moreboolean required

Whether more entries exist beyond this page in the same direction.

next_cursorstring nullable required

Pass as cursor with the same direction to load the next page. Null when has_more is false.

first_cursorstring nullable required

Cursor of the first entry on this page. Pass it with direction=newer to load entries written after this page.

last_cursorstring nullable required

Cursor of the last entry on this page. Null when the page is empty.

direction'older' | 'newer' required

Paging direction used: older pages back in time, newer pages forward.

Changes

No recorded changes to this operation across all 2 revisions of this API.