GET /examiner/restfulsimplifiedsubject/id

Retrieve a Subject.

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

Request

Example

GET /examiner/restfulsimplifiedsubject/id

Required request parameters encoded in the URL

id

The unique identifier of a Subject. You will typically get this id in response from a search.

Response

On success

Example

200 OK

{
    id: 15,
    parentnode: 15,
    short_name: "my_example001_value",
    long_name: "My example value"
}

Success response details

As long as the Subject 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:
devilry.apps.core.models.Subject
About the field:
Autogenerated identifier.
Type
Integer
parentnode
Actual location of the field:
devilry.apps.core.models.Node
About the field:
Autogenerated identifier.
Type
Integer
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
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

On error

On errors, we respond with one of the HTTP Error status codes.