Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-479

Allow Content-ID referencing in request bodies for inserting links to newly created entities

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS01
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: Protocol, Vocabularies
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      Content-ID referencing in request bodies is allowed:

      PUT $2/SingleValuedNavigationProperty
      {
      "@odata.context": "http://host/service/$metadata#$ref",
      "@odata.id": "$1"
      }

      POST SomeEntitySet
      {
      ...,
      "SingleNavigationProperty@odata.bind":"$2",
      "MultiValuedNavigationProperty@odata.bind":["$1","$3","SomeEntitySet(42)"],
      ...
      }

      Services allowing $<content-id value> syntax in request bodies for inserting links SHOULD advertise this with the new term BatchContentIdReferencingInRequestBodiesSupported in the Capabilities vocabulary:

      <Term Name="BatchContentIdReferencingInRequestBodiesSupported" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer">
      <Annotation Term="Core.Description" String="Service supports Content-ID referencing in request bodies" />
      </Term>

      Applied:
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Capabilities.V1.xml?rev=679

      Applied:
      https://www.oasis-open.org/committees/download.php/55616/odata-v4.0-wd08-part1-protocol-2015-05-07.docx

      Show
      Content-ID referencing in request bodies is allowed: PUT $2/SingleValuedNavigationProperty { "@odata.context": "http://host/service/$metadata#$ref", "@odata.id": "$1" } POST SomeEntitySet { ..., "SingleNavigationProperty@odata.bind":"$2", "MultiValuedNavigationProperty@odata.bind": ["$1","$3","SomeEntitySet(42)"] , ... } Services allowing $<content-id value> syntax in request bodies for inserting links SHOULD advertise this with the new term BatchContentIdReferencingInRequestBodiesSupported in the Capabilities vocabulary: <Term Name="BatchContentIdReferencingInRequestBodiesSupported" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer"> <Annotation Term="Core.Description" String="Service supports Content-ID referencing in request bodies" /> </Term> Applied: https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Capabilities.V1.xml?rev=679 Applied: https://www.oasis-open.org/committees/download.php/55616/odata-v4.0-wd08-part1-protocol-2015-05-07.docx

      Description

      Object graphs that are not trees can require inserting links to entities that just have been created in the same change set. This can only be done with content-id references within request bodies.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: