Build a REST API endpoint in Python that takes a user's name and returns a personalized greeting message.
name = "John"
from flask import Flask

app = Flask(__name__)

@app.route('/greeting', methods=['GET'])
def get_greeting(name):
 return 'Hello, ' + name + '!'

if __name__ == '__main__':
 app.run()