# social.grain.admin.startScan

> Start a classifier scan. Answers once it is under way; progress is polled from getReviewStats. Requires an admin session.

- Kind: procedure
- Authority: admin.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.admin.startScan)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.admin.startScan/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.admin.startScan/analytics)

## Procedure (`social.grain.admin.startScan`)

Type: procedure · POST

### Input (application/json)

- `classifier` (string): Only this classifier; every one when left out.
- `force` (boolean): Rescore subjects unchanged since their last scan.
- `limit` (integer): Stop after this many subjects.
  - Constraints: minimum: 1

### Output (application/json)

- `started` (boolean, required)

### Errors

- `NotConfigured`: No classifier model is configured.
- `ScanRunning`: A scan is already running.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Start a classifier scan. Answers once it is under way; progress is polled from getReviewStats. Requires an admin session.",
      "errors": [
        {
          "description": "No classifier model is configured.",
          "name": "NotConfigured"
        },
        {
          "description": "A scan is already running.",
          "name": "ScanRunning"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "classifier": {
              "description": "Only this classifier; every one when left out.",
              "type": "string"
            },
            "force": {
              "description": "Rescore subjects unchanged since their last scan.",
              "type": "boolean"
            },
            "limit": {
              "description": "Stop after this many subjects.",
              "minimum": 1,
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "started": {
              "type": "boolean"
            }
          },
          "required": [
            "started"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.grain.admin.startScan",
  "lexicon": 1
}
```
