API (or docs) not in conformity with RESTful

My understanding of REST is

  • PUT /thing/:new_id to create
  • PUT /thing/:existing_id to update
  • POST /things to create
  • POST /thing/:existing_id to update
  • PATCH /thing/:id to update part of the resource

More info When to use PUT or POST and When to use the PATCH method. As far as I can tell, there’s no exact ‘standard’.

On the topic of the safe network API methods, as @digipl says there are changes coming to the way it works. I have also been frustrated by the inconsistency between PUT and POST as implement by safe but I’m confident it will be simplified before being set in stone :wink:

as @ben explains at the start of January regarding the API:

we is a very verbose and not clearly defined API and requires a lot of very similar terms in your head, which can make it very confusing. Which is why we are intending of replacing this with a much cleaner approach

4 Likes