---
title: "Read every stored piece again and rebuild the session's numbers (how a parser fix reaches stored sessions)"
---

> 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 › sessions

`POST /v1/monorepos/{owner}/{monorepo}/sessions/{id}/reindex`

## Authentication

Requires one of the following:

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

## Path parameters

- `reindexSession.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `reindexSession.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `reindexSession.path.id` (string, required)

## Code samples

### cURL

```curl
curl --request POST \
  --url https://app.gitpando.com/v1/monorepos/string/string/sessions/string/reindex \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/sessions/string/reindex';
const options = {method: 'POST', 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/monorepos/string/string/sessions/string/reindex"

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

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

print(response.text)
```

## Responses

### 200

The session now.

#### Example

```json
{
  "id": "string",
  "state": "active",
  "person": "string",
  "machine": "string",
  "program": "claude-code",
  "models": [
    {
      "model": "string",
      "answers": 0
    }
  ],
  "repo": "string",
  "branch": "string",
  "parent": "string",
  "subagents": 0,
  "started_at": "2019-08-24T14:15:22Z",
  "last_at": "2019-08-24T14:15:22Z",
  "prompts": 0,
  "tool_calls": 0,
  "images": 0,
  "redactions": 0,
  "bytes": 0,
  "end": 0,
  "removed": [
    {
      "prompt": 0,
      "by": "string",
      "at": "2019-08-24T14:15:22Z"
    }
  ],
  "commits": [
    {
      "repo": "string",
      "sha": "string",
      "branch": "string",
      "title": "string",
      "committed_at": "2019-08-24T14:15:22Z",
      "on_main": true,
      "model": "string"
    }
  ]
}
```

- `reindexSession.response.200.id` (string, required)
- `reindexSession.response.200.state` (string, required)
  - one of `"active"`, `"inactive"`
- `reindexSession.response.200.person` (string, required)
- `reindexSession.response.200.machine` (string, required)
- `reindexSession.response.200.program` (string, required)
  - one of `"claude-code"`, `"codex"`, `"pi"`, `"opencode"`
- `reindexSession.response.200.models` (array<object>, required) — Most answers first, then the latest used.
  - `reindexSession.response.200.models.model` (string, required)
  - `reindexSession.response.200.models.answers` (integer, required)
- `reindexSession.response.200.repo` (string | null, required)
- `reindexSession.response.200.branch` (string | null, required)
- `reindexSession.response.200.parent` (string | null, required)
- `reindexSession.response.200.subagents` (integer, required)
- `reindexSession.response.200.started_at` (string | null, required)
  - format `date-time`
- `reindexSession.response.200.last_at` (string | null, required)
  - format `date-time`
- `reindexSession.response.200.prompts` (integer, required)
- `reindexSession.response.200.tool_calls` (integer, required)
- `reindexSession.response.200.images` (integer, required)
- `reindexSession.response.200.redactions` (integer, required)
- `reindexSession.response.200.bytes` (integer, required)
- `reindexSession.response.200.end` (integer, required) — Where the next piece starts.
- `reindexSession.response.200.removed` (array<object>, required)
  - `reindexSession.response.200.removed.prompt` (integer, required)
  - `reindexSession.response.200.removed.by` (string, required)
  - `reindexSession.response.200.removed.at` (string, required)
    - format `date-time`
- `reindexSession.response.200.commits` (array<object>, required) — Its pushed commits, oldest first by committer time; within one second, the branch's own order, then sha. At most 500.
  - `reindexSession.response.200.commits.repo` (string, required)
  - `reindexSession.response.200.commits.sha` (string, required)
  - `reindexSession.response.200.commits.branch` (string | null, required)
  - `reindexSession.response.200.commits.title` (string, required)
  - `reindexSession.response.200.commits.committed_at` (string, required)
    - format `date-time`
  - `reindexSession.response.200.commits.on_main` (boolean, required)
  - `reindexSession.response.200.commits.model` (string | null, required) — The model in force in the session at the commit's time; null when the sessions naming the commit disagree or one has none, the same in every view.


Source: https://docs.gitpando.com/api/sessions/reindexSession/index.md
