Posts

Showing posts with the label api-design

REST API Designs with categories

Image
Clash Royale CLAN TAG #URR8PPP REST API Designs with categories Let's say there is a SINGLE mobile application which receives various types of notifications (like WhatsApp notifications, Facebook Messenger notifications ,etc). What would be a better REST API structure for this? /users/test@abc.com/notifications //Gives all the notifications There is a confusion between the below two formats on how . /users/test@abc.com/notifications?category=whatsapp,facebook //Gives all the notifications vs /users/test@abc.com/notifications/whatsapp //Gives only whatsapp notification /users/test@abc.com/notifications/facebook //Gives only facebook notification To access an individual notification resource /users/test@abc.com/notifications/facebook/{notification-id} vs /users/test@abc.com/notifications/{notification-id} Have you had a look at this: stackoverflow.com/questions/24059773/… – M20 5 hours ago ...