---
title: "A person's contribution graph and timeline for the last year"
description: "A contribution is a commit that reached a repository's main (credited to its author and to every Co-authored-by person whose sign-in email it names, if they can open that repository; merge commits never), a branch opened (by the person whose sign-in pushed it), a review, or a repository made. Pushes, merges as such, checks and saves of the shared files themselves do not count. A repository's past commits count when its main first arrives (pando init in an existing repo, a first push of main), read in the background a page at a time.\nA viewer sees only the work in repositories they can open now, on their own profile too. Counts are kept per UTC hour in the person's feed; a credit shows about half a second after a merge. With `day`, the answer is that day's ContributionPeriod. 404 for an org or no such person."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.gitpando.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Pando API › users

`GET /v1/users/{login}/contributions`

A contribution is a commit that reached a repository's main (credited to its author and to every Co-authored-by person whose sign-in email it names, if they can open that repository; merge commits never), a branch opened (by the person whose sign-in pushed it), a review, or a repository made. Pushes, merges as such, checks and saves of the shared files themselves do not count. A repository's past commits count when its main first arrives (pando init in an existing repo, a first push of main), read in the background a page at a time.
A viewer sees only the work in repositories they can open now, on their own profile too. Counts are kept per UTC hour in the person's feed; a credit shows about half a second after a merge. With `day`, the answer is that day's ContributionPeriod. 404 for an org or no such person.

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `getContributions.path.login` (string, required) — A user's login, which is their namespace, or an organization's (one space for both): 1 to 39 lower-case letters, digits and single hyphens, no hyphen at either end (input in any case is lowered). Reserved, because a namespace is the first URL segment: v1, healthz, login, logout, settings, assets, fonts, new, api, app, static, orgs, users, docs, install. A login made at sign-in comes from the email's local part, skipping reserved and taken names (`base`, `base-2`, ... `base-999`, then a random tail).
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`

## Query parameters

- `getContributions.query.tz` (integer, optional) — The viewer's time zone, in minutes east of UTC (-420 for California in summer; the browser's -getTimezoneOffset()). Days are counted in it, at its offset today for the whole year: up to an hour off across a daylight-saving change, half-hour zones rounded to the hour.
  - min -720; max 840; default `0`
- `getContributions.query.day` (string, optional) — One day of the window (YYYY-MM-DD) for its timeline alone.
  - format `date`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://app.gitpando.com/v1/users/string/contributions \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/users/string/contributions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/users/string/contributions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK (Contributions; with `day`, ContributionPeriod)

#### Example

```json
{
  "login": "string",
  "tz": 0,
  "from": "2019-08-24",
  "to": "2019-08-24",
  "total": 0,
  "levels": [
    0,
    0,
    0,
    0
  ],
  "days": [
    {
      "date": "2019-08-24",
      "n": 0,
      "commit": 0,
      "branch": 0,
      "review": 0,
      "created": 0
    }
  ],
  "monorepos": [
    {
      "full_name": "string",
      "owner_type": "user",
      "kind": "monorepo",
      "n": 0,
      "months": [
        0
      ]
    }
  ],
  "kinds": {
    "commit": 0,
    "branch": 0,
    "review": 0,
    "created": 0
  },
  "months": [
    {
      "period": "string",
      "commit": [
        {
          "full_name": "string",
          "n": 0
        }
      ],
      "branch": [
        {
          "full_name": "string",
          "n": 0
        }
      ],
      "review": [
        {
          "full_name": "string",
          "n": 0
        }
      ],
      "created": [
        {
          "full_name": "string",
          "at": "2019-08-24T14:15:22Z"
        }
      ],
      "joined": [
        {
          "org": "string",
          "name": "string",
          "at": "2019-08-24T14:15:22Z",
          "created": true
        }
      ]
    }
  ]
}
```

One of:

- [Contributions](/api/schemas/Contributions/)
- [ContributionPeriod](/api/schemas/ContributionPeriod/)

### 400

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getContributions.response.400.error` (object, required)
  - `getContributions.response.400.error.code` (string, required)
  - `getContributions.response.400.error.message` (string, required)
  - `getContributions.response.400.error.paths` (array<string>, optional)
  - `getContributions.response.400.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getContributions.response.400.error.checks.sha` (string | null, required)
    - `getContributions.response.400.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getContributions.response.400.error.checks.required` (array | null, required) — Null while unknown.
    - `getContributions.response.400.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getContributions.response.400.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getContributions.response.400.error.checks.statuses.sha` (string, required)
      - `getContributions.response.400.error.checks.statuses.context` (string, required)
      - `getContributions.response.400.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getContributions.response.400.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getContributions.response.400.error.checks.statuses.target_url` (string | null, optional)
      - `getContributions.response.400.error.checks.statuses.description` (string | null, optional)
      - `getContributions.response.400.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getContributions.response.400.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getContributions.response.400.error.checks.missing` (array<string>, optional)

### 401

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getContributions.response.401.error` (object, required)
  - `getContributions.response.401.error.code` (string, required)
  - `getContributions.response.401.error.message` (string, required)
  - `getContributions.response.401.error.paths` (array<string>, optional)
  - `getContributions.response.401.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getContributions.response.401.error.checks.sha` (string | null, required)
    - `getContributions.response.401.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getContributions.response.401.error.checks.required` (array | null, required) — Null while unknown.
    - `getContributions.response.401.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getContributions.response.401.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getContributions.response.401.error.checks.statuses.sha` (string, required)
      - `getContributions.response.401.error.checks.statuses.context` (string, required)
      - `getContributions.response.401.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getContributions.response.401.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getContributions.response.401.error.checks.statuses.target_url` (string | null, optional)
      - `getContributions.response.401.error.checks.statuses.description` (string | null, optional)
      - `getContributions.response.401.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getContributions.response.401.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getContributions.response.401.error.checks.missing` (array<string>, optional)

### 404

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getContributions.response.404.error` (object, required)
  - `getContributions.response.404.error.code` (string, required)
  - `getContributions.response.404.error.message` (string, required)
  - `getContributions.response.404.error.paths` (array<string>, optional)
  - `getContributions.response.404.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getContributions.response.404.error.checks.sha` (string | null, required)
    - `getContributions.response.404.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getContributions.response.404.error.checks.required` (array | null, required) — Null while unknown.
    - `getContributions.response.404.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getContributions.response.404.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getContributions.response.404.error.checks.statuses.sha` (string, required)
      - `getContributions.response.404.error.checks.statuses.context` (string, required)
      - `getContributions.response.404.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getContributions.response.404.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getContributions.response.404.error.checks.statuses.target_url` (string | null, optional)
      - `getContributions.response.404.error.checks.statuses.description` (string | null, optional)
      - `getContributions.response.404.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getContributions.response.404.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getContributions.response.404.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/users/getContributions/index.md
