We're self hosted and have asked for some activity data from our central utility that hosts D2L for us. They're able to produce the data file, but insist on giving us the file through another D2L course putting it in the manage files area. The file is produced on a schedule and follows a standardized name. But in order to get the file someone has to log into D2L, go to the course, find the file in the files area of the course, and download the file from the Manage Files area.
I would like to be able to write a process that would reach into D2L and get the file I'm looking for. I've scanned the Valence API and all that would initially seem to be possible is if these files have a corresponding Topic in the content structure that I could use to get the file to grab. http://docs.valence.desire2learn.com/res/content.html#get--d2l-api-le-(version)-(orgUnitId)-content-topics-(topicId)
As is they're not inserting a topic pointing to the new file. I'm not seeing anything via Valence that would suggest there's a way to get a file listing of the files area of a course, or even retrieve a specific file.
Is this even possible? Any ideas as to how I could do this?
The Brightspace application APIs have a call that can fetch the underlying file for a content topic of type file.
You can also add a new content topic of type file to the content structure, and set the URL property for the topic to point at the existing file in the content space; this should re-use the file in the course's content space, allowing you to get directly at the file in the content space, assuming you know its name and location in the content space to start with.