Skip to main content

We have developed a small external web app. This web app needs to retrieve a file which has been imported and stored on a reachable location on the server using the file name and path. The file name and path are stored in the database. Using this file name and path the web app can read the file from the location it's stored. This needs to be done with an XHR GET request.

Is there a way that this integrated web app can do a GET request to the Indicium API to retrieve the file path it needs? It just needs to get a piece of text from the database that contains the path to the file, then it can read the file and view the data using said file.

We have developed a small external web app. This web app needs to retrieve a file which has been imported and stored on a reachable location on the server using the file name and path. The file name and path are stored in the database. Using this file name and path the web app can read the file from the location it's stored. This needs to be done with an XHR GET request.

Is there a way that this integrated web app can do a GET request to the Indicium API to retrieve the file path it needs? It just needs to get a piece of text from the database that contains the path to the file, then it can read the file and view the data using said file.

As you wil need to generate a URL to load the external web app to load into the Universal GUI (I kind of guess this is scenario here) it's easier to perhaps give the path and file name in the URL  like /app/show.html?Location=$var1&Name=$var2 then you don't need to do the get action in your application.. just read the variables. 

In all other cases you can use the already existing login credentials..

  const getVar = `${serviceUrl}/${application}/subject(var1=${var1})$select=field`;
const responseVar = await fetch(getVar, { credentials: "include" });

 

 

 


Hi SanderAdam,

If the web app is hosted on the same (sub)domain as the Universal GUI, it will automatically inherit the authentication cookies from the Universal GUI to access the Indicium API.

Information on Indicium's File API can be found in the docs: File API | Thinkwise Documentation (thinkwisesoftware.com).

This post demonstrates the use of a (POST) XHR request: Upload multiple files using the Universal GUI | Thinkwise Community (thinkwisesoftware.com)