# Get the last year of commit activity

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/stats/commit_activity`

Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

## Responses

### `200`

Response

### `application/json`

- Type: `array`

```json
[
  {
    "days": [
      0,
      3,
      26,
      20,
      39,
      1,
      0
    ],
    "total": 89,
    "week": 1336280400
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/commit-activity"},"type":"array"}
```

### `202`

Accepted

### `application/json`

- Type: `object`

```json
{"type":"object"}
```

### `204`

A header with no content is returned.

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/stats/commit_activity
```
