.. _examiner_restfulsimplifieddelivery_details_read: ============================================================================= GET /examiner/restfulsimplifieddelivery/id ============================================================================= Retrieve a Delivery. The underlying data model where the item is retrieved from is defined in :class:`devilry.apps.core.models.Delivery`. The :ref:`simplified` that the server forwards this request to is :meth:`devilry.apps.examiner.simplified.SimplifiedDelivery.read`. ******** Request ******** Example ################ .. code-block:: javascript GET /examiner/restfulsimplifieddelivery/id Another example, this one uses the optional *result_fieldgroups* parameter. .. code-block:: javascript GET /examiner/restfulsimplifieddelivery/id { result_fieldgroups: ["assignment_group_users", "assignment", "period", "delivered_by", "deadline", "assignment_group", "candidates", "subject"] } Required request parameters encoded in the URL ############################################## id -------------- The unique identifier of a Delivery. You will typically get this id in response from a search. Optional request parameters ########################### Optional request parameters are encoded as a JSON object and sent as the request body as shown in the example above. result_fieldgroups ------------------ A list of group names. Each group adds an additional set of fields to the resulting data. The following group names are available: assignment_group_users *Expands to the following fields:* deadline__assignment_group__candidates__identifier Actual location of the field: :class:`devilry.apps.core.models.Candidate` About the field: List of many values. Type List of strings assignment *Expands to the following fields:* deadline__assignment_group__parentnode Actual location of the field: :class:`devilry.apps.core.models.Assignment` About the field: Autogenerated identifier. Type Integer deadline__assignment_group__parentnode__delivery_types Actual location of the field: :class:`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 deadline__assignment_group__parentnode__short_name Actual location of the field: :class:`devilry.apps.core.models.Assignment` About the field: Max 20 characters. Only numbers, lowercase characters, '_' and '-'. Type String deadline__assignment_group__parentnode__long_name Actual location of the field: :class:`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 period *Expands to the following fields:* deadline__assignment_group__parentnode__parentnode Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: Autogenerated identifier. Type Integer deadline__assignment_group__parentnode__parentnode__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) deadline__assignment_group__parentnode__parentnode__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) deadline__assignment_group__parentnode__parentnode__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 deadline__assignment_group__parentnode__parentnode__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 delivered_by *Expands to the following fields:* delivered_by__identifier Actual location of the field: :class:`devilry.apps.core.models.Candidate` About the field: The candidate_id if this is a candidate on an anonymous assignment, and username if not. Type String deadline *Expands to the following fields:* deadline__deadline Actual location of the field: :class:`devilry.apps.core.models.Deadline` About the field: The time of the deadline. Type DateTime string (YYYY-MM-DD hh:mm:ss) assignment_group *Expands to the following fields:* deadline__assignment_group Actual location of the field: :class:`devilry.apps.core.models.AssignmentGroup` About the field: Autogenerated identifier. Type Integer deadline__assignment_group__name Actual location of the field: :class:`devilry.apps.core.models.AssignmentGroup` About the field: An optional name for the group. Typically used a project name on project assignments. Type String candidates *Expands to the following fields:* deadline__assignment_group__candidates__identifier Actual location of the field: :class:`devilry.apps.core.models.Candidate` About the field: List of many values. Type List of strings subject *Expands to the following fields:* deadline__assignment_group__parentnode__parentnode__parentnode Actual location of the field: :class:`devilry.apps.core.models.Subject` About the field: Autogenerated identifier. Type Integer deadline__assignment_group__parentnode__parentnode__parentnode__short_name Actual location of the field: :class:`devilry.apps.core.models.Subject` About the field: Max 20 characters. Only numbers, lowercase characters, '_' and '-'. Type String deadline__assignment_group__parentnode__parentnode__parentnode__long_name Actual location of the field: :class:`devilry.apps.core.models.Subject` About the field: A longer name, more descriptive than "Short name". This is the name visible to students. Type String ************** Response ************** On success ########## Example ------- .. code-block:: javascript 200 OK { id: 15, number: 20, time_of_delivery: "2010-02-22 22:32:10", deadline: 15, successful: true, delivery_type: 20, alias_delivery: 15 } Success response details ------------------------ As long as the Delivery is deleted without an error, the response is *HTTP 200* with the requested data in the body. The result always contains the following fields: id Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: Autogenerated identifier. Type Integer number Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: The delivery-number within this assignment-group. This number is automatically incremented within each AssignmentGroup, starting from 1. Always unique within the assignment-group. Type Integer time_of_delivery Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: Holds the date and time the Delivery was uploaded. Type DateTime string (YYYY-MM-DD hh:mm:ss) deadline Actual location of the field: :class:`devilry.apps.core.models.Deadline` About the field: Autogenerated identifier. Type Integer successful Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: Has the delivery and all its files been uploaded successfully? Type Boolean delivery_type Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: 0: Electronic delivery, 1: Non-electronic delivery, 2: Alias delivery. Default: 0. Type Integer alias_delivery Actual location of the field: :class:`devilry.apps.core.models.Delivery` About the field: Autogenerated identifier. Type Integer However, there may be more fields if specified with the ``result_fieldgroups`` request parameter. On error ######## On errors, we respond with one of the :ref:`restful_api_error_statuscodes`.