List activity
Answers the estate's last 365 days: distinct commits, merges, active repositories and contributors, for the whole estate, each group and each org, a commit count per day, the newest public commits, and one page of public repositories.
GET /v1/git/activity
| Address | https://api.hanzo.ai/v1/git/activity |
| Method | GET |
| Operation | get_git_activity |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers the estate's last 365 days: distinct commits, merges, active repositories and contributors, for the whole estate, each group and each org, a commit count per day, the newest public commits, and one page of public repositories. Public: private repositories are counted and never named.
Request
4 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
org | query | string | — | Org lists one org's repositories; empty lists every org's. |
group | query | string | — | Group lists one group's repositories (hanzo, lux, zoo); empty lists every group's. |
page | query | integer | — | Page is the repository page, from 1. |
limit | query | integer | — | Limit is the page size. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | git.activityOut | ok |
default | problem-details | refused |
200 body — 115 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
active | body | object | — | Active is how many repositories have a commit on each UTC day. |
active.* | body | integer (int64) | — | |
complete | body | boolean | — | Complete is false while a repository the forge lists has never been read. |
daily | body | object | — | Daily is the estate's distinct commits per UTC day, YYYY-MM-DD. |
daily.* | body | integer (int64) | — | |
github | body | string | — | GitHub is when the mirror last read GitHub, RFC 3339 UTC. |
groups | body | git.activityGroup[] | — | Groups is each group, most commits first. |
groups[].active | body | object | — | Active is how many of the group's repositories have a commit on each UTC day. |
groups[].active.* | body | integer (int64) | — | |
groups[].active30 | body | integer (int64) | — | Active30 is how many have a commit in the last 30 days. |
groups[].commits | body | integer (int64) | — | Commits is distinct commits in the window, each counted once in this scope: every commit the scope's repositories hold, the upstream projects carried and kept current included. |
groups[].contributors | body | integer (int64) | — | Contributors is distinct author addresses in the window, counted and never named. |
groups[].daily | body | object | — | Daily is the group's distinct commits per UTC day, YYYY-MM-DD. |
groups[].daily.* | body | integer (int64) | — | |
groups[].empty | body | integer (int64) | — | Empty is how many hold no commit. |
groups[].last | body | string | — | Last is the newest commit time in the scope, RFC 3339 UTC; empty when none. |
groups[].latest | body | git.activityCommit[] | — | Latest is the group's newest commits of public repositories, newest first. |
groups[].latest[].at | body | string | — | At is the commit time, RFC 3339 UTC. |
groups[].latest[].message | body | string | — | Message is the subject line. |
groups[].latest[].ours | body | boolean | — | Ours is whether the estate's people authored it. |
groups[].latest[].repo | body | string | — | Repo is org/name. |
groups[].latest[].sha | body | string | — | SHA is the commit. |
groups[].latest[].url | body | string | — | URL is the commit on the forge. |
groups[].mergeMonths | body | integer (int64)[] | — | MergeMonths is Merges per calendar month, as Months. |
groups[].merges | body | integer (int64) | — | Merges is how many of those have more than one parent. |
groups[].mirrors | body | integer (int64) | — | Mirrors is how many are pull mirrors of github.com. |
groups[].months | body | integer (int64)[] | — | Months is Commits per calendar month, oldest first, one per entry of the document's Months. |
groups[].name | body | string | — | Name is the group. |
groups[].orgs | body | integer (int64) | — | Orgs is how many orgs the group holds. |
groups[].ours | body | integer (int64) | — | Ours is how many of those the estate's people authored: an address a member of an estate org commits with, or one at an estate domain. |
groups[].oursDaily | body | object | — | OursDaily is the group's own commits per UTC day. |
groups[].oursDaily.* | body | integer (int64) | — | |
groups[].oursMonths | body | integer (int64)[] | — | OursMonths is Ours per calendar month, as Months. |
groups[].people | body | integer (int64) | — | People is how many of those are the estate's own. |
groups[].private | body | integer (int64) | — | Private is how many only their members can read. |
groups[].public | body | integer (int64) | — | Public is how many of them anyone can read. |
groups[].repos | body | integer (int64) | — | Repos is how many repositories the scope holds on the forge. |
latest | body | git.activityCommit[] | — | Latest is the newest commits of public repositories, newest first. |
latest[].at | body | string | — | At is the commit time, RFC 3339 UTC. |
latest[].message | body | string | — | Message is the subject line. |
latest[].ours | body | boolean | — | Ours is whether the estate's people authored it. |
latest[].repo | body | string | — | Repo is org/name. |
latest[].sha | body | string | — | SHA is the commit. |
latest[].url | body | string | — | URL is the commit on the forge. |
months | body | string[] | — | Months names the calendar months every Months series counts, YYYY-MM, oldest first. |
orgs | body | git.activityOrg[] | — | Orgs is each org, most commits first. |
orgs[].active | body | integer (int64) | — | Active is how many have a commit in the window. |
orgs[].active30 | body | integer (int64) | — | Active30 is how many have a commit in the last 30 days. |
orgs[].commits | body | integer (int64) | — | Commits is distinct commits in the window, each counted once in this scope: every commit the scope's repositories hold, the upstream projects carried and kept current included. |
orgs[].contributors | body | integer (int64) | — | Contributors is distinct author addresses in the window, counted and never named. |
orgs[].empty | body | integer (int64) | — | Empty is how many hold no commit. |
orgs[].forge | body | string | — | Forge is the org's page on the forge. |
orgs[].github | body | string | — | GitHub is the org's page on GitHub; empty for a namespace only the forge has. |
orgs[].group | body | string | — | Group is the group that owns it. |
orgs[].last | body | string | — | Last is the newest commit time in the scope, RFC 3339 UTC; empty when none. |
orgs[].mergeMonths | body | integer (int64)[] | — | MergeMonths is Merges per calendar month, as Months. |
orgs[].merges | body | integer (int64) | — | Merges is how many of those have more than one parent. |
orgs[].mirrors | body | integer (int64) | — | Mirrors is how many are pull mirrors of github.com. |
orgs[].months | body | integer (int64)[] | — | Months is Commits per calendar month, oldest first, one per entry of the document's Months. |
orgs[].name | body | string | — | Name is the org, as GitHub and the forge both spell it. |
orgs[].ours | body | integer (int64) | — | Ours is how many of those the estate's people authored: an address a member of an estate org commits with, or one at an estate domain. |
orgs[].oursMonths | body | integer (int64)[] | — | OursMonths is Ours per calendar month, as Months. |
orgs[].people | body | integer (int64) | — | People is how many of those are the estate's own. |
orgs[].private | body | integer (int64) | — | Private is how many only their members can read. |
orgs[].public | body | integer (int64) | — | Public is how many of them anyone can read. |
orgs[].repos | body | integer (int64) | — | Repos is how many repositories the scope holds on the forge. |
oursDaily | body | object | — | OursDaily is the estate's own commits per UTC day. |
oursDaily.* | body | integer (int64) | — | |
read | body | string | — | Read is when the index wrote this, RFC 3339 UTC. |
repos | body | git.activityPage | — | |
repos.data | body | git.activityRepo[] | — | Data is the page. |
repos.data[].active30 | body | boolean | — | Active30 is whether it has a commit in the last 30 days. |
repos.data[].commits | body | integer (int64) | — | Commits is its distinct commits in the window. |
repos.data[].description | body | string | — | Description is the repository's own. |
repos.data[].forge | body | string | — | Forge is its page on the forge. |
repos.data[].fork | body | boolean | — | Fork is whether GitHub calls it a fork. |
repos.data[].github | body | string | — | GitHub is its page on GitHub when GitHub publishes it. |
repos.data[].group | body | string | — | Group is the group that owns the org. |
repos.data[].last | body | string | — | Last is its newest commit time, RFC 3339 UTC; empty when none in the window. |
repos.data[].merges | body | integer (int64) | — | Merges is how many of those are merges. |
repos.data[].mirror | body | boolean | — | Mirror is whether the forge pulls it from github.com. |
repos.data[].months | body | integer (int64)[] | — | Months is Commits per calendar month, oldest first, one per entry of the document's Months. |
repos.data[].org | body | string | — | Org is the org that holds it. |
repos.data[].ours | body | integer (int64) | — | Ours is how many of those the estate's people authored. |
repos.data[].repo | body | string | — | Repo is org/name. |
repos.data[].stars | body | integer (int64) | — | Stars is its stars on the forge. |
repos.limit | body | integer (int64) | — | Limit is the page size asked for. |
repos.page | body | integer (int64) | — | Page is this page's number, from 1. |
repos.total | body | integer (int64) | — | Total is how many public repositories match, across every page. |
source | body | string | — | Source names what was read: "forge", its repositories and database. |
totals | body | git.activityTotals | — | |
totals.active | body | integer (int64) | — | Active is how many have a commit in the window. |
totals.active30 | body | integer (int64) | — | Active30 is how many have a commit in the last 30 days. |
totals.commits | body | integer (int64) | — | Commits is distinct commits in the window, each counted once in this scope: every commit the scope's repositories hold, the upstream projects carried and kept current included. |
totals.contributors | body | integer (int64) | — | Contributors is distinct author addresses in the window, counted and never named. |
totals.empty | body | integer (int64) | — | Empty is how many hold no commit. |
totals.forks | body | integer (int64) | — | Forks is commits found only in forks, upstream history included. |
totals.last | body | string | — | Last is the newest commit time in the scope, RFC 3339 UTC; empty when none. |
totals.mergeMonths | body | integer (int64)[] | — | MergeMonths is Merges per calendar month, as Months. |
totals.merges | body | integer (int64) | — | Merges is how many of those have more than one parent. |
totals.mirrors | body | integer (int64) | — | Mirrors is how many are pull mirrors of github.com. |
totals.months | body | integer (int64)[] | — | Months is Commits per calendar month, oldest first, one per entry of the document's Months. |
totals.orgs | body | integer (int64) | — | Orgs is how many orgs the estate holds on the forge. |
totals.ours | body | integer (int64) | — | Ours is how many of those the estate's people authored: an address a member of an estate org commits with, or one at an estate domain. |
totals.oursMonths | body | integer (int64)[] | — | OursMonths is Ours per calendar month, as Months. |
totals.own | body | integer (int64) | — | Own is commits found in at least one repository GitHub does not call a fork. |
totals.people | body | integer (int64) | — | People is how many of those are the estate's own. |
totals.private | body | integer (int64) | — | Private is how many only their members can read. |
totals.public | body | integer (int64) | — | Public is how many of them anyone can read. |
totals.repos | body | integer (int64) | — | Repos is how many repositories the scope holds on the forge. |
unread | body | integer (int64) | — | Unread is how many such repositories there are. |
window | body | git.activityWindow | — | |
window.by | body | string | — | By is the commit date counted: "committer", when the work landed. |
window.from | body | string | — | From is the first UTC day counted, YYYY-MM-DD. |
window.to | body | string | — | To is the last UTC day counted, YYYY-MM-DD. |
Failure carries the platform error shape — see Errors.
Examples
hanzo git activityimport { Configuration, GitApi } from 'hanzoai';
const api = new GitApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getGitActivity();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GitApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GitApi(client).get_git_activity()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.GitAPI.GetGitActivity(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, git_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = git_api::get_git_activity(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GitApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new GitApi(client).getGitActivity();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/git/activity \
-H "Authorization: Bearer $HANZO_API_KEY"Tool git, op get_git_activity — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "git",
"arguments": {
"op": "get_git_activity",
"input": {}
}
}
}'