# computer.localnetwork.flags.getFlags

> Every feature flag's public gates, and whether the caller is targeted by account or group. Inter-service auth is optional: without it, nothing is targeted. A flag is on for a caller when it's enabled and it's on for everyone, targets them, or their DID falls inside the percentage. Group names and member lists aren't exposed.

- Kind: query
- Authority: flags.localnetwork.computer
- Lexicon: 1
- Published by [localnetwork.computer](https://lexicon.garden/identity/did:plc:d42l64gsczg6qh2vo243xv5l), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.flags.getFlags)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.flags.getFlags/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.flags.getFlags/analytics)

## Query (`computer.localnetwork.flags.getFlags`)

Type: query · GET

### Output (application/json)

- `flags` (array, required)
  - `items` (ref)
    - Reference: `#flag`

### Errors

- `AuthenticationRequired`: A token was sent and isn't valid.
- `RateLimitExceeded`: No description in schema.

## #flag (`computer.localnetwork.flags.getFlags#flag`)

Type: object

### Properties

- `enabled` (boolean, required): False means off for every caller, whatever the other gates say.
- `everyone` (boolean, required)
- `key` (string, required)
  - Constraints: maxLength: 64
- `percentage` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `targeted` (boolean, required): The caller is one of the flag's accounts or in one of its groups.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "flag": {
      "properties": {
        "enabled": {
          "description": "False means off for every caller, whatever the other gates say.",
          "type": "boolean"
        },
        "everyone": {
          "type": "boolean"
        },
        "key": {
          "maxLength": 64,
          "type": "string"
        },
        "percentage": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "targeted": {
          "description": "The caller is one of the flag's accounts or in one of its groups.",
          "type": "boolean"
        }
      },
      "required": [
        "key",
        "enabled",
        "everyone",
        "percentage",
        "targeted"
      ],
      "type": "object"
    },
    "main": {
      "description": "Every feature flag's public gates, and whether the caller is targeted by account or group. Inter-service auth is optional: without it, nothing is targeted. A flag is on for a caller when it's enabled and it's on for everyone, targets them, or their DID falls inside the percentage. Group names and member lists aren't exposed.",
      "errors": [
        {
          "description": "A token was sent and isn't valid.",
          "name": "AuthenticationRequired"
        },
        {
          "name": "RateLimitExceeded"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "flags": {
              "items": {
                "ref": "#flag",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "flags"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "computer.localnetwork.flags.getFlags",
  "lexicon": 1
}
```
