I'm a little bit confused with rest api endpoints. I developed a rest api using http POST to update some records in salesforce and it has this structure:
where I assume after the word apexrest I'm telling I have a class that will follow that path in my apex class and I'm passing some parameters like id, object and operation:
But after doing some research I found I can update a record using an endpoint like this: https://Mydomain.my.salesforce.com/services/**data/v54.0/sobjects/ObjectName/RecordId/**
So the question is what is the difference? or in case I use this path: services/data/v54.0/sobjects/ObjectName/RecordId/ how can I get the request body in apex like in the first example?