# us.off-the-clock.admin.testAutomod

> Runs a pair's automod rules, or draft rules in their place, over a sample record as a new version, writing and queuing nothing (D95). The AppView asks the feed generator under its own service auth. Effective admins, the community identity and the pair's own admins.

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.testAutomod)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.testAutomod/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.testAutomod/analytics)

## Procedure (`us.off-the-clock.admin.testAutomod`)

Type: procedure · POST

### Input (application/json)

- `record` (object, required)
- `rules` (array): Draft rules, each a us.off-the-clock.automod.rule value with an optional rkey, run in place of the pair's rules with the same rkeys.
  - Constraints: maxLength: 100
  - `items` (unknown)
- `space` (string · tid, required): The pair's TID.

### Output (application/json)

- `labels` (array, required)
  - `items` (string)
    - Constraints: maxLength: 128
- `outcomes` (array, required)
  - `items` (ref)
    - Reference: `us.off-the-clock.admin.defs#automodOutcome`
- `warning` (ref): The types of the content warning the run would write beside the content-warning it adds, the matching rules' in rule order, each once (CW-9).
  - Reference: `us.off-the-clock.automod.rule#warning`

### Errors

- `NotAdmin`: No description in schema.
- `InvalidRequest`: No description in schema.
- `InvalidRule`: No description in schema.
- `AutomodUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Runs a pair's automod rules, or draft rules in their place, over a sample record as a new version, writing and queuing nothing (D95). The AppView asks the feed generator under its own service auth. Effective admins, the community identity and the pair's own admins.",
      "errors": [
        {
          "name": "NotAdmin"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "InvalidRule"
        },
        {
          "name": "AutomodUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "record": {
              "properties": {
                "collection": {
                  "format": "nsid",
                  "type": "string"
                },
                "labels": {
                  "description": "Labels the sample already carries.",
                  "items": {
                    "maxLength": 128,
                    "type": "string"
                  },
                  "type": "array"
                },
                "value": {
                  "type": "unknown"
                }
              },
              "required": [
                "collection",
                "value"
              ],
              "type": "object"
            },
            "rules": {
              "description": "Draft rules, each a us.off-the-clock.automod.rule value with an optional rkey, run in place of the pair's rules with the same rkeys.",
              "items": {
                "type": "unknown"
              },
              "maxLength": 100,
              "type": "array"
            },
            "space": {
              "description": "The pair's TID.",
              "format": "tid",
              "type": "string"
            }
          },
          "required": [
            "space",
            "record"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "labels": {
              "items": {
                "maxLength": 128,
                "type": "string"
              },
              "type": "array"
            },
            "outcomes": {
              "items": {
                "ref": "us.off-the-clock.admin.defs#automodOutcome",
                "type": "ref"
              },
              "type": "array"
            },
            "warning": {
              "description": "The types of the content warning the run would write beside the content-warning it adds, the matching rules' in rule order, each once (CW-9).",
              "ref": "us.off-the-clock.automod.rule#warning",
              "type": "ref"
            }
          },
          "required": [
            "outcomes",
            "labels"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "us.off-the-clock.admin.testAutomod",
  "lexicon": 1
}
```
