There are rules. In a RESTful system, clients and servers interact only by sending each other messages that follow a predefined protocol.
The HTTP standard defines eight different kinds of messages, These four are the most commonly used:
Get a representation of this resource.
Destroy this resource.
Create a new resource underneath this one, based on the given representation.
Replace this state of this resource with the one described in the given representation.
These two methods are mostly used as a client explores an API:
Get the headers that would be sent along with a representation of this resource, but no the represntation itself.
Discover with HTTP methods this resource respons to.
The other two methods defined in the HTTP standard, CONNECT and TRACE, are only used with HTTP proxies. I won’t be covering them.
I recommend that API designers consider a ninth HTTP method, defined not in the HTTP standard but in a supplement, RFC 5789:
Modify part of the state of this resource based on the given representation. If some bit of resource state is not mentioned in the given representation, leave it alone.
PATCH is like PUT, but allows for fine-grained changes to resource state.