List learnings for an organization
curl --request GET \
--url https://api.coderabbit.ai/v1/learnings \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/learnings"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/learnings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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>",
"pull_request": 123,
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}List learnings for an organization
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.
GET
/
v1
/
learnings
List learnings for an organization
curl --request GET \
--url https://api.coderabbit.ai/v1/learnings \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/learnings"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/learnings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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>",
"pull_request": 123,
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}- CLI Tool
- MCP Server
coderabbit api request /learnings
This operation isn’t a tool on the CodeRabbit MCP server. Call it over REST or from the CLI.
limit rows, with no cursor, so use JSON when you expect more rows than limit. See List and export organization Learnings.Authorizations
See Authentication for the key types and where to create a key.
Query Parameters
Workspace-scoped API tokens only. Supply this git-provider organization ID or org_name, never both, to scope learnings to one organization. When both selectors are omitted, aggregates every organization in the workspace. This org_id parameter is ignored for organization and self-hosted keys.
Was this page helpful?