Not able to access APIs on localhost installation



  • Hi,

    I was recently introduced to jsReports via a blocand have been trying to setup the local server. The UI works fine on the browser, but when I am trying to access the reports api /api/report as described here: https://jsreport.net/learn/api, The apis return an empty response and I can neither see any results nor logs in the report.log.

    Could someone please suggest what am I missing here?

    Thanks.



  • Please describe how do you call the API.
    Do you use some kind of tool like Postman to test it?



  • Hi @jan_blaha . Thanks for the reply.

    Yes, I am trying to make the api call via Postman, and I also tried the GET calls directly in the browser, but both the calls reply with empty response. Please let me know if this clarifies my problem better.

    Thanks.



  • It needs to be http POST.
    Please share a screenshot from the postman.



  • Hi @jan_blaha, thanks for the update. Here's the video of how I am trying to do it.

    https://streamable.com/a5khx6

    I hope this helps in identifying where I am going wrong. Thanks again.



  • You specified both httpPort and httpsPort in the config.

    0_1632226025275_upload-8183a08d-e672-4246-b2a5-deed99231b04

    Therefore jsreport started to listen on both ports, where the 5488 one returns HTTP redirect to the 5489 which listen to HTTPS.

    It's typically better to deal with SSL in a web server, I would recommend keeping just httPort:5489 in the config and use just HTTP when developing localy.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.