I’m developing an API for multimedia service. In database I have media table which stores different media (movies, music, series etc). There’re two types of users: admins and users.
Users can access media using different endpoints:
- /movies
- /cartoons
- /music
- /series
- /seasons
- /episodes
- /seasons
- etc.
Each endpoint returns only data specific for media type. Each endpoint has specific search arguments.
API for admins will not be public. Is it normal create single endpoint to control media types? For example, I can create /media
endpoint which will be used to CRUD different media types.
Should I separate API for admins and API for users in different projects?
How should I handle situations when resource has different fields for admins and users?