I’m writing a script to upload files to our CUBA application file storage. I plan to use the file upload rest api described here : https://doc.cuba-platform.com/manual-6.5/rest_upload_file.html.
So I need to set a session ID in the header but where I should get it from ?
Can I use the OAuth token id I can get like that : https://doc.cuba-platform.com/manual-6.5/rest_api_v2_ex_get_token.html ?
Also there seems to be an additional way of uploading files into CUBA application : http://files.cuba-platform.com/swagger/#!/Files/post_files
Which one should be used ? (and why have two of them)