Freigeben über


2.2.7.2.4 RetrievePrimitiveProperty Request

The purpose of the RetrievePrimitiveProperty request is to enable the value of an EDMSimpleType property on an EntityType instance (or one of its constituent ComplexType instances) to be retrieved by a client. AtomPub, as specified in [RFC5023], does not define operations on subcomponents of an Entry Resource. As such, this request type is not based on any AtomPub-defined [RFC5023] request.

A RetrievePrimitiveProperty request MUST use the HTTP GET method and the URI specified by the client in the HTTP request line MUST be a valid data service URI that identifies a property of type EDMSimpleType on an EntityType instance or ComplexType instance, as described in URI Format: Resource Addressing Rules (section 2.2.3).

If the RetrievePrimitiveProperty request was successful, the response MUST have a 2xx status code as specified in [RFC2616]. The payload of such a response MUST be formatted using XML, JSON, or Verbose JSON, as defined in EDMSimpleType Property (section 2.2.6.5.3), Primitive Value ([MS-ODATAJSON] section 2.1.17), and EDMSimpleType Property (section 2.2.6.3.8), respectively.

If the RetrievePrimitiveProperty request is not successful (for example, an error occurred while processing the request) the response MUST be formatted according to Error Response (section 2.2.8.1).

The syntax of a RetrievePrimitiveProperty request is defined as follows:

 retrievePP-Req          = retrievePP-ReqLine
                           retrievePP-ReqHeaders
                           CRLF
  
 retrievePP-ReqLine      = "GET"
                           SP entityTypeInstancePropertyUri retrievePP-QueryOps
                           SP HTTP-Version
                           CRLF
  
 retrievePP-ReqHeaders   = [DataServiceVersion]        ; see section 2.2.5.3
                           [MaxDataServiceVersion]     ; see section 2.2.5.7
                           [If-None-Match]             ; see section 2.2.5.6
                           [Accept]                    ; see section 2.2.5.1
                           *(HTTP-Header-Types)
  
 entityTypeInstancePropertyUri = ; see section 2.2.7.4.3
  
 retrievePP-QueryOps     = ["?" customQueryOption *("&" customQueryOption)]
                           ; see section 2.2.3.1

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

 retrievePP-Resp         =  Status-Line                 ; see [RFC2616] section 6.1.1
                            retrievePP-RespHeaders
                            CRLF
                            retrievePP-RespBody
  
 retrievePP-RespHeaders  =  DataServiceVersion          ; see section 2.2.5.3
                            [ETag]                      ; see section 2.2.5.4
                            [Content-Type]              ; see section 2.2.5.2
                            *(HTTP-Header-Types)
  
 retrievePP-RespBody     =  <Property value formatted in JSON  as per [ODataJSON4.0]
                             section 7>
                            / <Property value formatted in XML as per section
                             2.2.6.5.3>
                            / (begin-object
                               quotation-mark "d" quotation-mark
                               name-seperator
                               begin-object
                               (entityPropertyInVJson / entityPropertyInVJson2)
                               end-object
                               end-object)
                               ; see section 2.2.6.3.8