.. _administrator_restfulsimplifiedrelatedstudentkeyvalue_details_create: ============================================================================= POST /administrator/restfulsimplifiedrelatedstudentkeyvalue/ ============================================================================= Create a related student key value. The underlying data model where the item is created is defined in :class:`devilry.apps.core.models.relateduser.RelatedStudentKeyValue`. The :ref:`simplified` that the server forwards this request to is :meth:`devilry.apps.administrator.simplified.simplifiedrelatedstudentkeyvalue.SimplifiedRelatedStudentKeyValue.create`. ******** Request ******** Example ################ .. code-block:: javascript POST /administrator/restfulsimplifiedrelatedstudentkeyvalue/ { relatedstudent: 15, application: "My example value", value: "myvalue", student_can_read: true, key: "My example value" } 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. relatedstudent -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.relateduser.RelatedStudent` About the field: Autogenerated identifier. Type Integer application -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.relateduser.RelatedStudentKeyValue` About the field: Application identifier. Max 300 chars. Type String value -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.relateduser.RelatedStudentKeyValue` About the field: Value. Type String student_can_read -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.relateduser.RelatedStudentKeyValue` About the field: Specifies if a student can read the value or not. Type Boolean key -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.relateduser.RelatedStudentKeyValue` About the field: Key. Max 300 chars. Type String ************** Response ************** On success ########## Example ---------------- .. code-block:: javascript 201 CREATED { relatedstudent: 15, application: "My example value", value: "myvalue", student_can_read: true, key: "My example value", id: 15 } Success response details ------------------------ As long as the related student key value 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 :ref:`restful_api_error_statuscodes`.