JsAPI 404 error

Dan Cotton shared this question 4 years ago
Answered

I am using v9.0.2.

I have created a Dashboard within YF, but when I use the Share link, choose embed, copy the script code and place into an HTML document, I get a 404 error when viewing the console in developer tools.

I have added the domains in the Origins section of the admin console.

If I paste the script URL in a browser, I also get a 404.


Have I missed a setting someplace?

Replies (5)

photo
1

Hi Dan,


Thank you for reaching out to us on this. Just to confirm that you are using our recently release 9.2, not the beta 9.0.2?


In terms of the 404 error, there are a few things that might be happening here

1) Can you please confirm that your web.xml (found in /appserver/webapps/ROOT/WEB-INF/) has a JsAPI entry in it that looks as follows:


<servlet-mapping>
    <servlet-name>JsAPIServlet</servlet-name>
    <url-pattern>/JsAPI/*</url-pattern>
</servlet-mapping>
The JsAPI/* is required for the v3 API.


2) Can you confirm that the embed link that is generated by Yellowfin is actually pointing to the server itself? By default the embed link will be pointing to "localhost" it can be changed in the Admin Console -> Configuration -> System -> General Settings

/73f5655dd639e056d38a95694d4e9e13


If you have the code from point 1 in your web.xml and your External Base url is accurate for your Yellowfin instance url, it would be good to jump on a quick screen share to narrow down this issue for you. Please let me know how you go with the above checks and we can proceed from there as required.


Cheers,

Neal

photo
1

Hi Neal.

The line in the web.xml was there…kind of.

This is what was there.  <url-pattern>/JsAPI</url-pattern>

I added the “/*”, restarted and it works now.  And yes it is version 9.2.0 not 9.0.2

Since I have you.  With the change above, the embedded dashboard now displays externally. It does present the user with a login screen, and after log in the dashboard displays.

Is there a way to use the embed script and not have to have the user authenticate?

What I am wanting to do is create a dashboard of relevant student information for the school Deans to view at a glance. Ideally they would not have to log in and the content would be protected by 7our external SSO.

The more the Dean’s have to log into something the less likely they are to use it

Dan Cotton         

Director Educational Technology & Application Development

Academic Information Systems

University of California Davis Health

Office: (916) 734-2019

Mobile: (916) 842-1559

Email: dgcotton@ucdavis.edu

From: Yellowfin Support <support@yellowfin.bi>

Sent: Tuesday, June 30, 2020 5:18 PM

To: Daniel Cotton <dgcotton@UCDAVIS.EDU>

Subject: New Comment in "JsAPI 404 error"

photo
1

Hi Dan,


Sorry for the delayed response. Yes this is possible to do by creating a Guest Role, and then setting the Content Folder Security (for the folder in which the Dashboard resides) to Unsecure. The documentation of this process can be found here:


https://wiki.yellowfinbi.com/display/user80/Guest+Users


If you have any further questions on this, please let me know.


Cheers,

Neal

photo
1

Perfect, Thanks Neal

You can close the ticket

Dan Cotton         

Director Educational Technology & Application Development

Academic Information Systems

University of California Davis Health

Office: (916) 734-2019

Mobile: (916) 842-1559

Email: dgcotton@ucdavis.edu

From: Yellowfin Support <support@yellowfin.bi>

Sent: Wednesday, July 1, 2020 4:03 PM

To: Daniel Cotton <dgcotton@UCDAVIS.EDU>

Subject: New Comment in "JsAPI 404 error"

photo
1

Thanks Dan,


Give me a shout if you get stuck on this.


Cheers,

Neal

Leave a Comment
 
Attach a file