Recording user input for automatic playback

I have an idea, but I haven’t tried it yet, I want to record it and save it to a mysql database via REST api, I’ll let you know if it works out.