Skip to content
GitmoapAPIBeta
Organizecontributions
GET/user/contributions

The calling principal's own contribution heatmap.

get_my_contributions

Your contributions per UTC day — commits, merge requests, reviews, releases and work items — with the total, the busiest day and your current and longest streaks. Your own view counts everything, private work included. The range defaults to the trailing 365 days; pass year for a calendar year, or from and to (at most 366 days). Pipeline runs and agents get an empty heatmap.

Parameters

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.
  • 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 or service account id.
  • principal_typestringuser or service_account.
  • tostringResolved inclusive range end, YYYY-MM-DD.
  • totalinteger · int64Sum of count across all cells in range.
200 exampleSynthesized example
{
"cells": [
{
"by_type": {
"commits": 88,
"issues": 80,
"mrs": 58,
"releases": 56,
"reviews": 83
},
"count": 3,
"date": "date-70aa"
},
{
"by_type": {
"commits": 16,
"issues": 84,
"mrs": 68,
"releases": 87,
"reviews": 78
},
"count": 5,
"date": "date-9cdd"
}
],
"current_streak": 70,
"from": "from-2bbe",
"longest_streak": 6,
"max_per_day": 22,
"principal_id": "672c5374-042b-499b-9af7-18149cd0f863",
"principal_type": "principal-type-3fc1",
"to": "to-c54d",
"total": 2
}
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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-b13c",
"message": "Draw the region map from operation density"
}
}
401Unauthenticatedapplication/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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-ab8e",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-f8b8",
"message": "Label every synthesized example"
}
}

CLI

gitmoap contributions get-my-contributions

  • --fromstringoptionalInclusive range start (YYYY-MM-DD).
  • --tostringoptionalInclusive range end (YYYY-MM-DD).
  • --yearnumberoptionalConvenience: whole calendar year. Exclusive with from/to.

Used in these guides