Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Michael Locurcio
    Freeboard with REST API
    Topic posted March 14, 2016 by Michael LocurcioSilver Trophy: 7,500+ Points, tagged REST 
    1463 Views, 9 Comments
    Title:
    Freeboard with REST API
    Content:

    Does anyone have any experience using Freeboard with the Rest API. 

    This could be a very powerful and economical way to build web dashboard outside of Oracle for use on readerboard, executives, etc, without the overhead and license needed for the client.

    I can't figure out how to get freeboard to authenticate with the Rest API.

    Comment

     

    • Rajan Davis

      You cannot utilize the REST API outside of the customer portal domain; it can only be used within the domain.

    • Dietrik

      The soap and rest api can be used outside the cp domain. Authorization is described in the documentation.

      http://docs.oracle.com/cloud/latest/servicecs_gs/CXSVC/

      What is your specific error or problem ?

    • Michael Locurcio
      For some reason, freeboard doesn't like any of the authentication methods suggested. I was wondering if anyone else had tried them out. They are free, so the support they give is limited, and error messages and logs are not assistant.
      
    • Rajan Davis

      To clarify my statement, you cannot use the REST API outside of the support portal domain due to CORS and the same origin policy.



      In order to get around CORS and the same origin policy, you need to have headers set to allow traffic from outside sources. To the best of my knowledge, you cannot set these headers with the REST API even if it is authenticated.



      What you can do is create a custom controller that whitelists a specific domain or all domains; I wrote a comment on how to do this here. The included file has the headers for the white listing domains, but this setting is commented out. If you need help, send me a personal message and let me know how I can help you.

    • Dietrik

      The api's are meant to be used outside the custhelp domain. Freeboard is meant to collect data from outside its own domain by calling external webservices. You can assume their setup supports this.

      Add a data source to freeboard using the thingproxy and add the basic security header in the config screen..

    • Dietrik

      I've tested this with freeboard.io and a GET command.

    • Rajan Davis
      DS said:

      The api's are meant to be used outside the custhelp domain. Freeboard is meant to collect data from outside its own domain by calling external webservices. You can assume their setup supports this.

      Add a data source to freeboard using the thingproxy and add the basic security header in the config screen..

      View original

      Can you show me code? I suspect it might be the version of RightNow I am using, but last time I tried, I couldn't access the API outside of the custhelp domain. I kept on getting CORS errors with basic authentication.

    • Michel Jilderda

      Stumbled upon this topic because I was looking for something similar earlier. THought i would share how i got it working for other readers.

      Freeboard seems to work fine via REST. 

      1. Created account in Freeboard.
      2. Tested a REST Query for all open incidents in postman with basic authentication. 
        SELECT * FROM Incidents WHERE Incidents.statusWithType.status.id<>2
      3. To Query via REST, this becomes https://{{siteURL}}/services/rest/connect/v1.3/queryResults/?query=SELECT * FROM Incidents WHERE Incidents.statusWithType.status.id<>2
      4. Added a datasource according to the following settings. 
      5. In the above screenshot, I copied the authorization header from postman.
      6. Now, I added a new pane in freeboard, used the following settings.

      And then I had a simple gauge. 

    • Iain McKay

      Hi. I can also get Freeboard to fetch over REST and HTTPS with GET (e.g. to execute ROQL, as you do above). But a POST (e.g. to /services/rest/connect/latest/analyticsReportResults) with a BODY of

      {  "id": 157491 }

      Will not work. That's after including the basic Authoriszation custom headers etc. All works in Postman,. But not in Freeboard. 

      Has anyone else got this working OK with POST ?