I've got a small problem where I can't seem to work out what to name a particular API endpoint.
The resource structure looks like this:
students/{student-id}/exams
Using a POST request, I want to add a new exam to a specific student. However, the student's ID, which we are using to query the students collection, is NOT provided in the request. Instead, the API logic retrieves the student's ID based on the current user session.
I thought about naming the endpoint this:
POST students/current-session/exams
But that doesn't seem right to me.
So what would you suggest as a good, RESTful name for this endpoint? I can't use query parameters as this is a POST.