Hi,
I’m using Bonita Community 7.0.2. I have a requirement to download a binary file (like an MS-Excel file) from another service. Is there a way to return the binary file in the response using the Rest API Extension ?
Regards
Hi,
I’m using Bonita Community 7.0.2. I have a requirement to download a binary file (like an MS-Excel file) from another service. Is there a way to return the binary file in the response using the Rest API Extension ?
Regards
I think this is really a question for the other system.
From what you are saying,
You need to find out if the other system (you don’t say what it is) is able to respond to the query, does it for example have a GET response to deliver the document. If not then I doubt you’ll be able to do this, if it does then yes there will be a way of doing it.
Thanks all.
I don’t think it is possible to return a file with a Rest API.
But with Bonita Rest API you can get the URL of the file. With this URL, you can download the file.
To do this, you need to get your file as a Document in your process.
Then, you can use this API :
http://documentation.bonitasoft.com/bpm-api-1#casedocument
It returns the URL of the file.
To finish you can use the Link Widget in your form to create a download link with the file URL.