How to use realm input(optional) in spring boot rest GET request using Java?

I am trying to write rest micro-service using spring boot for my college home work. Question is use realm input(optional input) with student_Id while creating GET request then it should return response with student_Id included. While inside the Mapper class do i need to use realm mode to IN or OUT. It saying realm is optional input. Also for student_Id request mode=IN for response does need another mode=OUT? Hope you guys can help on this questions.