Added gallery posting and post fetching to REST api