POST /administrator/restfulsimplifiedcandidate/

Create a candidate.

The underlying data model where the item is created is defined in devilry.apps.core.models.Candidate. The Simplified API that the server forwards this request to is devilry.apps.administrator.simplified.simplifiedcandidate.SimplifiedCandidate.create().

Request

Example

POST /administrator/restfulsimplifiedcandidate/

{
    candidate_id: "My example value",
    student: 15,
    assignment_group: 15
}

Required request parameters

The following request parameters are encoded as a JSON object and sent as the request body as shown in the example above.

candidate_id

Actual location of the field:
devilry.apps.core.models.Candidate
About the field:
An optinal candidate id. This can be anything as long as it is less than 30 characters.
Type
String

student

Actual location of the field:
django.contrib.auth.models.User
About the field:
Autogenerated identifier.
Type
Integer

assignment_group

Actual location of the field:
devilry.apps.core.models.AssignmentGroup
About the field:
Autogenerated identifier.
Type
Integer

Response

On success

Example

201 CREATED

{
    candidate_id: "My example value",
    student: 15,
    assignment_group: 15,
    id: 15
}

Success response details

As long as the candidate is created without an error, the response is HTTP 201 with the requested data in the body. The result always contains the request data with the id field added, however some values may have been changed due to logic performed on the server before saving.

On error

On errors, we respond with one of the HTTP Error status codes.