Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4140

Which response code for resources max. limit in REST API? [closed]

$
0
0

I am designing a REST API for registering enrollments to classes. In my of my endpoints, I can POST an enrollment:

POST to http://my-api/class/learn-rest/enrollment

This creates a new enrollment. However, in this case, there can only be a fixed number of enrollments, let's say 5.

Which HTTP response code should I return when the user tries to add the 6th enrollment?


Viewing all articles
Browse latest Browse all 4140

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>