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

Clarify creation of a singleton media entity

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Clarify, in section 11.4.7.1, that a singleton contained media entity is created by calling PUT to the media entity link. If the singleton was null, this should return 201 created and a location header, and may set other properties of the entity.

      In 11.4.4 Upsert an Entity, clarify that, while it's not possible to upsert a media entity through a PATCH to the entity url, a PUT to the media edit link replaces the media and, if the entity doesn't already exist, results in the creation of the entity with the new stream value. In either case, additional properties of the media entity may be set when setting the stream value.

      Show
      Clarify, in section 11.4.7.1, that a singleton contained media entity is created by calling PUT to the media entity link. If the singleton was null, this should return 201 created and a location header, and may set other properties of the entity. In 11.4.4 Upsert an Entity, clarify that, while it's not possible to upsert a media entity through a PATCH to the entity url, a PUT to the media edit link replaces the media and, if the entity doesn't already exist, results in the creation of the entity with the new stream value. In either case, additional properties of the media entity may be set when setting the stream value.

      Description

      11.4.7.1 Create a Media Entity in [Protocol] describes how to create a media entity within a collection. It doesn't mention how to create a singleton contained media entity.

      11.4.7.2 Update a Media Entity Stream says that, to update, you would submit a request to the media edit link (the editlink of the entity suffixed with /$value).

      Presumably, creation of a singleton contained media entity would be done by calling PUT to the media entity link, which should return 201 created and a location header, and may set other properties of the entity, but this is not called out.

      11.4.4 Upsert an Entity calls out that it's not possible to upsert a media entity, which is correct but misleading. PUT to the media edit link replaces the media. As above, if the entity doesn't already exist it will be created with the new stream value. In either case, additional properties of the entity may be set.

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: