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

Define canonical function as a path segment that allows retrieving an entity by its id

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD01
    • Fix Version/s: V4.0_CSD02
    • Component/s: ABNF, Protocol, URL Conventions
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      Ids are the primary way to reference an instance in OData; they are used in relationships, in deltas, and can take the place of instances in payloads. We recommend, but do not require that ids be dereferenceable.

      Clients need a dependable way to get from an id to a reference, whether or not the reference is dereferencable. Although they could construct a query if they know the root set the id comes from, it would be useful and more discoverable to introduce a canonical query function, at the service root, for returning an instance given its id.

      Note that, since the id is likely to contain illegal characters, we have to pass the id as a query option, and will need to double single quotes in reference

      Options:

      GET ~myservice/getbyid(@id)?@id='.....'
      GET ~myservice/$getbyid?@id='.....'

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: