DEV Community

Discussion on: Create Reliable & Easy-to-use APIs with API First Design

Collapse
 
raphael_jambalos profile image
Raphael Jambalos

Hi Pete! I got the idea from JJ Geewax's API Design Patterns Book. He is a software engineer at Google, working on GCP. Google Cloud Platform is one of the companies using this now: cloud.google.com/apis/design/custo...

I like the idea too. By using colons instead of the famous slash character, we get to have a clear separation between the resource layout (/users/10/transactions/11) and the custom method (:mark_as_paid, with the whole URL being /users/10/transactions/11:mark_as_paid).

It takes some getting used to, but I think it results in better, more consistent API design.