.. _student_restfulsimplifiedfilemeta_details_read: ============================================================================= GET /student/restfulsimplifiedfilemeta/id ============================================================================= Retrieve a FileMeta. The underlying data model where the item is retrieved from is defined in :class:`devilry.apps.core.models.FileMeta`. The :ref:`simplified` that the server forwards this request to is :meth:`devilry.apps.student.simplified.SimplifiedFileMeta.read`. ******** Request ******** Example ################ .. code-block:: javascript GET /student/restfulsimplifiedfilemeta/id Another example, this one uses the optional *result_fieldgroups* parameter. .. code-block:: javascript GET /student/restfulsimplifiedfilemeta/id { result_fieldgroups: ["assignment", "period", "subject"] } Required request parameters encoded in the URL ############################################## id -------------- The unique identifier of a FileMeta. 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 *Expands to the following fields:* delivery__deadline__assignment_group__parentnode__id Actual location of the field: :class:`devilry.apps.core.models.Assignment` About the field: Autogenerated identifier. Type Integer delivery__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 delivery__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:* delivery__deadline__assignment_group__parentnode__parentnode__id Actual location of the field: :class:`devilry.apps.core.models.Period` About the field: Autogenerated identifier. Type Integer delivery__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 delivery__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 subject *Expands to the following fields:* delivery__deadline__assignment_group__parentnode__parentnode__parentnode__id Actual location of the field: :class:`devilry.apps.core.models.Subject` About the field: Autogenerated identifier. Type Integer delivery__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 delivery__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 { filename: "My example value", size: 20, id: 15, delivery: 15 } Success response details ------------------------ As long as the FileMeta is deleted without an error, the response is *HTTP 200* with the requested data in the body. The result always contains the following fields: filename Actual location of the field: :class:`devilry.apps.core.models.FileMeta` About the field: Name of the file. Type String size Actual location of the field: :class:`devilry.apps.core.models.FileMeta` About the field: Size of the file in bytes. Type Integer id Actual location of the field: :class:`devilry.apps.core.models.FileMeta` About the field: Autogenerated identifier. Type Integer 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`.