POST /administrator/restfulsimplifiedassignment/

Create a Assignment.

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

Request

Example

POST /administrator/restfulsimplifiedassignment/

{
    short_name: "my_example001_value",
    publishing_time: "2010-02-22 22:32:10",
    parentnode: 15,
    delivery_types: 20,
    long_name: "My example value",
    anonymous: true,
    scale_points_percent: 20
}

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.

short_name

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
Max 20 characters. Only numbers, lowercase characters, ‘_’ and ‘-‘.
Type
String

publishing_time

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
The time when the assignment is to be published (visible to students and examiners).
Type
DateTime string (YYYY-MM-DD hh:mm:ss)

parentnode

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

delivery_types

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
This option controls what types of deliveries this assignment accepts. See docs for Delivery for documentation of accepted values.
Type
Integer

long_name

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
A longer name, more descriptive than “Short name”. This is the name visible to students.
Type
String

anonymous

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
Specifies if this assignment is anonymous.
Type
Boolean

scale_points_percent

Actual location of the field:
devilry.apps.core.models.Assignment
About the field:
Percent to scale points on this assignment by for period overviews. The default is 100, which means no change to the points.
Type
Integer

Response

On success

Example

201 CREATED

{
    short_name: "my_example001_value",
    publishing_time: "2010-02-22 22:32:10",
    parentnode: 15,
    delivery_types: 20,
    long_name: "My example value",
    anonymous: true,
    scale_points_percent: 20,
    id: 15
}

Success response details

As long as the Assignment 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.