generic rest api methods (oh god i should have planned this out more)