Adding JS REST API Functions