Add file
Uploads a file to an assignment.
If the assignment already has a file with the same name, that file is overwritten
End point
/api/requisitionapi/addfileRequest format
POSTRequest content
The request body should be formatted as XML, see below.
<?xml version=""1.0"" encoding=""UTF-8""?>
<requisition>
<id></id>
<filename></filename>
<data></data>
</requisition>
Response Messages
The Brainville API will respond to the HTTP POST in the following manner:
Success
HTTP Status 200 (OK) is returned
Failure
Bad XML – If the XML is malformed, or if the data parameter does not contain file data, a HTTP Status 400 (Bad Request) will be returned.
Missing/incorrect data – If the XML is correct, but the data inside it is wrong (for example, a required value is missing, out of range or of the wrong type), a message with HTTP Status 200 (OK) will be returned. The message will begin with “ERROR:”, then followed by a text describing the specific error.
Invalid id - If the id parameter does not specify a valid assignment id, HTTP Status 404 (Not found) will be returned