2.2.7.4.3 DeleteValue Request

The purpose of the DeleteValue Request is to enable an EDMSimpleType property of an EntityType instance to be set to null. 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.

DeleteValue request MUST use the HTTP DELETE method and the URI specified by the client in the HTTP request line MUST be a valid data service URI, as defined in URI Format: Resource Addressing Rules (section 2.2.3), that identifies the raw value of a nullable property (of type EDMSimpleType) on an EntityType instance or on one of the ComplexType properties of that EntityType instance.

A DeleteValue request sent to a URI identifying a property for which null is not a valid value SHOULD be considered to be a malformed request and the server is to respond with the HTTP 4xx range of status codes.

A DeleteValue request MUST contain 0 bytes in the payload. If the DeleteValue request was successful, the response MUST have a 204 (No Content) status code, as specified in [RFC2616]. If the DeleteValue request is not successful, the response MUST be formatted according to Error Response (section 2.2.8.1).

The syntax of a DeleteValue request is defined as follows:

 deleteValue-Req         = deleteValue-ReqLine
                           deleteValue-ReqHeaders
                           CRLF
  
 deleteValue-ReqLine     = "DELETE"
                           SP entityTypeInstancePropertyUri
                              "/$value"
                              deleteValue-QueryOps
                           SP HTTP-Version
                           CRLF
  
 deleteValue-ReqHeaders  = [DataServiceVersion]        ; see section 2.2.5.3
                           [MaxDataServiceVersion]     ; see section 2.2.5.7
                           [If-Match]                  ; see section 2.2.5.5
                           *(HTTP-Header-Types)
  
 entityTypeInstancePropertyUri = <Any Resource Path identifying a EDMSimpleType
                                  property on an Entity Type instance>
                                 ; see section section 2.2.3 and section 2.2.3.5 -- URI4 & URI5
  
 deleteValue-QueryOps      = ["?" customQueryOption *("&" customQueryOption)]

The syntax of a response to a successful DeleteValue request is defined as follows:

 deleteValue-Resp         = Status-Line                 ; see [RFC2616] section 6.1.1
                            deleteValue-RespHeaders
                            CRLF
  
 deleteValue-RespHeaders = DataServiceVersion          ; see section 2.2.5.3
                            *(HTTP-Header-Types)