# link.jetbridge.getManagement

> Get how a Provider admits Clients, and what it knows about each of them.

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.getManagement)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.getManagement/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:jetbridge.link/link.jetbridge.getManagement/analytics)

## Query (`link.jetbridge.getManagement`)

Type: query · GET

### Output (application/json)

- `admission` (string, required): Who may open a tunnel, as in the Provider's record.
  - Constraints: maxLength: 32, knownValues: open | approval | closed
- `clients` (array, required): The Clients the Provider knows of.
  - `items` (ref)
    - Reference: `#client`
- `defaults` (ref, required): The limits for a Client that has no approval overriding them.
  - Reference: `link.jetbridge.provider#limits`
- `deniedDids` (array, required): Clients the Provider refuses.
  - `items` (string · did)
- `deniedHostnames` (array, required): Hostnames the Provider refuses to serve.
  - `items` (string)
    - Constraints: maxLength: 253
- `trusted` (array, required): Clients the Provider trusts.
  - `items` (string · did)

### Errors

- `OperatorNotSet`: The Provider has no operator.
- `NotOperator`: The caller is not the Provider's operator.

## #approval (`link.jetbridge.getManagement#approval`)

Type: object

### Properties

- `createdAt` (string · datetime, required)
- `expiresAt` (string · datetime)
- `limits` (ref): The approval's overrides of the Provider's defaults.
  - Reference: `link.jetbridge.approval#limits`

## #capUsage (`link.jetbridge.getManagement#capUsage`)

Type: object

### Properties

- `bytes` (integer, required): Bytes the Client has carried in the cap's direction during the cap's timespan, up to now.
  - Constraints: minimum: 0
- `cap` (ref, required)
  - Reference: `link.jetbridge.provider#trafficCap`
- `partial` (boolean): True when bytes may be too low, because the Provider doesn't keep traffic for the cap's whole timespan.

## #client (`link.jetbridge.getManagement#client`)

Type: object

### Properties

- `approval` (ref): The Client's approval, when it has one.
  - Reference: `#approval`
- `capUsage` (array, required): How much of each of the Client's traffic caps it has used.
  - `items` (ref)
    - Reference: `#capUsage`
- `connected` (array, required): Hostnames the Client has a tunnel open for now.
  - `items` (string)
    - Constraints: maxLength: 253
- `denied` (boolean): The Provider refuses this Client.
- `did` (string · did, required)
- `hostnames` (array, required): Hostnames the Client has had traffic for.
  - `items` (string)
    - Constraints: maxLength: 253
- `limits` (ref, required): The limits that apply to this Client now.
  - Reference: `link.jetbridge.provider#limits`
- `trusted` (boolean): The Provider trusts this Client.
- `waiting` (ref): The Client's latest request for approval, while it has not been answered.
  - Reference: `#waiting`

## #waiting (`link.jetbridge.getManagement#waiting`)

Type: object

### Properties

- `firstAsked` (string · datetime, required)
- `hostnames` (array, required): The hostnames in the Client's latest request.
  - `items` (string)
    - Constraints: maxLength: 253
- `lastAsked` (string · datetime, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "approval": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "limits": {
          "description": "The approval's overrides of the Provider's defaults.",
          "ref": "link.jetbridge.approval#limits",
          "type": "ref"
        }
      },
      "required": [
        "createdAt"
      ],
      "type": "object"
    },
    "capUsage": {
      "properties": {
        "bytes": {
          "description": "Bytes the Client has carried in the cap's direction during the cap's timespan, up to now.",
          "minimum": 0,
          "type": "integer"
        },
        "cap": {
          "ref": "link.jetbridge.provider#trafficCap",
          "type": "ref"
        },
        "partial": {
          "description": "True when bytes may be too low, because the Provider doesn't keep traffic for the cap's whole timespan.",
          "type": "boolean"
        }
      },
      "required": [
        "cap",
        "bytes"
      ],
      "type": "object"
    },
    "client": {
      "properties": {
        "approval": {
          "description": "The Client's approval, when it has one.",
          "ref": "#approval",
          "type": "ref"
        },
        "capUsage": {
          "description": "How much of each of the Client's traffic caps it has used.",
          "items": {
            "ref": "#capUsage",
            "type": "ref"
          },
          "type": "array"
        },
        "connected": {
          "description": "Hostnames the Client has a tunnel open for now.",
          "items": {
            "maxLength": 253,
            "type": "string"
          },
          "type": "array"
        },
        "denied": {
          "description": "The Provider refuses this Client.",
          "type": "boolean"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "hostnames": {
          "description": "Hostnames the Client has had traffic for.",
          "items": {
            "maxLength": 253,
            "type": "string"
          },
          "type": "array"
        },
        "limits": {
          "description": "The limits that apply to this Client now.",
          "ref": "link.jetbridge.provider#limits",
          "type": "ref"
        },
        "trusted": {
          "description": "The Provider trusts this Client.",
          "type": "boolean"
        },
        "waiting": {
          "description": "The Client's latest request for approval, while it has not been answered.",
          "ref": "#waiting",
          "type": "ref"
        }
      },
      "required": [
        "did",
        "limits",
        "connected",
        "hostnames",
        "capUsage"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get how a Provider admits Clients, and what it knows about each of them.",
      "errors": [
        {
          "description": "The Provider has no operator.",
          "name": "OperatorNotSet"
        },
        {
          "description": "The caller is not the Provider's operator.",
          "name": "NotOperator"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "admission": {
              "description": "Who may open a tunnel, as in the Provider's record.",
              "knownValues": [
                "open",
                "approval",
                "closed"
              ],
              "maxLength": 32,
              "type": "string"
            },
            "clients": {
              "description": "The Clients the Provider knows of.",
              "items": {
                "ref": "#client",
                "type": "ref"
              },
              "type": "array"
            },
            "defaults": {
              "description": "The limits for a Client that has no approval overriding them.",
              "ref": "link.jetbridge.provider#limits",
              "type": "ref"
            },
            "deniedDids": {
              "description": "Clients the Provider refuses.",
              "items": {
                "format": "did",
                "type": "string"
              },
              "type": "array"
            },
            "deniedHostnames": {
              "description": "Hostnames the Provider refuses to serve.",
              "items": {
                "maxLength": 253,
                "type": "string"
              },
              "type": "array"
            },
            "trusted": {
              "description": "Clients the Provider trusts.",
              "items": {
                "format": "did",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "admission",
            "defaults",
            "trusted",
            "deniedDids",
            "deniedHostnames",
            "clients"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "waiting": {
      "properties": {
        "firstAsked": {
          "format": "datetime",
          "type": "string"
        },
        "hostnames": {
          "description": "The hostnames in the Client's latest request.",
          "items": {
            "maxLength": 253,
            "type": "string"
          },
          "type": "array"
        },
        "lastAsked": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "hostnames",
        "firstAsked",
        "lastAsked"
      ],
      "type": "object"
    }
  },
  "id": "link.jetbridge.getManagement",
  "lexicon": 1
}
```
