-
Notifications
You must be signed in to change notification settings - Fork 3
Subject Endpoint
Wiki ▸ Endpoints ▸ Subject
Contains data of all Subjects available on our e-learning platform.
The Subject Endpoint is a representation of the subjects added to the application. The endpoint's purpose is to facilitate accessing, creating, updating and deleting these files.
Retrieves all of the available subjects.
Status code: 200
Body:
[
{
"id": "cc327880f-9252-444b-94c2-b3b28c006",
"value": "English_Literature",
},
{
"id": "b3b28c006-8883-9252-914a-cc327880f",
"value": "Calculus",
},
]Retrieves the subject with the provided id.
| Path Parameter | Description |
|---|---|
:id |
The id of the subject entry. |
Status code: 200
Body:
{
"id": "b3b28c006-8883-9252-914a-cc327880f",
"value": "Programming",
}Status code: 404
Body:
{
"error": "Not Found",
}Adds an entry composed in the body as a subject. If the value attribute is null or empty, it will return an error.
Status code: 201
Request Body:
{
"value": "Geography"
}Response Body:
{
"id": "61112f24-c44b-455a-9xxa-01ff2af1xx01",
"value": "Geography"
}Status code: 400
Request Body:
{
"value":""
}Response Body:
{
"error": "Bad Request",
}Sends an entity at the specified id with the subject entry that has been updated.
| Path Parameter | Description |
|---|---|
:id |
The id of the subject entry. |
Status code: 200
Request Body:
{
"value": "Biology",
}Response Body:
{
"id": "3b28c006-8883-9252-914a-cc327880f",
"value": "Biology"
}Status code: 404
Request Body:
{
"value": "Biology2"
}Response Body:
{
"error": "Not Found",
}Status code: 400
Body:
"value":""Response Body:
{
"error": "Bad Request",
}Deletes the subject with the provided id.
| Path Parameter | Description |
|---|---|
:id |
The id of the subject entry. |
Status code: 200
Body:
Status code: 404
Body:
{
"error": "Not Found",
}Wiki | Site | Project Roadmap | Figma