Merge pull request #494 from n-shiota/rest

REST API refactoring