![]() In response payloads only, OData v2 supports two pieces of collection-level metadata: an Entry count (the total count of the number of entities in the Collection) and "next links" in the case when a partial listing of the Collection of Entries is being represented. OData V1: Categories (0) Food 0 Food elements representing additional Categories go here -> It is likely the next version of OData will generalize the namespace URI to use an based URI. Note: The "m" and "d" prefixes represent the OData metadata and data namespaces. The format of elements within a feed is described in the Representing Entries section. For example, a Collection of product category Entries (that could be part of a product catalog) exposed by an OData service, as identified by the URI, is represented as shown below. In OData, Collections are represented as Atom feeds ( ), with one Atom entry for each Entry within the Collection. Representing Collections of EntriesĬollections represent a set of Entries. Default Products Categories Suppliers 2.3. For convenience, a sample Service Document is shown in the listing below. Service Documents are described in AtomPub, section 15.įor example, the URI identifies the Service Document of a sample OData service which exposes a Categories, Products and Suppliers Collection. Same as the literal form in, except without the surrounding datetimeoffset'' syntaxĪs described in, if a service exposes several Collections, then to aid discovery of those Collections by clients it is useful for the service to expose a Service Document which lists the available Collections. Same as the literal form in, except without the surrounding time'' syntax Same as the literal form in, except without surrounding double quotes ![]() Same as the literal form in, except without the trailing "f" Same as the literal form in, except without the surrounding guid'' syntax Same as the literal form in, except without the trailing "m" Same as the literal form in, except without the surrounding datetime'' syntax ![]() Same as the literal form in, except without the surrounding In addition to the rules stated in the table, if the value of a primitive type is null, then it is represented as an empty XML element with an m:null="true" attribute ("m" identifies the OData metadata namespace).īase64 encoded value of an EDM.Binary value. Note: The type system used by OData services is described in full in the primitive types section of the document. Values of OData primitive types are represented as values of XML elements/attributes as per the table below. Through out this section the notation is used to refer to the named element in the Atom specification. For details regarding how to create various request types (Retrieve, Create, etc) see. The following sections define how resources (Collection, Entries, etc) exposed by an OData service can be represented in requests and responses payloads using the Atom format. which are only aware of the Atom standards ( & ), but not the additional conventions defined in this document. It should be noted that feeds following the conventions defined in this document are valid AtomPub feeds and can be consumed by feed readers, tools, etc. Since Atom does not define how structured data is encoded with feeds, to enable transfers of structured content by OData services, this document defines a set of conventions for representing structured data in an Atom feed. Īs noted in the OData Basics section of, OData services expose Collections of structured Entries, making Atom a natural fit for representing OData resources. For the remainder of this document, the term Atom is used to represent the combination of the format/representation rules defined in Atom and AtomPub. AtomPub defines additional format constructs for Entries and Feeds to enable the resources they represent to be easily categorized, grouped, edited and discovered. Feeds are composed of a number of items, known as Entries. ![]() BackgroundĪs described in Atom, Atom is an XML-based document format that describes Collections of related information known as "feeds". The content type negotiation section of the document describes how clients can use standard HTTP content type negotiation to tell an OData service which format it wants to use. This document describes how OData resources are represented in Atom (plus additional elements defined in AtomPub) and describes the JSON representation. OData supports two formats for representing the resources (Collections, Entries, Links, etc) it exposes: the XML-based Atom format and the JSON format. ![]() OData V4 has been standardized by OASIS and has many features not included in OData Version 2.0. Atom Format (OData Version 2.0) OData Version 4.0 is the current recommended version of OData. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |