Get Single
GET/api/student/4
API Endpoint: Retrieve Student Information
Purpose
This endpoint allows users to retrieve detailed information about a specific student identified by their unique ID. It is useful for applications that need to display or process student data.
Request
- Method: GET
- URL:
https://app.udyogx.in/api/student/{id}
- Path Parameter:
id
(integer): The unique identifier of the student whose information is being requested. In this example, the ID is4
.
Response
The response will contain a JSON object with the details of the student. The structure of the response typically includes the following fields:
id
: The unique identifier for the student.name
: The name of the student.email
: The email address of the student.enrollmentDate
: The date when the student was enrolled.courses
: An array of courses the student is enrolled in, each containing details such as course ID and name.
Example Response Structure
{
"id": 4,
"name": "John Doe",
"email": "john.doe@example.com",
"enrollmentDate": "2022-01-15",
"courses": [
{
"courseId": 101,
"courseName": "Mathematics"
},
{
"courseId": 102,
"courseName": "Science"
}
]
}
This structure provides a comprehensive overview of the student's information and their enrolled courses.
Responses
- 200