/api/v1/config/interfaces:
  get:
    description: List all interfaces
    responses:
      '200':
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigInterfacesList'
        description: Item
      '401':
        $ref: '#/components/responses/Unauthorized'
    tags:
      - Config/Interfaces
  post:
    description: Create a virtual interface
    requestBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConfigInterfaceCreate'
    responses:
      '200':
        $ref: '#/components/responses/Message'
      '401':
        $ref: '#/components/responses/Unauthorized'
      '422':
        $ref: '#/components/responses/UnprocessableEntity'
    tags:
      - Config/Interfaces

/api/v1/config/interface/{interface_id}:
  get:
    description: Get an item
    parameters:
    - in: path
      name: interface_id
      required: true
      schema:
        type: string
    responses:
      '200':
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigInterfaceGet'
        description: Item
      '401':
        $ref: '#/components/responses/Unauthorized'
      '404':
        $ref: '#/components/responses/NotFound'
    tags:
      - Config/Interfaces
  put:
    description: Update the configuration of an interface
    parameters:
    - in: path
      name: interface_id
      required: true
      schema:
        type: string
    requestBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConfigInterfaceUpdate'
    responses:
      '200':
        $ref: '#/components/responses/Message'
      '401':
        $ref: '#/components/responses/Unauthorized'
      '404':
        $ref: '#/components/responses/NotFound'
      '422':
        $ref: '#/components/responses/UnprocessableEntity'
    tags:
      - Config/Interfaces
  delete:
    description: Remove a virtual interface
    parameters:
    - in: path
      name: interface_id
      required: true
      schema:
        type: string
    responses:
      '200':
        description: Deleted an interface
      '401':
        $ref: '#/components/responses/Unauthorized'
      '404':
        $ref: '#/components/responses/NotFound'
      '412':
        $ref: '#/components/responses/Message'
        description: "Failed to respect precondition to delete interface"
    tags:
      - Config/Interfaces

/api/v1/config/interface/{interface_id}/up:
  post:
    description: Put an interface up
    parameters:
    - in: path
      name: interface_id
      required: true
      schema:
        type: string
    responses:
      '200':
        $ref: '#/components/responses/Message'
      '401':
        $ref: '#/components/responses/Unauthorized'
      '404':
        $ref: '#/components/responses/NotFound'
      '412':
        $ref: '#/components/responses/Message'
        description: "Failed to respect precondition to put interface up"
    tags:
      - Config/Interfaces

/api/v1/config/interface/{interface_id}/down:
  post:
    description: Put an interface down
    parameters:
    - in: path
      name: interface_id
      required: true
      schema:
        type: string
    responses:
      '200':
        $ref: '#/components/responses/Message'
      '401':
        $ref: '#/components/responses/Unauthorized'
      '404':
        $ref: '#/components/responses/NotFound'
      '412':
        $ref: '#/components/responses/Message'
        description: "Failed to respect precondition to put interface down"
    tags:
      - Config/Interfaces
