get:
  tags:
    - Clients and Tunnels
  summary: Get client by id
  operationId: ClientGet
  parameters:
    - name: client_id
      in: path
      description: unique client ID
      required: true
      schema:
        type: string
    - name: fields[<RESOURCE>]
      in: query
      description: >-
        Fields to be returned. It should be provided in the format as
        `fields[<RESOURCE>]=<FIELDS>`, where `<RESOURCE>` is `clients` and
        `<FIELDS>` is a comma separated list of fields. Example:
        `fields[clients]=id,name`. If no fields are specified, all will be
        returned.
      schema:
        type: string
  responses:
    '200':
      description: success response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: ../components/schemas/Client.yaml
    '404':
      description: Client not found
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
    '500':
      description: Invalid operation
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
delete:
  tags:
    - Clients and Tunnels
  summary: Delete a disconnected client by id
  description: >-
    Deletes a client by a given id. This API requires the current client to be
    offline. Returns 400 otherwise.
  operationId: ClientDelete
  parameters:
    - name: client_id
      in: path
      description: unique client ID
      required: true
      schema:
        type: string
  responses:
    '204':
      description: Successful operation.
      content: {}
    '400':
      description: 'Invalid request: client is active or provided client ID is empty.'
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
    '404':
      description: Client not found
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
    '500':
      description: Invalid operation
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
