adds post restore endpoint

@retrofox I had some difficulty getting the test suite to run. So I've added a test for the new Post `restore` endpoint, but I haven't actually tested it to make sure it works correctly, so definitely try it out before you merge this. :-)