# games.gamesgamesgamesgames.backfillGameSlugs

> Queue a job that gives games with no slug one, and puts the slug on their search document. Existing slugs are never changed. A dry run unless dryRun is false. Admins and the maintenance account only. One backfill 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.backfillGameSlugs)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.backfillGameSlugs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.backfillGameSlugs/analytics)

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

Type: procedure · POST

### Input (application/json)

- `dryRun` (boolean): Choose slugs and compare search documents, but write nothing. Pass false to write.
  - Constraints: default: true
- `maxGames` (integer): Stop after this many games, for a trial run.
  - Constraints: minimum: 1
- `uris` (array): Only these game URIs. A game that already has a slug gets it copied to its search document if that is missing it. Without uris, the job walks every game that has no slug.
  - Constraints: minLength: 1, maxLength: 5000
  - `items` (string · at-uri)

### Output (application/json)

- `alreadyQueued` (boolean): True when a backfill was already pending or running; jobId is that job, and nothing new was queued.
- `dryRun` (boolean, required)
- `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 gives games with no slug one, and puts the slug on their search document. Existing slugs are never changed. A dry run unless dryRun is false. Admins and the maintenance account only. One backfill runs at a time.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "dryRun": {
              "default": true,
              "description": "Choose slugs and compare search documents, but write nothing. Pass false to write.",
              "type": "boolean"
            },
            "maxGames": {
              "description": "Stop after this many games, for a trial run.",
              "minimum": 1,
              "type": "integer"
            },
            "uris": {
              "description": "Only these game URIs. A game that already has a slug gets it copied to its search document if that is missing it. Without uris, the job walks every game that has no slug.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "maxLength": 5000,
              "minLength": 1,
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "alreadyQueued": {
              "description": "True when a backfill was already pending or running; jobId is that job, and nothing new was queued.",
              "type": "boolean"
            },
            "dryRun": {
              "type": "boolean"
            },
            "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",
            "dryRun"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "games.gamesgamesgamesgames.backfillGameSlugs",
  "lexicon": 1
}
```
