Create a submission
Create a new submission on an assignment on behalf of a student.
Permission requirements
The user must have Permissions.Submission.CreateOnBehalfOf
("Add a coursework submission on behalf of another member") on both the assignment and the student. By default, no roles are given this permission - it must be granted by the ITS Web Team to an API user.
Information about API permissions
Definition
POST https://tabula.warwick.ac.uk/api/v1/module/:moduleCode/assignments/:assignmentId
The request Content-Type
must be set to multipart/form-data
if attachments are being uploaded inline, or application/json
if the attachments API is being used.
URL substitution variables
:moduleCode |
The lowercase form of the module code for module to create the assignment in, e.g. cs118 |
---|---|
:assignmentId |
The unique identifier for the assignment |
Note: Attachment API requirements
There are two ways to interact with this API:
- Upload attachments for the submission in advance, using the attachments API, and submit the unique identifiers for those attachments as part of the submission request
- Use a multipart submission to submit both the metadata for the submission and the attachments at the same time
Using the multipart API
In order to use the multipart API, the request must be of type multipart/form-data
and contain multiple parts:
- A
submission
part, of content-typeapplication/json
, containing the JSON metadata for the submission - At least one
attachments
part containing the uploaded attachments
Request parameters
As URL query parameters:
universityId Required |
The university ID of the student that the submission is on behalf of |
---|
In the JSON request:
attachments Optional |
An array of attachment IDs that have bene uploaded via the attachments API (if not using a multipart request). This is Required if using a non-multipart request |
---|---|
wordCount Optional |
The declared word count for the submission. Required if the assignment requires a word count |
useDisability Optional |
Whether any recorded disability should be visible to anyone administering or marking this assignment |
Example request
POST https://tabula.warwick.ac.uk/api/v1/module/cs118/assignments/1a5b1b55-dd02-4a0c-83b7-29b90a771803?universityId=0672089
{
"attachments": ['db2e9cae-c594-4005-b755-0dd820747ee0'],
"wordCount": 3000
}
Response parameters
An unsuccessful response will be returned in the standard format. A successful response will return the HTTP code 201 Created
. The Location
header will be the API endpoint of the individual submission, and will return metadata about the submission:
success |
Boolean true |
---|---|
status |
The string "ok" |
submission |
The submission object created |
Example response
{
"success": true,
"status": "ok",
"submission": {
"id": "e322dc9a-3ff8-4ad7-9297-770d3e60194a",
"submittedDate": "2014-05-06T10:32:43+01:00",
"suspectPlagiarised": false,
"late": true,
"wordCount": 3000,
"downloaded": true,
"authorisedLate": false,
"attachments": [
{
"filename": "assignment_cover_sheet.doc",
"id": "db2e9cae-c594-4005-b755-0dd820747ee0",
"originalityReport": null
}
]
}
}
Tabula API Methods
- Overview
- The Member object
- The StudentCourseDetails object
- The StudentCourseYearDetails object
- The StudentRelationship object
- The Student RelationshipType object
- The ModuleRegistration object
- Retrieve a member
- Retrieve multiple members
- Retrieve a member's relationships
- List relationship agents in dept.
- Search for members