Activity API¶
These five endpoints read the commits, pull requests, issues and releases of everything the account monitors. The token scopes each of them to the account, and org_id or repo_id narrows it further.
Every list answers {"items": [...], "total": n}, where total counts the matching rows and items holds the page. Pagination is limit (50 by default, capped) and offset.
The filter parameters are org_id and repo_id
Not organization_id and repository_id. An unknown query parameter is ignored, so the longer spelling returns every row the account can see, which looks like a working call with surprising results.
List Commits¶
| Parameter | Type | Default | Description |
|---|---|---|---|
repo_id |
UUID | - | One repository |
org_id |
UUID | - | One organization |
author_email |
string | - | Exact match on the commit's author email |
since |
timestamp | - | Landed at or after this time |
until |
timestamp | - | Landed at or before this time |
limit |
integer | 50 | Page size |
offset |
integer | 0 | Rows to skip |
Response¶
{
"items": [
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"sha": "abc123def456",
"message": "Fix critical bug in authentication",
"author_name": "Jane Doe",
"author_email": "jane@example.com",
"authored_at": "2026-01-15T09:00:00Z",
"committed_at": "2026-02-28T10:30:00Z",
"additions": 0,
"deletions": 0,
"files_changed": 0,
"repository_name": "my-org/awesome-project"
}
],
"total": 150
}
additions, deletions and files_changed are 0 on every row. No platform adapter fetches a commit's files or patch during a sync, so the columns exist and nothing fills them. See the roadmap on reading diffs over the git protocol.
Two timestamps¶
A commit has both. They answer different questions:
authored_at: when the work was written. It belongs to the author; a rebase or squash does not change it. Use it for attribution.committed_at: when it landed. Use it for anything time-windowed.
They differ whenever history is rewritten, which is most of the time on a project that rebases or squash-merges: the example above is work written in January and merged at the end of February.
since and until filter on committed_at, and results are ordered by it, because that is also what the forges' own filters apply to. Bucketing by author date puts merged work into windows that already closed.
List Pull Requests¶
| Parameter | Type | Default | Description |
|---|---|---|---|
repo_id |
UUID | - | One repository |
org_id |
UUID | - | One organization |
status |
string | - | Exact match on state: open, closed or merged |
author |
string | - | Exact match on the forge username |
limit |
integer | 50 | Page size |
offset |
integer | 0 | Rows to skip |
The parameter is status and the field it matches is called state. There is no date filter here; results are ordered by opened_at, newest first.
Response¶
{
"items": [
{
"id": "880e8400-e29b-41d4-a716-446655440003",
"external_id": "1234567",
"number": 42,
"title": "Add OAuth2 support",
"body": "This adds...",
"state": "open",
"author": "johndoe",
"opened_at": "2026-02-27T14:00:00Z",
"merged_at": null,
"closed_at": null,
"additions": 250,
"deletions": 30,
"commits_count": 5,
"repository_name": "my-org/awesome-project"
}
],
"total": 25
}
List Issues¶
| Parameter | Type | Default | Description |
|---|---|---|---|
repo_id |
UUID | - | One repository |
org_id |
UUID | - | One organization |
status |
string | - | Exact match on state: open or closed |
author |
string | - | Exact match on the forge username |
limit |
integer | 50 | Page size |
offset |
integer | 0 | Rows to skip |
Response¶
{
"items": [
{
"id": "990e8400-e29b-41d4-a716-446655440004",
"external_id": "7654321",
"number": 100,
"title": "Authentication fails with special characters",
"body": "When logging in...",
"state": "open",
"author": "reporter",
"labels": ["bug", "auth"],
"opened_at": "2026-02-26T10:00:00Z",
"closed_at": null,
"comments_count": 3,
"repository_name": "my-org/awesome-project"
}
],
"total": 10
}
List Releases¶
| Parameter | Type | Default | Description |
|---|---|---|---|
repo_id |
UUID | - | One repository |
org_id |
UUID | - | One organization |
limit |
integer | 50 | Page size |
offset |
integer | 0 | Rows to skip |
Response¶
{
"items": [
{
"id": "aa0e8400-e29b-41d4-a716-446655440005",
"external_id": "98765",
"tag_name": "v2.1.0",
"name": "2.1.0",
"body": "### Added\n- OAuth2 support",
"is_prerelease": false,
"is_draft": false,
"author": "johndoe",
"published_at": "2026-02-20T16:00:00Z",
"repository_name": "my-org/awesome-project"
}
],
"total": 12
}
Activity Summary¶
| Parameter | Type | Default | Description |
|---|---|---|---|
org_id |
UUID | - | One organization; otherwise the whole account |
Eight counts over fixed windows. The windows are not configurable; the endpoint takes no date range.
Response¶
{
"commits_24h": 12,
"commits_7d": 85,
"commits_30d": 340,
"prs_opened_7d": 9,
"prs_merged_7d": 7,
"issues_opened_7d": 14,
"issues_closed_7d": 11,
"releases_30d": 2
}
Commit counts bucket on committed_at, pull requests on opened_at and merged_at, issues on opened_at and closed_at, releases on published_at.
Example: who committed this week¶
from collections import Counter
import httpx2 as httpx
client = httpx.Client(
base_url="http://localhost:8000/api/v1",
headers={"Authorization": f"Bearer {token}"},
)
summary = client.get("/activity/summary").json()
print(f"{summary['commits_7d']} commits, {summary['prs_merged_7d']} PRs merged, 7 days")
# One page at a time: `limit` is capped, so a busy account needs the loop.
authors: Counter[str] = Counter()
offset = 0
while True:
page = client.get("/activity/commits", params={"limit": 50, "offset": offset}).json()
authors.update(c["author_email"] for c in page["items"])
offset += 50
if offset >= page["total"]:
break
for email, count in authors.most_common(5):
print(f" {email}: {count}")