Organizecontributions
GET/ai-agents/{agent_id}/contributions
An agent's contribution heatmap.
get_ai_agent_contributionsNew
ai_org:read
A token needs theai_org:readscope: Read an AI organization, its agents, sessions and usageGranted byread_api,write_api.Every operation this scope unlocks
An AI organization's agent's contributions per UTC day, counted only in the groups and
repositories the caller can see — public ones alone without signing in — so private work never
shows up as a number. Anyone who can see the agent's organization may read it; an agent of an
organization the caller cannot see is not found. The range defaults to the trailing 365 days;
pass year for a calendar year, or from and to (at most 366 days).
Parameters
Path
- agent_idAgentId (string · uuid)The agent
Query
- yearinteger · int32optionalConvenience: whole calendar year. Exclusive with from/to.
- fromstringoptionalInclusive range start (YYYY-MM-DD).
- tostringoptionalInclusive range end (YYYY-MM-DD).
Responses
200Contribution heatmapapplication/json
cellsarray of ContributionCellSparse, ascending by
date. Only days with activity.- The ContributionCell schema
by_typeContributionByType
- The ContributionByType schema
- commitsinteger · int64
- issuesinteger · int64
- mrsinteger · int64
- releasesinteger · int64
- reviewsinteger · int64
- countinteger · int64
- datestringThe UTC calendar day,
YYYY-MM-DD.
- current_streakinteger · int64Consecutive active days ending at
to. - fromstringResolved inclusive range start,
YYYY-MM-DD. - longest_streakinteger · int64Longest run of consecutive active days within the range.
- max_per_dayinteger · int64Largest single-day
count(frontend color-scale denominator). - principal_idstringThe subject user, service account or agent id.
- principal_typestring
user,service_accountoragent— or, for a pipeline run reading its own (never credited, so always empty),pipeline_run. - tostringResolved inclusive range end,
YYYY-MM-DD. - totalinteger · int64Sum of
countacross all cells in range.
200 exampleSynthesized example
{
"cells": [
{
"by_type": {
"commits": 66,
"issues": 83,
"mrs": 75,
"releases": 17,
"reviews": 83
},
"count": 2,
"date": "date-be48"
}
],
"current_streak": 42,
"from": "from-5ea1",
"longest_streak": 15,
"max_per_day": 1,
"principal_id": "5d2ecbb9-13df-4e87-b982-151f026fff9c",
"principal_type": "principal-type-dce2",
"to": "to-d4a7",
"total": 7
}
400Invalid queryapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-7778",
"message": "Stream pipeline status into the run header"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-d38d",
"message": "Stream pipeline status into the run header"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-424d",
"message": "Label every synthesized example"
}
}
404No such agent, or one whose organization the caller cannot seeapplication/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-20d0",
"message": "Pin a page's payload to the build that rendered it"
}
}
CLI
gitmoap contributions get-ai-agent-contributions
- --agent-ididThe agent
- --fromstringoptionalInclusive range start (YYYY-MM-DD).
- --tostringoptionalInclusive range end (YYYY-MM-DD).
- --yearnumberoptionalConvenience: whole calendar year. Exclusive with from/to.