Data Source with REST API and Additional External API Call from Custom Javascript

Hi,

I am setting up a Data Source to a REST API. The connection and data is working.
However, I need to make an additional HTTP call for each row I processed to get additional data. The HTTP call will be made to the same REST API the data source is configured for, but to a different endpoint. Will the getDocument function allow me to do this?

I read this documentation:
https://docs.eazybi.com/eazybi/data-import/data-adjustments-using-javascript#DataadjustmentsusingJavaScript-FunctiongetDocument

But I don’t know how to specify the headers.

Do I have to provide the full URL and if so how do I pass headers to this function?

Thanks,
Hugo

Hi @hquezada

Welcome to the Community! :slight_smile:

In the getDocument function, you can pass the REST API URL and a list of errors to ignore, but it is not possible to pass a separate header.
With the getDocument function, you can pass a different path of the same BASE URL and the same header will be used as for the REST API call, so you can get additional data for your REST API call as long as you are requesting it from the same base URL.

Best regards,
Nauris / eazyBI support