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
  • Auth
    HTTP bearer

Path parameters

project_id, string uuid required

ID of the project the API key belongs to.

Query parameters

environment_id, string 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_date, string date-time nullable

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

end_date, string date-time nullable

Custom window end; applies only together with start_date.

deployment_id, string uuid nullable

Filter by deployment

exclude_test_runs, boolean

Exclude logs from runs with a test name

agent_name, string[] nullable

Filter by one or more agent names

level, string[] nullable

Filter by one or more log levels

source, string[] nullable

Filter by one or more log sources

search, string nullable

Match log message, source, or agent name

cursor, string 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.

limit, integer

Page size, 1 to 250.

Response

Successful Response

PublicProjectLogsResponse required
logs, PublicProjectLogItemResponse[] required

Log entries, newest first for direction=older and oldest first for direction=newer.

has_more, boolean required

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

next_cursor, string nullable required

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

first_cursor, string nullable required

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

last_cursor, string 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 17 revisions of this API.