Can we reuse existing user session in the REST API ?

Hello everyone, We have exposed a REST API to handle file upload. We have developed a C# utility installed on the shop floor, pushing the files to Mendix REST API.  Observation: For every REST Call there is a new session created in mendix. If the files are sent in async way the Mendix App hangs. At the end of the REST call I am killing the session by doing user logout in java action. Is there a way to reuse the user session ? How to handle large volume of files using the REST API for more throughput. Thanks
1 answers

Why are you relying on a user session Sandeep?

Statelessness is one of the key architectural constraints of REST. A call should not rely on a state (aka session). Each request to a REST service must contain all the information needed to understand and process this request.

Would it be possible from the C# app to add extra information, such as a unique identifier in which multiple files can be linked to each other?

What you could do is let Mendix generate this unique token first, and push the files later on with this specific token, which you keep in memory on the C# app.