I have two questions.
1) I have a issue of understanding the correct URL construction for a REST API. For example,
https://api.context.io/lite/users/id/email_accounts/label/folders/folder/messages/message_id
Here as you can see the folder comes under folders resource and message_id comes under messages. Is it necessary to show the parent resource or collection. Will it be wrong to have a URL such as this?
https://api.context.io/lite/userid/folderid/message_id
Here, the userid, folderid and message_id maybe would indicate as integers or some other value. Of course with the values the URL doesn't make sense, but does it matter in m2m transaction? What is the best way to construct the URL?
2) Is it ok to have 'verbs' in the URL? I have seen the following urls which has verbs such as 'move', 'send' in the URL. Is that correct? If it is wrong, should we do everything such as 'search' using parameters only?
POST https://outlook.office365.com/api/v1.0/me/messages/{message_id}/move
POST https://www.googleapis.com/gmail/v1/users/userId/messages/send
Please share your thoughts. I read lots of articles on these. Yet it seems to be more of a personal choose rather than an Industry standard. What would Dr. Fielding would recommend?
Thanks in advance.