How do I start using the JavaScript API v3

Yellowfin FAQ shared this question 4 years ago
Completed

We have recently upgraded to the latest Yellowfin version 9.2 and would like to start using the new JavaScript API v3. How do we get started?

Replies (8)

photo
1

Firstly, it's worth mentioning doing anything with the Javascript API requires a certain level of technical skills, and while a lot can be accomplished with little expertise, it may require that dev/guru level of knowledge to really make the most of it within your own application. The Yellowfin Support Team will provide assistance where possible, though there may come a point in time where the team will need to put in a service request with our integration specialists via your CSM.


The Yellowfin JavaScript API has two main purposes:

  1. It can be used to embed Yellowfin content into your web application and to manipulate that content.
    Yellowfin content that can be embedded in this way includes reports (tables, charts and canvas) as well as entire dashboards (both Canvas and traditional grid style).
  2. It can be used to create custom logic in a Code Mode dashboard from within Yellowfin.
    This can allow customization of the user experience within Yellowfin, or can be used to embed application logic into a dashboard.


Getting started.

To get started, you will need to setup your permitted domains as yhe Yellowfin JavaScript API is dependent on Cross Origin Resource Sharing(CORS). By default, any CORS request that is made to the Yellowfin server will be rejected.


To enable CORS, go to the Admin Console in Yellowfin and add the server URL to the general configuration options. This can be found in Administration -> Configuration -> System -> General Settings

You may enter more than one URL.

943461f23f30d7c210e8c0039d1be619

Once this is enabled on your Yellowfin server you can start to embed your content.


For more details on using the JavaScript API v3, please see our wiki article here.


Please reach out to us if you have any questions, or run into any issues.


Regards,

Neal

photo
1

Hi,

I got this error after the my yellowfin instance web address is added to there. How can I solve this ?


the error below is in my inspect pages.


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [my-server-address] (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 302.


Please help me this point.

photo
1

Hello Nuh Yurduseven,

Thank you for reaching out to Yellowfin Support. My name is Priya, and I'll be assisting you with the issue. I will take a look at it with the details shared and get back to you with the findings shortly.

Please let us know if you have any more questions; we will be happy to help.

Thanks & Regards,

Priya,
Yellowfin Support Team.

photo
1

Hello Nuh Yurduseven,

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource". This can be fixed by moving the resource to the same domain or enabling CORS. Please check this link here for more information.

To enable CORS, go to the Admin Console in Yellowfin and add the server URL to the general configuration options. This can be found in Administration -> Configuration -> System -> General Settings

943461f23f30d7c210e8c0039d1be619

Please check this link for more information.

Please let us know if you have any more questions; we will be happy to help.


Thanks & Regards,

Priya.

photo
1

Hello Nuh Yurduseven,

I hope you are doing well.

Just wanted to check in and see how it's all going. Is there anything else you need from me to help with this? If you can get back to me that would be great.

Thanks & Regards,

Priya.

photo
1

Hello Priya,


No, I am still getting the same problem. I am using v2 API. It's working with report embedding but dashboard embedding is not working properly.


Regards,


Nuh

photo
1

Hello Nuh Yurduseven,

I apologize for the delay in responding to your query. Have you tried changing your browser? Since you are using v2 API, I hope this link may help you.

Please don't hesitate to contact us if you have any further questions. We are always happy to help.

Thanks & Regards,

Priya.

photo
1

Hello Nuh Yurduseven,

I hope you are doing well.

Just wanted to check in and see how it's all going. Is there anything else you need from me to help with this? If you can get back to me that would be great.

Thanks & Regards,

Priya.

photo
1

Hello Priya,

Yes, I checked the different type browser but I can't get the content.

I got the error in browser network console.

"Access to XMLHttpRequest at 'http://<IP_ADDR>/MIReportOutputAjax.i4;jsessionid=9E53EB8504A3CC57DD49682A0D92DB4B;jsessionid=43CAF9422A8E65353DCA90F6114A757A?REQUESTTOKEN=null&REQUESTTOKEN=null' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."


I should say that the embeded login screen is shown on the page. After I login, The error shown on browser network console and there is nothing on the browser page.


Hope to help this for you to recognize the problem.


Regards.

Nuh

photo
1

Hello Nuh Yurduseven,

I apologize for the delay in response I would like to check this on a live basis I am happy to jump on a call to see the issue.

I am usually available between 2:00 pm- 11:00 pm IST, Please let me know your available time so that will check this in the screen share session!

Thanks & Regards,

Priya.

photo
photo
1

Hello Nuh Yurduseven,

I just want to touch base to see if you had a chance to read through my response. If you can get back to me that would be great.

Thanks & Regards,

Priya.

photo
1

Hello Nuh Yurduseven,

Greetings for the Day.

This is a follow-up reminder that 2 days have passed without any activity in this ticket. When there's no activity, it usually means either that you have identified the solution for the reported issue or that the matter is no longer relevant and after 5 days (2 days from now) without any activity, we assume that the ticket can be closed.

If this is not the case, please do reply and let us know how we can be of further assistance, we would be happy to assist.

Thanks & Regards,

Priya.

photo
1

Hello Nuh Yurduseven,

Greetings for the Day.

This email is to notify you that we believe that you have identified the solution for the reported issue or that this ticket can be resolved for now.

Because of age and inactivity, I am going to go ahead and mark this ticket as Completed for now. However,
if you ever want to revisit this or have anything else I can help you with, please let us know, we will be more than happy to do so.

Thanks & Regards,

Priya.

Leave a Comment
 
Attach a file