126.96.36.199.5 UpdateValue Request
The purpose of the UpdateValue request is to enable the value of an EDMSimpleType property on an EntityType instance to be updated. AtomPub [RFC5023] does not define operations on subcomponents of an Entry Resource. As such, this request type is not based on an AtomPub-defined [RFC5023] request.
An UpdateValue request MUST use the HTTP PUT, PATCH, or MERGE method (as specified in PATCH/MERGE (section 188.8.131.52)). Additionally, the URI specified by the client in the HTTP request line MUST be a valid data service URI, as specified in URI Format: Resource Addressing Rules (section 2.2.3), that identifies the raw value of a property (of type EDMSimpleType) on an EntityType instance (or on one of the ComplexType properties of that EntityType instance).
The payload of the request MUST be formatted according to the rules defined in EDMSimpleType Property (section 184.108.40.206.1). A server receiving a request of this type MUST replace the value of the property addressed via the request URI with the value provided in the payload. The server MUST perform the same behavior whether the request uses the HTTP MERGE, PATCH, or PUT method.
If the UpdateValue request is successful, the response in OData 1.0 and OData 2.0 MUST have a 204 response code, as specified in [RFC2616], and have a 0 byte response body, unless a Prefer header (section 220.127.116.11) has been specified to request content. When an OData 1.0 or OData 2.0 request contains a Prefer header value that requests content or when OData 3.0 is used, the response MAY have a 200 response code, as specified in [RFC2616], and a response body that includes the updated entity that MUST be formatted the same as a response body to a RetrieveValue request (section 18.104.22.168.5).
If the UpdateValue request is not successful (for example, if an error occurs during request processing), the response MUST be formatted according to Error Response (section 22.214.171.124).
The syntax of an UpdateValue request is defined as follows:
updateValue-Req = updateValue-ReqLine updateValue-ReqHeaders CRLF updateValue-ReqBody updateValue-ReqLine = "PUT" | "MERGE"| "PATCH" SP entityTypeInstancePropertyUri "/$value" updateValue-QueryOps SP HTTP-Version CRLF updateValue-ReqHeaders = [DataServiceVersion] ; see section 126.96.36.199 [MaxDataServiceVersion] ; see section 188.8.131.52 [If-Match] ; see section 184.108.40.206 [Content-Type] ; see section 220.127.116.11 [Prefer] ; see section 18.104.22.168 *(HTTP-Header-Types) updateValue-ReqBody = <Property value formatted as per section 22.214.171.124.1> entityTypeInstancePropertyUri = ; see section 126.96.36.199.3 updateValue-QueryOps = ["?" customQueryOption *("&" customQueryOption)]
The syntax of a response to a successful UpdateValue request is defined as follows:
updateValue-Resp = Status-Line ; see [RFC2616] section 6.1.1 updateValue-RespHeaders CRLF [updateValue-RespBody] updateValue-RespHeaders = DataServiceVersion ; see section 188.8.131.52 [ETag] ; see section 184.108.40.206 [Preference-Applied] ; see section 220.127.116.11 *(HTTP-Header-Types) updateValue-RespBody = <Property value formatted as per section 18.104.22.168.1>