0% found this document useful (0 votes)
0 views1 page

Problem-1

The document outlines the development of a RESTful Web API for managing student course registrations at a university. It specifies the StudentRegistration entity with properties such as StudentId, StudentName, Email, CourseCode, Semester, and RegistrationDate, along with validation rules for registering a student. The API includes endpoints for creating, retrieving, updating, and deleting registrations, with appropriate response codes for valid and invalid inputs.

Uploaded by

kartikbpadia0707
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views1 page

Problem-1

The document outlines the development of a RESTful Web API for managing student course registrations at a university. It specifies the StudentRegistration entity with properties such as StudentId, StudentName, Email, CourseCode, Semester, and RegistrationDate, along with validation rules for registering a student. The API includes endpoints for creating, retrieving, updating, and deleting registrations, with appropriate response codes for valid and invalid inputs.

Uploaded by

kartikbpadia0707
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Problem 1: Student Course Registration API

Problem Description

Develop a RESTful Web API to manage student course registrations in a university system. The
API should allow registering students and viewing registration details.

Entity: StudentRegistration

Property Data Type


StudentId int
StudentName string
Email string
CourseCode string
Semester int
RegistrationDate DateTime

API Documentation

1. Register a Student

Endpoint: POST /api/registrations

Validations (Mandatory using FluentValidation):

 StudentName is required and must contain minimum 3 characters


 Email is required and must be in a valid email format
 CourseCode is required and must be exactly 6 characters
 Semester must be between 1 and 8
 RegistrationDate must not be a future date

Expected Response:

 201 Createdfor valid input


 400 Bad Request with validation messages for invalid input

2. Do Create all necessary APIs with proper validations.


Example:
Get All Registrations [Endpoint: GET /api/registrations]
Get Specific Registrations [Endpoint: GET /api/registrations/101]
Delete Registrations [Endpoint: DELETE /api/registrations/101]
Update Registrations [Endpoint: PUT /api/registrations/102]

You might also like