Reputation: 2530
I'm currently looking at the api for slack and some other apps and I'm seeing that they are using a .
in their api endpoints. Is there a reason or benefit using the .
notation in stead of /
?
Example:
https://slack.com/api/chat.update
Upvotes: 0
Views: 943
Reputation: 10981
There is no intrinsic benefit of one over the other. You could equally ask why most APIs use /
, in stead of end points like http://example.com/grandparent.parent.child?modifier
The most obvious reason for the existence of a path like this in the past, was file system mapping. Maybe there was a chat.update.cgi script handling the request. Those sorts of limitations no longer apply however.
Also, it seems redundant to have /api/ in the path. I would be wary of using such systems. Their authors would seem to have forgotten that your whole website is your API regardless of whether the representations are HTML or JSON.
Upvotes: 1