You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We inconsistently use PATCH and PUT to update a resource. We use PATCH and PUT when only the value of a field can be sent. We use PATCH to send partial resources and only the value. Deployment API:
PATCH /deployments/{id : \d+}/confirm: a partial deployment resource can be sent
PATCH /deployments/{id : \d+}/date: only a int can be sent
PUT /deployments/{id : \d+}/state: only a string can be sent
PUT /deployments/{id : \d+}/updateState: only a string can be sent
PUT /deployments/{id: \d+}/jobs/{nodeJobId: \d+}: only a string can be sent
The recommendation seems to be to use PUT if the whole resource is sent and PATCH when only some fields are sent. PUT should be idempotent. PATCH should define it's own media type (content-type):
We inconsistently use PATCH and PUT to update a resource. We use PATCH and PUT when only the value of a field can be sent. We use PATCH to send partial resources and only the value. Deployment API:
The recommendation seems to be to use PUT if the whole resource is sent and PATCH when only some fields are sent. PUT should be idempotent. PATCH should define it's own media type (content-type):
Commands should be POSTed to a subresource and a 303 pointing to the original resource should be returned (e.g. copyFrom resource):
Sending only values doesn't seem to a commonly used pattern.
We should agree on when to use what and cleanup the rest api accordingly.
The text was updated successfully, but these errors were encountered: