-
Currently, the external API that third-parties can access has a rather unusual style, in my opinion. E.g. Get user Create user But, rather than that, use different HTTP methods on the same endpoint. E.g. Get a user Create a user Delete a user Update a user That's what I believe would be better, but please correct me if I am wrong. Also please correct me if I did not showcase the current endpoints correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The naming conventions come from the fact that Blitz exposes RPC API. The naming you provided is more in a REST style. You can think of it this way:
|
Beta Was this translation helpful? Give feedback.
-
To tack onto @beerose's answer, if you want to craft an API suited for third parties, you can always create a separate endpoint using API Routes and follow RESTful patterns in those routes. Third parties don't benefit from the automatic code generation of queries/mutations (yet!) so they'd probably prefer to have a route tailored for them like that anyway. |
Beta Was this translation helpful? Give feedback.
To tack onto @beerose's answer, if you want to craft an API suited for third parties, you can always create a separate endpoint using API Routes and follow RESTful patterns in those routes. Third parties don't benefit from the automatic code generation of queries/mutations (yet!) so they'd probably prefer to have a route tailored for them like that anyway.