c # – Correct use of HTTP VERBS in the custom REST implementation

I have a server-side service (with ASP.NET Core) that should provide a REST API to different clients.

Behind the service, I use a SQL server for data storage.

The controller has the following route attribute:

Public class CustomDataController: ControllerBase

There are methods of data provider:


public async Task <IQueryable> GetDataForGuest (int ignore, int take, organizationIDID) => wait dataProvider.GetDataAsync(jump, take, organizationID);

There are methods to create or update data on the server:


public task async SaveDataToServer ([FromBody] listing specs) => wait dataProvider.SaveDataAsync(specs, isNewData: true);

According to many articles (like this one), GET is for the return of a resource, TO POST is to create and TO PUT is for the update:

  • GET – For the return of resources
  • POST – To create a new resource
  • PUT – To update a resource
  • PATCH – To update a resource
  • DELETE – To delete a resource

However, as you can see, my methods are only facades, the data is saved by the data provider and I can decide, according to a variable bool, to insert or update an incoming record.

As you can also guess, I do not use traditional REST URLs (like api / user / 1Because I need complex data, my URL looks like this:

Currenty I'm getting data with the HttpPost for inserting new records and updating existing records (and it works normally). My concerns are about best practices: should I use HttpPut when do I want to update an existing record?
According to specifications, using TO PUT is idempontent by definition in TO POST is not.

So using only TO POST is considered the best practice? Or should I separate update actions to another method marked with HttpPut? Is it important to consider that the logic behind the methods decides what will happen and not the verb?