@plugin.route('/configuration/', methods=['POST'])
def configuration_create():
    config_instance = {}
    configuration_uuid = str(uuid.uuid4())
    config_instance['uuid'] = configuration_uuid
    params = {'use_https': {'required': True, 'default': False}, 'method': {'required': True, 'default': 'GET'}, 'hostname': {'required': True, 'default': None}, 'port': {'required': True, 'default': 80}, 'path': {'required': True, 'default': '/'}, 'test_body': {'required': False, 'default': None}, 'test_header': {'required': False, 'default': None}}
    for param in params:
        is_required = params[param]['required']
        default_value = params[param]['default']
        if (param in request.form):
            value = request.form.get(param, type=str)
            current_app.logger.info(f"'{param}' set to: '{value}'.")
            config_instance[param] = value
        elif (is_required and (default_value is not None)):
            value = default_value
            current_app.logger.info(f"'{param}' set to default value: '{value}'.")
            config_instance[param] = value
        if (is_required and (param not in config_instance)):
            current_app.logger.error(f'Required parameter {param} not provided.')
            return (f'Required parameter {param} not provided.', 400)
    persistence['configuration'][configuration_uuid] = config_instance
    current_app.logger.info(f'Config: {config_instance}')
    return (jsonify(config_instance), 201)
@plugin.route('/configuration/', methods=['POST'])
def configuration_create():
    config_instance = {}
    configuration_uuid = str(uuid.uuid4())
    config_instance['uuid'] = configuration_uuid
    params = {'use_https': {'required': True, 'default': False}, 'method': {'required': True, 'default': 'GET'}, 'hostname': {'required': True, 'default': None}, 'port': {'required': True, 'default': 80}, 'path': {'required': True, 'default': '/'}, 'test_body': {'required': False, 'default': None}, 'test_header': {'required': False, 'default': None}}
    for param in params:
        is_required = params[param]['required']
        default_value = params[param]['default']
        if (param in request.form):
            value = request.form.get(param, type=str)
            current_app.logger.info(f"'{param}' set to: '{value}'.")
            config_instance[param] = value
        elif (is_required and (default_value is not None)):
            value = default_value
            current_app.logger.info(f"'{param}' set to default value: '{value}'.")
            config_instance[param] = value
        if (is_required and (param not in config_instance)):
            current_app.logger.error(f'Required parameter {param} not provided.')
            return (f'Required parameter {param} not provided.', 400)
    persistence['configuration'][configuration_uuid] = config_instance
    current_app.logger.info(f'Config: {config_instance}')
    return (jsonify(config_instance), 201)