created iterated rest api endpoint for saving a new sample to a chain