Expand the Populi API to include a uploadFile method that allows for programmatic uploading of a file to a Student's Inbox.
Currently, the API has a method called uploadFile that will allow for programmatic uploading of files to the Student's Activity Feed. In our use case, we have PDF files with student exam answers we like to post to the student's Populi Inbox versus emailing the exam answers to the student. The expanded Populi API would provide a secure means of distributing student specific files directly to the students. The current workaround is to upload all the files to the administrators account (one by one), then selecting each uploaded file in the administrator's inbox and clicking the share button and sharing that file with the student. This approach works for very small sets of students/files needing to be posted to the student's inbox. This approach is prohibitive if we are posting several files for all students.
The benefits of a programmatic approach to uploading files to the student's inbox can be applied to a variety of different scenarios. For example, an automated approach can be developed by the institution to read specific folders on their network share and auto upload the files. The share folders could be the student IDs and staff can just drag and drop files to specific folders knowing that there is a sync between the network share of students files and Populi (the student's inbox). Another example, is the institution developing an application that reads in the contents or filenames of files the staff drag and drops onto it and the application automatically identifies the files and uploads them to the appropriate student's inbox.
The recommendation for the method would be something like the following:
uploadFileToInbox
Uploads a file to the Inbox for a particular person.
Parameters
| Parameter | Description | Required |
| person_id | The numeric ID of the person. | Yes |
| file | File uploaded the via the HTTP POST method. | Yes |
| folder | If passed in, the file will be uploaded to the specified folder. If folder does not exist, it gets created. | No |
| force | If set to true, existing file gets replaced. | No |
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result>12345678</result>
</response>
Comments