Access REST API from trial instances



  • I looked through the JSReport Docs and found the api documentation which provides sample urls such as https://jsreport-host/api/report.

    I am attempting to trial this software before purchasing. I created a free account and created the instance (example) xxx.jsreportonline.net. If I try to curl this instance directly it redirects me to the sign in page.

    So I created a share link, which adds an access token to the querystring. There are a few sharable public urls I have found.

    • https://xxx.jsreportonline.net/templates/B1eiW8mB28
    • https://xxx.jsreportonline.net/public-templates?access_token=[snipped]

    I have tried a few permutations of these urls using the /api/[template_name] schema suggested in the api documentation however I dont recieve a response.

    Is it possible to test the jsreport REST api from a free account's instance?
    Is jsreport intended solely to be self-hosted from a node process? Or can it be accessed from an instance hosted by jsreport?



  • Hi,

    I apologize for the confusion, we need to add better documentation to the jsreportonline.

    Is it possible to test the jsreport REST api from a free account's instance?

    Absolutely, there is no limitation regarding API calls.

    If I try to curl this instance directly it redirects me to the sign in page.

    This is probably because you are missing the authorization header.
    https://jsreport.net/learn/api#authentication
    It should look like this, it is common basic auth standard
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
    Where the hash is based on username and password:
    base64(username:password)

    With such a header, you can call for example
    GET https://xxx.jsreportonline.net/odata/templates

    When you want to render something, find details in the API docs
    https://jsreport.net/learn/api

    Is jsreport intended solely to be self-hosted from a node process? Or can it be accessed from an instance hosted by jsreport?

    I am afraid I don't understand what you mean. Can you elaborate?

    Jan



  • This post is deleted!

Log in to reply
 

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