08-09-2023 03:10 AM - last edited on 08-10-2023 04:25 AM by JackLacava
We are working on uploading and downloading files onto OneStream FileExplorer. It is possible to fetch the encoded file from the FileContents using the SQL Query over the REST API.
Similarly, is it possible to upload the data to the FileExplorer using the REST API?
Any ideas would be much appreciated.
Regards,
Anusha
08-09-2023 05:08 AM
You can try exploring WINSCP library, there a few examples which you can search for.
08-09-2023 07:58 AM
Can you please provide an example to upload a file to OneStream FileExplorer using WINSCP from an external system?
08-09-2023 06:39 AM
I'm not working with REST API, but
You can upload the files to a harvest folder and then use an extender rule to copy them to the Onestream File Explorer.
Then you can use our Task Scheduler to execute this rule at a predefined interval (or you call the rule using a REST API call).
If you like to download files, this can be done by an extender rule as well, and you can call this rule via the REST API.
I hope this helps, and cheers.
08-09-2023 10:18 AM
Hi Anusha,
Yes, it is possible to upload data to the file explorer using the REST API.
You can go through these APIs to understand this whole thing better I have just given a general overview of how you can do what you're trying to achieve.
Also can you elaborate the bold part "We are working on uploading and downloading files onto OneStream FileExplorer. It is possible to fetch the encoded file from the FileContents using the SQL Query over the REST API."
This whole process is a long complex task to code with a lot of moving pieces really difficult to explain the whole process.
08-09-2023 06:56 PM
Maybe Anusha is trying to do the REST calls using their database rather than in a BR? Just a guess. If so, this would not be ideal. You can do all this from Business Rules and the .NET languages quite simply and smoothly. Neither WinSCP or SQL are required. I recently did this with Azure/ADLS and it all went very well.
08-10-2023 04:25 AM
Anything doable from REST is documented in the REST Api Guide document, available in the Server & Documentation package in the Platform section of Solution Exchange. Please get it, it's a fairly short document but it lists all the endpoints and what is possible.