Saving data from webapp

Hello everyone

I am new to developing for mattermost. I want to create a plugin that takes a text input from user and stores it which I should later be able to read. For this i want to understand how to save and retrieve data through the webapp plugin from the mattermost server.