rework of rest api, following rest standards