GET /student/restfulsimplifiedfilemeta/id

Retrieve a FileMeta.

The underlying data model where the item is retrieved from is defined in devilry.apps.core.models.FileMeta. The Simplified API that the server forwards this request to is devilry.apps.student.simplified.SimplifiedFileMeta.read().

Request

Example

GET /student/restfulsimplifiedfilemeta/id

Another example, this one uses the optional result_fieldgroups parameter.

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:
devilry.apps.core.models.Assignment
About the field:
Autogenerated identifier.
Type
Integer
delivery__deadline__assignment_group__parentnode__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
delivery__deadline__assignment_group__parentnode__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
period

Expands to the following fields:

delivery__deadline__assignment_group__parentnode__parentnode__id
Actual location of the field:
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:
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:
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:
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:
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:
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

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:
devilry.apps.core.models.FileMeta
About the field:
Name of the file.
Type
String
size
Actual location of the field:
devilry.apps.core.models.FileMeta
About the field:
Size of the file in bytes.
Type
Integer
id
Actual location of the field:
devilry.apps.core.models.FileMeta
About the field:
Autogenerated identifier.
Type
Integer
delivery
Actual location of the field:
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 HTTP Error status codes.