input: Write a function using Flask to create an API that takes a list of integers and returns the minimum and maximum values from this list.
  
  from flask import Flask, request
  app = Flask(__name__)
  
  @app.route('/minmax', methods=['POST'])
  def minmax():
      data = request.get_json()
      nums = data['nums']
      minVal = min(nums)
      maxVal = max(nums)
      return {'min': minVal, 'max': maxVal}
  
  if __name__ == '__main__':
      app.run()
output: def minmax():
      data = request.get_json()
      nums = data['nums']
      minVal = min(nums)
      maxVal = max(nums)
      return {'min': minVal, 'max': maxVal}