You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/ondemand-reports.md
+44-3
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,52 @@ This feature is in beta
16
16
17
17
:::
18
18
19
-
CodeRabbit offers a way to generate on-demand reports using the [API](https://api.coderabbit.ai/api/swagger/).
20
-
You will be able to use the API by creating an [API key](https://app.coderabbit.ai/settings/api-keys).
19
+
CodeRabbit offers a way to generate on-demand reports using the [CodeRabbit API](https://api.coderabbit.ai/api/swagger/).
20
+
You will need an API Key to access the CodeRabbit API and generate an on-demand report.
21
21
22
+
## Create an API key
22
23
23
-
On-demand report input schema:
24
+
Sign into your CodeRabbit account and navigate to the the [**API Keys**](https://app.coderabbit.ai/settings/api-keys) page under 'Organization Settings' in the left sidebar.
25
+
Click on the **Create API Key** button and enter a name for the API Key.
26
+
Copy the API key and keep it safe as it won't be visible again.
27
+
28
+

29
+
30
+
## Generate an On-demand report
31
+
32
+
Once you have the API key, pass it in the `x-coderabbitai-api-key` header when calling the API:
"report": "*Developer Activity*:\n\n 🟢 **Update README.md** [#10](https://gitlab.com/master-group123/sub-group/project1/-/merge_requests/10)\n• Summary: The change updates the project description and modifies a section header for clearer instructions.\n• Last activity: 1 day ago, mergeable\n• Insights:\n - :magnifying_glass: @user2 Suggested updating the wording to make it clearer"
53
+
}
54
+
]
55
+
```
56
+
57
+
58
+
:::info
59
+
60
+
If you get a 401 UNAUTHORIZED error, check if you're passing the right API key in the `x-coderabbitai-api-key` header
61
+
62
+
:::
63
+
64
+
The on-demand report generation endpoints take in inputs as per the schema shown below:
0 commit comments