Skip to main content
POST

Authorizations

Authorization
string
header
required

CodeAnt API token (cdt_...), created on the Settings → API Tokens page. Pass via Authorization: Bearer <token> header.

Body

application/json
platform
enum<string>
required

Git platform of the organization

Available options:
github,
gitlab,
bitbucket,
azure_devops
org
string
required

Organization / workspace slug

github_base_url
string

Self-hosted instance URL (also gitlab_base_url / bitbucket_base_url / azure_devops_base_url). Defaults to the cloud host.

Example:

"https://github.com"

start_date
string<date>

Inclusive UTC start date. Default: last 7 days; clamped to the 180-day retention window.

end_date
string<date>

Inclusive UTC end date. Default: today.

days
integer

Alternative to explicit dates: lookback window in days (max 180).

since
string<date-time>

Only events STRICTLY AFTER this ISO 8601 timestamp; also defaults the range to [since, today]. Use your last consumed event's timestamp for incremental pulls.

cursor
string

Opaque cursor from a previous response — resume paging after it.

limit
integer
default:100

Events per page.

Required range: x <= 1000
format
enum<string>
default:json

json returns the envelope below; ndjson/csv return the raw file body with paging in X-Next-Cursor / X-Has-More headers. CSV is RFC 4180 (fields with commas, quotes or line breaks are properly quoted).

Available options:
json,
ndjson,
csv

Response

Audit events retrieved successfully. With format: ndjson or csv the body is the raw file instead, and paging moves to the X-Next-Cursor and X-Has-More response headers.

org
string
service
string
base_url_domain
string
start_date
string<date>
end_date
string<date>
retention_days
integer
Example:

180

count
integer

Events in this page

has_more
boolean

True when more pages match — call again with next_cursor

next_cursor
string | null

Opaque cursor for the next page; also a durable resume point

events
object[]

Events in ascending timestamp order (oldest first)