Added restore endpoint to api - ref #1023

Also, names of submitted files are now stored in the database.