API Question - Automatic upload of an externally created 4MB JSON File to "Org files" each night

Options

I have an external (to Brightspace) automated overnight batch process that outputs a single JSON file (approx. 4MB). I would like the JSON file to be automatically uploaded into Brightspace (Content folder in the main Organisational Files) replacing yesterday's file. The JSON is used by a custom Widget and currently this "upload" is being done manually (delete old file, then drag and drop new file) early each morning.

 

My question: Could this process be automated with the API and if so - thoughts on how best to achieve this?

 

Many thanks for reading / any reply. 

 

Kind regards, 

 

Richard