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

Addresshttps://api.hanzo.ai/v1/git/activity
MethodGET
Operationget_git_activity
AuthAuthorization: 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.

FieldInTypeRequiredDescription
orgquerystring—Org lists one org's repositories; empty lists every org's.
groupquerystring—Group lists one group's repositories (hanzo, lux, zoo); empty lists every group's.
pagequeryinteger—Page is the repository page, from 1.
limitqueryinteger—Limit is the page size.

Response

StatusBodyMeaning
200git.activityOutok
defaultproblem-detailsrefused

200 body — 115 fields.

FieldInTypeAlwaysDescription
activebodyobject—Active is how many repositories have a commit on each UTC day.
active.*bodyinteger (int64)—
completebodyboolean—Complete is false while a repository the forge lists has never been read.
dailybodyobject—Daily is the estate's distinct commits per UTC day, YYYY-MM-DD.
daily.*bodyinteger (int64)—
githubbodystring—GitHub is when the mirror last read GitHub, RFC 3339 UTC.
groupsbodygit.activityGroup[]—Groups is each group, most commits first.
groups[].activebodyobject—Active is how many of the group's repositories have a commit on each UTC day.
groups[].active.*bodyinteger (int64)—
groups[].active30bodyinteger (int64)—Active30 is how many have a commit in the last 30 days.
groups[].commitsbodyinteger (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[].contributorsbodyinteger (int64)—Contributors is distinct author addresses in the window, counted and never named.
groups[].dailybodyobject—Daily is the group's distinct commits per UTC day, YYYY-MM-DD.
groups[].daily.*bodyinteger (int64)—
groups[].emptybodyinteger (int64)—Empty is how many hold no commit.
groups[].lastbodystring—Last is the newest commit time in the scope, RFC 3339 UTC; empty when none.
groups[].latestbodygit.activityCommit[]—Latest is the group's newest commits of public repositories, newest first.
groups[].latest[].atbodystring—At is the commit time, RFC 3339 UTC.
groups[].latest[].messagebodystring—Message is the subject line.
groups[].latest[].oursbodyboolean—Ours is whether the estate's people authored it.
groups[].latest[].repobodystring—Repo is org/name.
groups[].latest[].shabodystring—SHA is the commit.
groups[].latest[].urlbodystring—URL is the commit on the forge.
groups[].mergeMonthsbodyinteger (int64)[]—MergeMonths is Merges per calendar month, as Months.
groups[].mergesbodyinteger (int64)—Merges is how many of those have more than one parent.
groups[].mirrorsbodyinteger (int64)—Mirrors is how many are pull mirrors of github.com.
groups[].monthsbodyinteger (int64)[]—Months is Commits per calendar month, oldest first, one per entry of the document's Months.
groups[].namebodystring—Name is the group.
groups[].orgsbodyinteger (int64)—Orgs is how many orgs the group holds.
groups[].oursbodyinteger (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[].oursDailybodyobject—OursDaily is the group's own commits per UTC day.
groups[].oursDaily.*bodyinteger (int64)—
groups[].oursMonthsbodyinteger (int64)[]—OursMonths is Ours per calendar month, as Months.
groups[].peoplebodyinteger (int64)—People is how many of those are the estate's own.
groups[].privatebodyinteger (int64)—Private is how many only their members can read.
groups[].publicbodyinteger (int64)—Public is how many of them anyone can read.
groups[].reposbodyinteger (int64)—Repos is how many repositories the scope holds on the forge.
latestbodygit.activityCommit[]—Latest is the newest commits of public repositories, newest first.
latest[].atbodystring—At is the commit time, RFC 3339 UTC.
latest[].messagebodystring—Message is the subject line.
latest[].oursbodyboolean—Ours is whether the estate's people authored it.
latest[].repobodystring—Repo is org/name.
latest[].shabodystring—SHA is the commit.
latest[].urlbodystring—URL is the commit on the forge.
monthsbodystring[]—Months names the calendar months every Months series counts, YYYY-MM, oldest first.
orgsbodygit.activityOrg[]—Orgs is each org, most commits first.
orgs[].activebodyinteger (int64)—Active is how many have a commit in the window.
orgs[].active30bodyinteger (int64)—Active30 is how many have a commit in the last 30 days.
orgs[].commitsbodyinteger (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[].contributorsbodyinteger (int64)—Contributors is distinct author addresses in the window, counted and never named.
orgs[].emptybodyinteger (int64)—Empty is how many hold no commit.
orgs[].forgebodystring—Forge is the org's page on the forge.
orgs[].githubbodystring—GitHub is the org's page on GitHub; empty for a namespace only the forge has.
orgs[].groupbodystring—Group is the group that owns it.
orgs[].lastbodystring—Last is the newest commit time in the scope, RFC 3339 UTC; empty when none.
orgs[].mergeMonthsbodyinteger (int64)[]—MergeMonths is Merges per calendar month, as Months.
orgs[].mergesbodyinteger (int64)—Merges is how many of those have more than one parent.
orgs[].mirrorsbodyinteger (int64)—Mirrors is how many are pull mirrors of github.com.
orgs[].monthsbodyinteger (int64)[]—Months is Commits per calendar month, oldest first, one per entry of the document's Months.
orgs[].namebodystring—Name is the org, as GitHub and the forge both spell it.
orgs[].oursbodyinteger (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[].oursMonthsbodyinteger (int64)[]—OursMonths is Ours per calendar month, as Months.
orgs[].peoplebodyinteger (int64)—People is how many of those are the estate's own.
orgs[].privatebodyinteger (int64)—Private is how many only their members can read.
orgs[].publicbodyinteger (int64)—Public is how many of them anyone can read.
orgs[].reposbodyinteger (int64)—Repos is how many repositories the scope holds on the forge.
oursDailybodyobject—OursDaily is the estate's own commits per UTC day.
oursDaily.*bodyinteger (int64)—
readbodystring—Read is when the index wrote this, RFC 3339 UTC.
reposbodygit.activityPage—
repos.databodygit.activityRepo[]—Data is the page.
repos.data[].active30bodyboolean—Active30 is whether it has a commit in the last 30 days.
repos.data[].commitsbodyinteger (int64)—Commits is its distinct commits in the window.
repos.data[].descriptionbodystring—Description is the repository's own.
repos.data[].forgebodystring—Forge is its page on the forge.
repos.data[].forkbodyboolean—Fork is whether GitHub calls it a fork.
repos.data[].githubbodystring—GitHub is its page on GitHub when GitHub publishes it.
repos.data[].groupbodystring—Group is the group that owns the org.
repos.data[].lastbodystring—Last is its newest commit time, RFC 3339 UTC; empty when none in the window.
repos.data[].mergesbodyinteger (int64)—Merges is how many of those are merges.
repos.data[].mirrorbodyboolean—Mirror is whether the forge pulls it from github.com.
repos.data[].monthsbodyinteger (int64)[]—Months is Commits per calendar month, oldest first, one per entry of the document's Months.
repos.data[].orgbodystring—Org is the org that holds it.
repos.data[].oursbodyinteger (int64)—Ours is how many of those the estate's people authored.
repos.data[].repobodystring—Repo is org/name.
repos.data[].starsbodyinteger (int64)—Stars is its stars on the forge.
repos.limitbodyinteger (int64)—Limit is the page size asked for.
repos.pagebodyinteger (int64)—Page is this page's number, from 1.
repos.totalbodyinteger (int64)—Total is how many public repositories match, across every page.
sourcebodystring—Source names what was read: "forge", its repositories and database.
totalsbodygit.activityTotals—
totals.activebodyinteger (int64)—Active is how many have a commit in the window.
totals.active30bodyinteger (int64)—Active30 is how many have a commit in the last 30 days.
totals.commitsbodyinteger (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.contributorsbodyinteger (int64)—Contributors is distinct author addresses in the window, counted and never named.
totals.emptybodyinteger (int64)—Empty is how many hold no commit.
totals.forksbodyinteger (int64)—Forks is commits found only in forks, upstream history included.
totals.lastbodystring—Last is the newest commit time in the scope, RFC 3339 UTC; empty when none.
totals.mergeMonthsbodyinteger (int64)[]—MergeMonths is Merges per calendar month, as Months.
totals.mergesbodyinteger (int64)—Merges is how many of those have more than one parent.
totals.mirrorsbodyinteger (int64)—Mirrors is how many are pull mirrors of github.com.
totals.monthsbodyinteger (int64)[]—Months is Commits per calendar month, oldest first, one per entry of the document's Months.
totals.orgsbodyinteger (int64)—Orgs is how many orgs the estate holds on the forge.
totals.oursbodyinteger (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.oursMonthsbodyinteger (int64)[]—OursMonths is Ours per calendar month, as Months.
totals.ownbodyinteger (int64)—Own is commits found in at least one repository GitHub does not call a fork.
totals.peoplebodyinteger (int64)—People is how many of those are the estate's own.
totals.privatebodyinteger (int64)—Private is how many only their members can read.
totals.publicbodyinteger (int64)—Public is how many of them anyone can read.
totals.reposbodyinteger (int64)—Repos is how many repositories the scope holds on the forge.
unreadbodyinteger (int64)—Unread is how many such repositories there are.
windowbodygit.activityWindow—
window.bybodystring—By is the commit date counted: "committer", when the work landed.
window.frombodystring—From is the first UTC day counted, YYYY-MM-DD.
window.tobodystring—To is the last UTC day counted, YYYY-MM-DD.

Failure carries the platform error shape — see Errors.

Examples

hanzo git activity
import { 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": {}
         }
       }
     }'

Git API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.