The JavaScript API for Power BI still needs to be supported at par with Power BI Service in the Power BI Report Server. The JavaScript API is mostly used for embedding reports in client applications and for programmatic interaction. It's for cloud-based scenarios that involve Power BI Service and embedded scenarios. Power BI Report Server does provide an option for hosting reports but is less extensive than Power BI Service.
Following are some points of differences:
Limited Functionality: The Power BI Report Server only supports basic embedding using an iframe for its reports and not advanced functions such as applying filters, bookmarking, or interaction with visuals using the JavaScript API.
On-Premises Limitation: For the Power BI Report Server, which is an on-premise solution, features such as user authentication through Azure Active Directory (AAD) are not available since they are intended to work with the cloud scenario.
Documentation and Use Cases: According to Microsoft documentation, the Power BI JavaScript API was developed to be used in deployments of Power BI that run on the cloud (Power BI Service and Power BI Embedded). For Power BI Report Server, other methods and possible third-party solutions may substitute for such programmability and interaction.
Power BI Service or Power BI Embedded will always fit better if your project depends on the advanced features of the JavaScript API. For on-premises deployment with Power BI Report Server, you would be required to use only what supported embedded methods are offered.