curl --request GET \
--url https://api.coderabbit.ai/v1/learnings \
--header 'x-coderabbitai-api-key: <api-key>'{
"data": [
{
"id": "<string>",
"learning": "<string>",
"repository_name": "<string>",
"author_username": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_count": 123,
"organization_id": "<string>",
"organization_name": "<string>",
"repository_id": "<string>",
"author_id": "<string>",
"file": "<string>",
"source_url": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}Learnings
Programmatic access to an organization’s CodeRabbit learnings. Returns paginated JSON or a CSV download. Enterprise plan only. Mirrors the auth, rate-limit and response-size contract of the Metrics public API.
curl --request GET \
--url https://api.coderabbit.ai/v1/learnings \
--header 'x-coderabbitai-api-key: <api-key>'{
"data": [
{
"id": "<string>",
"learning": "<string>",
"repository_name": "<string>",
"author_username": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_count": 123,
"organization_id": "<string>",
"organization_name": "<string>",
"repository_id": "<string>",
"author_id": "<string>",
"file": "<string>",
"source_url": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}repository_ids, user_ids, organization_ids, limit, and cursor query parameters to filter and paginate results.
CSV Format
When usingformat=csv, the API returns a flat CSV structure with one row per learning. For the complete list of CSV columns and field descriptions, see Data Export - Exported fields.
For a guided overview of learnings, see the Learnings documentation.Authorizations
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Headers
API key for authentication
Query Parameters
Workspace-scoped API tokens only. When provided, scopes learnings to that single git-provider organization within the token's workspace; when omitted, aggregates every organization in the workspace. Ignored for organization and self-hosted keys.
Comma-separated provider repository IDs (max 10).
"1027529638,987654321"
Comma-separated provider user IDs (max 10).
"87397876,12345678"
Comma-separated provider organization IDs (max 10). Self-hosted instances only.
"184456712,103539130"
Maximum number of records to return.
1 <= x <= 1000Pagination cursor returned as next_cursor on the previous page.
Response format. json (default) returns paginated JSON; csv returns a CSV download.
json, csv Was this page helpful?