swagger: "2.0"
info:
  title: LabAPI
  description: Control laboratory devices remotely.
  contact:
    email: ivan.jakovac2@gmail.com
  version: 0.1
securityDefinitions:
  APIKeyHeader:
    type: apiKey
    in: header
    name: X-API-Key
security:
  - APIKeyHeader: []
tags:
  - name: Keysight E5080A
    description: VNA analyzer
  - name: Intelligent Power Supply
    description: 12T magnet power supply
  - name: Lakeshore 336
    description: Temperature controller
paths:
  /keysighte5080a/get_marker_X:
    get:
      tags:
        - Keysight E5080A
      summary: Get frequency [MHz] for Marker [X] 
      description: Returns the frequency in MHz at which marker given by marker_index is located.
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
    post:
      tags:
        - Keysight E5080A
      summary: Get frequency [MHz] for Marker [X] 
      description: Returns the frequency in MHz at which marker given by marker_index is located.
      produces:
        - application/json
      parameters:
        - name: marker_index
          in: body
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          schema:
            type: object
            required:
              - marker_index
            properties:
              marker_index:
                type: integer
                default: 1
                min: 1
                max: 10
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_marker_Y:
    get:
      tags:
        - Keysight E5080A
      summary: Get S11 parameter value [dB] for Marker [X] 
      description: Returns an S11 parameter value in dB at the frequency where marker given by marker_index is located.
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_marker_Y_at:
    get:
      tags:
        - Keysight E5080A
      summary:  Get S11 parameter value [dB] at given frequency [MHz] for Marker [X] 
      description: Moves a Marker given by marker_index to the desired frequency, then returns an S11 parameter value in dB. 
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
        - name: frequency
          in: query
          description: Frequency in MHz.
          required: true
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_minimum:
    get:
      tags:
        - Keysight E5080A
      summary:  Get frequency [MHz] of a S11 parameter minimum for Marker [X] 
      description: Performs minimum search for a Marker given by marker_index, then returns the frequency in MHz. 
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_sweep_points:
    get:
      tags:
        - Keysight E5080A
      summary:  Get a number of sweep (measurement) points 
      description: Returns a number of sweep points.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_Q:
    get:
      tags:
        - Keysight E5080A
      summary:  Get a Q-factor of the tuning/matching circuit 
      description: Finds an S11 minimum and sets a Marker given by marker_index to the minimum frequency. Turns on a NOTCH filter and reads a Q-factor at 13 dB (hard coded).
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_sweep_range:
    get:
      tags:
        - Keysight E5080A
      summary:  Get a current sweep range.
      description: Returns a pair of frequencies defining a sweep range (f_min, f_max).
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_filter:
    get:
      tags:
        - Keysight E5080A
      summary:  Get a bandwidth filter data.
      description: Returns filter data as a list [bandwidth, center, Q-factor, insertion_loss].
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
        - name: threshold
          in: query
          description: S11 value from 0 to 1 where bandwidth and Q-factor are calculated.
          required: true
          default: 1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/get_complex_data:
    get:
      tags:
        - Keysight E5080A
      summary:  Get a full complex sweep data.
      description: Returns a list of (frequency, S11) values for each sweep point, where S11 is given as a complex number.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/set_marker_X:
    put:
      tags:
        - Keysight E5080A
      summary: Set frequency [MHz] for Marker [X] 
      description: Sets the frequency in MHz at which marker given by marker_index is located.
      produces:
        - plain/text
      parameters:
        - name: marker_index
          in: query
          description: Integer from 1 to 10 denoting Marker index.
          required: true
          default: 1
          type: integer
          format: int32
        - name: frequency
          in: query
          description: Frequency in MHz as a float
          required: true
          default: 10.0
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/set_sweep_points:
    put:
      tags:
        - Keysight E5080A
      summary:  Set a number of sweep (measurement) points 
      description: Sets a number of sweep points.
      produces:
        - plain/text
      parameters:
        - name: points
          in: query
          description: Number of sweep points as an integer from 1 to 2001.
          required: true
          default: 1
          type: integer
          format: int32
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /keysighte5080a/set_sweep_range:
    put:
      tags:
        - Keysight E5080A
      summary:  Set a sweep range.
      description: Given a pair of frequencies sets a sweep range.
      produces:
        - plain/text
      parameters:
        - name: start
          in: query
          description: Start frequency in MHz as a float.
          required: true
          default: 5.0
          type: number
          format: float
        - name: stop
          in: query
          description: Stop frequency in MHz as a float.
          required: true
          default: 15.0
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_status:
    post:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS status
      description: Returns system status (normal, quench), activity status (hold on/off) and heater status.
      produces:
        - application/json
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_output_field:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS output field [Teslas]
      description: Returns the effective magnetic field in Teslas for the current that the IPS is currently outputting.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_persistent_field:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the persistent field in magnet [Teslas]
      description: Returns the magnetic field in Teslas when the magnet is in persistent mode.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_setpoint_field:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS setpoint field [Teslas]
      description: Returns the setpoint (target) field in Teslas.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_sweep_rate_field:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS field sweep rate [Teslas/min]
      description: Returns the set magnetic field sweep rate in Teslas/min.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_is_heater_on:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the heater status as Boolean
      description: Returns True when the heater is on, False otherwise.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_is_on_hold:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the activity status HOLD as Boolean
      description: Returns True when the IPS is on hold, False otherwise.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_is_going_to_setpoint:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the activity status GO TO SET as Boolean
      description: Returns True when the IPS is ramping up the current, False otherwise.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_is_going_to_zero:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the activity status GO TO ZERO as Boolean
      description: Returns True when the IPS is ramping down the current, False otherwise.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_is_clamped:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the activity status CLAMPED as Boolean
      description: Returns True when the IPS output is clamped, False otherwise.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_setpoint_field:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the setpoint field [Teslas] 
      description: Sets the setpoint (target) magnetic field in Teslas.
      produces:
        - plain/text
      parameters:
        - name: setpoint_field
          in: query
          description: Setpoint magnetic field in Teslas to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_sweep_rate_field:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the sweep rate field [Teslas/min] 
      description: Sets the IPS sweep rate field in Teslas/min.
      produces:
        - plain/text
      parameters:
        - name: sweep_rate_field
          in: query
          description: Sweep rate current in Teslas/min to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_heater:
    put:
      tags:
        - Intelligent Power Supply
      summary: Switch the heater status
      description: Toggles the heater on or off.
      produces:
        - plain/text
      parameters:
        - name: value
          in: query
          description: Allowed heater status values are "on" or "off".
          required: true
          type: string
          enum: [on, off] 
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_hold:
    put:
      tags:
        - Intelligent Power Supply
      summary: Set the activity status to HOLD
      description: Sets the activity status to HOLD.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_go_to_setpoint:
    put:
      tags:
        - Intelligent Power Supply
      summary: Set the activity status to GO TO SETPOINT
      description: Sets the activity status to GO TO SETPOINT.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_go_to_zero:
    put:
      tags:
        - Intelligent Power Supply
      summary: Set the activity status to GO TO ZERO
      description: Sets the activity status to GO TO ZERO.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_clamped:
    put:
      tags:
        - Intelligent Power Supply
      summary: Set the activity status to CLAMPED
      description: Clamp the magnet coil switch.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_magnetic_field:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the magnetic field to desired value [Teslas] 
      description: Performs entire process of changing the magnetic field but does not enter persistent mode - useful for the magnetic field sweeps.
      produces:
        - plain/text
      parameters:
        - name: magnetic_field
          in: query
          description: Setpoint magnetic field in Teslas to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
        - name: ramp_rate
          in: query
          description: Magnetic field sweep rate in Teslas/min to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_persistent_magnetic_field:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the persistent magnetic field to desired value [Teslas] 
      description: Performs entire process of changing the magnetic field and enters the persistent mode.
      produces:
        - plain/text
      parameters:
        - name: magnetic_field
          in: query
          description: Setpoint magnetic field in Teslas to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
        - name: ramp_rate
          in: query
          description: Magnetic field sweep rate in Teslas/min to 4 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_output_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS output current [Amps]
      description: Returns the current in Amps that the IPS is currently outputting.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_magnet_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the magnet coil current [Amps].
      description: Returns the magnet coil current in Amps.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_setpoint_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS setpoint current [Amps]
      description: Returns the setpoint (target) current in Amps.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_sweep_rate_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS current sweep rate [Amps/min]
      description: Returns the set current sweep rate in Amps/min.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_persistent_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the persistent current in magnet [Amps]
      description: Returns the coil current in Amps when the magnet is in persistent mode.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/get_heater_current:
    get:
      tags:
        - Intelligent Power Supply
      summary: Get the IPS heater current [Amps]
      description: Returns the heater current in Amps.
      produces:
        - plain/text
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_setpoint_current:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the setpoint current [Amps] 
      description: Sets the IPS setpoint (target) current in Amps.
      produces:
        - plain/text
      parameters:
        - name: setpoint_current
          in: query
          description: Setpoint current in Amps to 3 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /ips120/set_sweep_rate_current:
    put:
      tags:
        - Intelligent Power Supply
      summary:  Set the sweep rate current [Amps/min] 
      description: Sets the IPS sweep rate current in Amps/min. 
      produces:
        - plain/text
      parameters:
        - name: sweep_rate_current
          in: query
          description: Sweep rate current in Amps/min to 3 decimal places.
          required: true
          default: 0.1
          type: number
          format: float
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_temperature:
    get:
      tags:
        - Lakeshore 336
      summary: Get temperature for channel [X]
      description: Returns temperature in Kelvin for channel [control_channel].
      produces:
        - plain/text
      parameters:
        - name: control_channel
          in: query
          description: Character denoting a control channel  [A, B, C, D]
          required: true
          type: string
          enum: [A, B, C, D]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_sensor:
    get:
      tags:
        - Lakeshore 336
      summary: Get sensor reading for channel [X]
      description: Returns the sensor reading in Ohms for channel [control_channel].
      produces:
        - plain/text
      parameters:
        - name: control_channel
          in: query
          description: Character denoting a control channel [A, B, C, D]
          required: true
          type: string
          enum: [A, B, C, D]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_setpoint:
    get:
      tags:
        - Lakeshore 336
      summary: Get the setpoint for control loop [X]
      description: Returns the setpoint in Kelvin for control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_heater_range:
    get:
      tags:
        - Lakeshore 336
      summary:  Get heater range
      description: "Returns the heater range as heater range index: 0 - Off, 1 - Low, 2 - Medium, 3 - High"
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_heater_percent:
    get:
      tags:
        - Lakeshore 336
      summary: Get heater power (range) percentage
      description: Returns a heater power as a percentage of a current heater range.
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_heater_percent_fullrange:
    get:
      tags:
        - Lakeshore 336
      summary:  Get heater power (full) percentage
      description: Returns a heater power as a percentage of the total power.
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_pid:
    get:
      tags:
        - Lakeshore 336
      summary:  Get PID parameters for control loop [X]
      description: Returns a [P, I, D] list of PID parameters for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_ramp_rate:
    get:
      tags:
        - Lakeshore 336
      summary:  Get the ramp rate for control loop [X]
      description: Returns the ramp rate in Kelvin/min for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/get_manual_output:
    get:
      tags:
        - Lakeshore 336
      summary:  Get the manual output for control loop [X]
      description: Returns the manual output (range) precentage for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/set_setpoint:
    put:
      tags:
        - Lakeshore 336
      summary: Set the setpoint for control loop [X]
      description: Sets the setpoint in Kelvin for control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: setpoint
          in: query
          description: Setpoint temperature in Kelvin
          required: true
          default: 0
          type: number
          format: float32
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/set_heater_range:
    put:
      tags:
        - Lakeshore 336
      summary:  Set a heater range.
      description: "Sets the heater range given a heater range index: 0 - Off, 1 - Low, 2 - Medium, 3 - High"
      produces:
        - plain/text
      parameters:
        - name: range_index
          in: query
          description: Number a heater range index [0 - Off, 1 - Low, 2 - Medium, 3 - High]
          required: true
          default: 0
          type: integer
          enum: [0, 1, 2, 3]
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/set_pid:
    put:
      tags:
        - Lakeshore 336
      summary:  Set PID parameters for control loop [X]
      description: Sets PID parameters given P, I, and D for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: P
          in: query
          description: Proportinal (P) parameter
          required: true
          default: 5.0
          type: number
          format: float
        - name: I
          in: query
          description: Integral (I) parameter
          required: true
          default: 5.0
          type: number
          format: float
        - name: D
          in: query
          description: Derivative (D) parameter
          required: true
          default: 0.0
          type: number
          format: float
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/set_ramp_rate:
    put:
      tags:
        - Lakeshore 336
      summary:  Set the ramp rate for control loop [X]
      description: Set the ramp rate in Kelvin/min for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: ramp_rate
          in: query
          description: Ramp rate in Kelvin/min
          required: true
          default: 0
          type: number
          format: float32
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
  /lakeshore336/set_manual_output:
    put:
      tags:
        - Lakeshore 336
      summary:  Set the manual output for control loop [X]
      description: Sets the manual output (range) precentage for a given control loop [control_loop].
      produces:
        - plain/text
      parameters:
        - name: manual_output
          in: query
          description: Manual output as a percentage of a current heater range
          required: true
          default: 0
          type: number
          format: float32
        - name: control_loop
          in: query
          description: Number denoting a control loop [1, 2]
          required: true
          default: 2
          type: integer
          enum: [1, 2]
      responses:
        200:
          description: Success.
        401:
          description: Not authorized.
        500:
          description: Internal unhandled server error. Contact developers.
    
