finished rest api with category manager