# games.gamesgamesgamesgames.reindexCatalogueGames

> Queue a job that brings the index rows of these catalogue games back in line with the catalogue PDS. The catalogue repo itself is not changed. Admins only. One reindex runs at a time.

- Kind: procedure
- Authority: gamesgamesgamesgames.games
- Lexicon: 1
- Published by [gamesgamesgamesgames.games](https://lexicon.garden/identity/did:web:gamesgamesgamesgames.games), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.reindexCatalogueGames)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.reindexCatalogueGames/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.reindexCatalogueGames/analytics)

## Procedure (`games.gamesgamesgamesgames.reindexCatalogueGames`)

Type: procedure · POST

### Input (application/json)

- `dryRun` (boolean): Compare only, and report how many would be reindexed.
  - Constraints: default: false
- `perSecond` (integer): How many records to process per second, to go easy on the catalogue PDS.
  - Constraints: minimum: 1, maximum: 5, default: 2
- `uris` (array, required): Catalogue game URIs. The job works through them 200 at a time.
  - Constraints: minLength: 1, maxLength: 5000
  - `items` (string · at-uri)

### Output (application/json)

- `alreadyQueued` (boolean): True when a reindex was already pending or running; jobId is that job, and nothing new was queued.
- `count` (integer, required): How many URIs were queued; 0 when alreadyQueued is true.
- `jobId` (string, required)
  - Constraints: maxLength: 128
- `status` (string): The existing job's status, when alreadyQueued is true.
  - Constraints: maxLength: 32, knownValues: pending | running

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Queue a job that brings the index rows of these catalogue games back in line with the catalogue PDS. The catalogue repo itself is not changed. Admins only. One reindex runs at a time.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "dryRun": {
              "default": false,
              "description": "Compare only, and report how many would be reindexed.",
              "type": "boolean"
            },
            "perSecond": {
              "default": 2,
              "description": "How many records to process per second, to go easy on the catalogue PDS.",
              "maximum": 5,
              "minimum": 1,
              "type": "integer"
            },
            "uris": {
              "description": "Catalogue game URIs. The job works through them 200 at a time.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "maxLength": 5000,
              "minLength": 1,
              "type": "array"
            }
          },
          "required": [
            "uris"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "alreadyQueued": {
              "description": "True when a reindex was already pending or running; jobId is that job, and nothing new was queued.",
              "type": "boolean"
            },
            "count": {
              "description": "How many URIs were queued; 0 when alreadyQueued is true.",
              "type": "integer"
            },
            "jobId": {
              "maxLength": 128,
              "type": "string"
            },
            "status": {
              "description": "The existing job's status, when alreadyQueued is true.",
              "knownValues": [
                "pending",
                "running"
              ],
              "maxLength": 32,
              "type": "string"
            }
          },
          "required": [
            "jobId",
            "count"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "games.gamesgamesgamesgames.reindexCatalogueGames",
  "lexicon": 1
}
```
