.. _administrator_restfulsimplifiedperiod_details_create: ============================================================================= POST /administrator/restfulsimplifiedperiod/ ============================================================================= Create a Period. The underlying data model where the item is created is defined in :class:`devilry.apps.core.models.Period`. The :ref:`simplified` that the server forwards this request to is :meth:`devilry.apps.administrator.simplified.simplifiedperiod.SimplifiedPeriod.create`. ******** Request ******** Example ################ .. code-block:: javascript POST /administrator/restfulsimplifiedperiod/ { long_name: "My example value", start_time: "2010-02-22 22:32:10", short_name: "my_example001_value", parentnode: 15, end_time: "2010-02-22 22:32:10" } 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. long_name -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: A longer name, more descriptive than "Short name". This is the name visible to students. Type String start_time -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: Start time and end time defines when the period is active. Type DateTime string (YYYY-MM-DD hh:mm:ss) short_name -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: Max 20 characters. Only numbers, lowercase characters, '_' and '-'. Type String parentnode -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.Subject` About the field: Autogenerated identifier. Type Integer end_time -------------------------------------------------- Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: Start time and end time defines when the period is active. Type DateTime string (YYYY-MM-DD hh:mm:ss) ************** Response ************** On success ########## Example ---------------- .. code-block:: javascript 201 CREATED { long_name: "My example value", start_time: "2010-02-22 22:32:10", short_name: "my_example001_value", parentnode: 15, end_time: "2010-02-22 22:32:10", id: 15 } Success response details ------------------------ As long as the Period 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`.