ࡱ > bjbjOO s: -a -a U } * * * * * $ + + + P n+ 2 + /M 4 3 h d i i i Rj : $ \ L L L L L L L $ P R h L * 0 Rj Rj 0 0 L * * i i 4 L 6 6 6 0 - * i * i L 6 0 L 6 6 `? D i =d A : L L 0 /M A V !T !T t D D B !T * RG H 0 0 6 0 0 0 0 0 L L 6 0 0 0 /M 0 0 0 0 !T 0 0 0 0 0 0 0 0 0 ) :
OData Atom Format Version 4.0
Committee Specification 02
17 November 2013
Specification URIs
This version:
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.doc" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.doc (Authoritative)
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.html" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.html
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.pdf" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.pdf
Previous version:
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.doc" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.doc (Authoritative)
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.html" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.html
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.pdf" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.pdf
Latest version:
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.doc" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.doc (Authoritative)
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.html" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.html
HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.pdf" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.pdf
Technical Committee:
HYPERLINK "http://www.oasis-open.org/committees/odata/" OASIS Open Data Protocol (OData) TC
Chairs:
Barbara Hartel ( HYPERLINK "mailto:barbara.hartel@sap.com" barbara.hartel@sap.com), HYPERLINK "http://www.sap.com/" SAP AG
Ram Jeyaraman ( HYPERLINK "mailto:Ram.Jeyaraman@microsoft.com" Ram.Jeyaraman@microsoft.com), HYPERLINK "http://www.microsoft.com/" Microsoft
Editors:
Martin Zurmuehl ( HYPERLINK "mailto:martin.zurmuehl@sap.com" martin.zurmuehl@sap.com), HYPERLINK "http://www.sap.com/" SAP AG
Michael Pizzo ( HYPERLINK "mailto:mikep@microsoft.com" mikep@microsoft.com), HYPERLINK "http://www.microsoft.com/" Microsoft
Ralf Handl ( HYPERLINK "mailto:ralf.handl@sap.com" ralf.handl@sap.com), HYPERLINK "http://www.sap.com/" SAP AG
Additional artifacts:
This prose specification is one component of a Work Product that also includes:
XML schema: HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/schemas/" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/schemas/
Related work:
This specification is related to:
OData Version 4.0, a multi-part Work Product which includes:
OData Version 4.0 Part 1: Protocol. Latest version. HYPERLINK "http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html" http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html
OData Version 4.0 Part 2: URL Conventions. Latest version. HYPERLINK "http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html" http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html
OData Version 4.0 Part 3: Common Schema Definition Language (CSDL). Latest version. HYPERLINK "http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html" http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html
ABNF components: OData ABNF Construction Rules Version 4.0 and OData ABNF Test Cases. 17 November 2013. HYPERLINK "http://docs.oasis-open.org/odata/odata/v4.0/cs02/abnf/" http://docs.oasis-open.org/odata/odata/v4.0/cs02/abnf/
Vocabulary components: OData Core Vocabulary, OData Measures Vocabulary and OData Capabilities Vocabulary. 17 November 2013. HYPERLINK "http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/" http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/
OData JSON Format Version 4.0. Latest version. HYPERLINK "http://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html" http://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html
Declared XML namespaces:
HYPERLINK "http://docs.oasis-open.org/odata/ns/data" http://docs.oasis-open.org/odata/ns/data
HYPERLINK "http://docs.oasis-open.org/odata/ns/metadata" http://docs.oasis-open.org/odata/ns/metadata
Abstract:
The Open Data Protocol (OData) for representing and interacting with structured content is comprised of a set of specifications. The core specification for the protocol is in OData Version 4.0 Part 1: Protocol. This document extends the core specification by defining representations for OData requests and responses using an Atom format.
Status:
This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the Latest version location noted above for possible later revisions of this document.
Technical Committee members should send comments on this specification to the Technical Committees email list. Others should send comments to the Technical Committee by using the HYPERLINK "http://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata" Send A Comment button on the Technical Committees web page at HYPERLINK "http://www.oasis-open.org/committees/odata/" http://www.oasis-open.org/committees/odata/.
For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Technical Committee web page ( HYPERLINK "http://www.oasis-open.org/committees/odata/ipr.php" http://www.oasis-open.org/committees/odata/ipr.php).
Citation format:
When referencing this specification the following citation format should be used:
[OData-Atom-Format-v4.0]
OData Atom Format Version 4.0. 17 November 2013. OASIS Committee Specification 02. HYPERLINK "http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.html" http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.html.
Notices
Copyright OASIS Open 2013. All Rights Reserved.
All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full HYPERLINK "http://www.oasis-open.org/policies-guidelines/ipr"Policy may be found at the OASIS website.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification.
OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification. OASIS may include such claims on its website, but disclaims any obligation to do so.
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.
The name "OASIS" is a trademark of HYPERLINK "http://www.oasis-open.org/" OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see HYPERLINK "http://www.oasis-open.org/policies-guidelines/trademark"http://www.oasis-open.org/policies-guidelines/trademark for above guidance.
Table of Contents
TOC \o "1-6" \h \z \u HYPERLINK \l "_Toc372792665" 1 Introduction PAGEREF _Toc372792665 \h 9
HYPERLINK \l "_Toc372792666" 1.1 Terminology PAGEREF _Toc372792666 \h 9
HYPERLINK \l "_Toc372792667" 1.2 Normative References PAGEREF _Toc372792667 \h 9
HYPERLINK \l "_Toc372792668" 1.3 Typographical Conventions PAGEREF _Toc372792668 \h 10
HYPERLINK \l "_Toc372792669" 2 Atom Format Design PAGEREF _Toc372792669 \h 11
HYPERLINK \l "_Toc372792670" 2.1 Namespaces PAGEREF _Toc372792670 \h 11
HYPERLINK \l "_Toc372792671" 2.1.1 Atom Syndication PAGEREF _Toc372792671 \h 11
HYPERLINK \l "_Toc372792672" 2.1.2 Atom Publishing Protocol PAGEREF _Toc372792672 \h 11
HYPERLINK \l "_Toc372792673" 2.1.3 Atom Tombstone PAGEREF _Toc372792673 \h 11
HYPERLINK \l "_Toc372792674" 2.1.4 OData Data PAGEREF _Toc372792674 \h 11
HYPERLINK \l "_Toc372792675" 2.1.5 OData Metadata PAGEREF _Toc372792675 \h 12
HYPERLINK \l "_Toc372792676" 2.2 XML Schema Definition for OData Metadata PAGEREF _Toc372792676 \h 12
HYPERLINK \l "_Toc372792677" 3 Requesting the Atom Format PAGEREF _Toc372792677 \h 13
HYPERLINK \l "_Toc372792678" 4 Common Characteristics PAGEREF _Toc372792678 \h 14
HYPERLINK \l "_Toc372792679" 4.1 Header Content-Type PAGEREF _Toc372792679 \h 14
HYPERLINK \l "_Toc372792680" 4.2 Message Body PAGEREF _Toc372792680 \h 14
HYPERLINK \l "_Toc372792681" 4.3 Relative URLs PAGEREF _Toc372792681 \h 14
HYPERLINK \l "_Toc372792682" 5 Service Document PAGEREF _Toc372792682 \h 15
HYPERLINK \l "_Toc372792683" 5.1 Element app:service PAGEREF _Toc372792683 \h 15
HYPERLINK \l "_Toc372792684" 5.1.1 Attribute metadata:context PAGEREF _Toc372792684 \h 15
HYPERLINK \l "_Toc372792685" 5.1.2 Attribute metadata:metadata-etag PAGEREF _Toc372792685 \h 15
HYPERLINK \l "_Toc372792686" 5.2 Element app:workspace PAGEREF _Toc372792686 \h 16
HYPERLINK \l "_Toc372792687" 5.3 Element app:collection PAGEREF _Toc372792687 \h 16
HYPERLINK \l "_Toc372792688" 5.3.1 Attribute href PAGEREF _Toc372792688 \h 16
HYPERLINK \l "_Toc372792689" 5.3.2 Attribute metadata:name PAGEREF _Toc372792689 \h 16
HYPERLINK \l "_Toc372792690" 5.3.3 Element atom:title PAGEREF _Toc372792690 \h 16
HYPERLINK \l "_Toc372792691" 5.4 Element metadata:function-import PAGEREF _Toc372792691 \h 16
HYPERLINK \l "_Toc372792692" 5.4.1 Attribute href PAGEREF _Toc372792692 \h 16
HYPERLINK \l "_Toc372792693" 5.4.2 Attribute metadata:name PAGEREF _Toc372792693 \h 16
HYPERLINK \l "_Toc372792694" 5.4.3 Element atom:title PAGEREF _Toc372792694 \h 17
HYPERLINK \l "_Toc372792695" 5.5 Element metadata:singleton PAGEREF _Toc372792695 \h 17
HYPERLINK \l "_Toc372792696" 5.5.1 Attribute href PAGEREF _Toc372792696 \h 17
HYPERLINK \l "_Toc372792697" 5.5.2 Attribute metadata:name PAGEREF _Toc372792697 \h 17
HYPERLINK \l "_Toc372792698" 5.5.3 Element atom:title PAGEREF _Toc372792698 \h 17
HYPERLINK \l "_Toc372792699" 5.6 Element metadata:service-document PAGEREF _Toc372792699 \h 17
HYPERLINK \l "_Toc372792700" 5.6.1 Attribute href PAGEREF _Toc372792700 \h 17
HYPERLINK \l "_Toc372792701" 5.6.2 Element atom:title PAGEREF _Toc372792701 \h 17
HYPERLINK \l "_Toc372792702" 6 Entity PAGEREF _Toc372792702 \h 18
HYPERLINK \l "_Toc372792703" 6.1 Element atom:entry PAGEREF _Toc372792703 \h 19
HYPERLINK \l "_Toc372792704" 6.1.1 Attribute metadata:etag PAGEREF _Toc372792704 \h 19
HYPERLINK \l "_Toc372792705" 6.1.2 Attribute metadata:context PAGEREF _Toc372792705 \h 19
HYPERLINK \l "_Toc372792706" 6.1.3 Attribute metadata:metadata-etag PAGEREF _Toc372792706 \h 19
HYPERLINK \l "_Toc372792707" 6.2 Element atom:id PAGEREF _Toc372792707 \h 19
HYPERLINK \l "_Toc372792708" 6.3 Element atom:category PAGEREF _Toc372792708 \h 19
HYPERLINK \l "_Toc372792709" 6.4 Element atom:link PAGEREF _Toc372792709 \h 20
HYPERLINK \l "_Toc372792710" 6.5 Element atom:content PAGEREF _Toc372792710 \h 20
HYPERLINK \l "_Toc372792711" 7 Structural Property PAGEREF _Toc372792711 \h 21
HYPERLINK \l "_Toc372792712" 7.1 Primitive Value PAGEREF _Toc372792712 \h 21
HYPERLINK \l "_Toc372792713" 7.2 Element metadata:properties PAGEREF _Toc372792713 \h 21
HYPERLINK \l "_Toc372792714" 7.3 Element data:[PropertyName] PAGEREF _Toc372792714 \h 21
HYPERLINK \l "_Toc372792715" 7.3.1 Attribute metadata:type PAGEREF _Toc372792715 \h 22
HYPERLINK \l "_Toc372792716" 7.3.2 Attribute metadata:null PAGEREF _Toc372792716 \h 22
HYPERLINK \l "_Toc372792717" 7.4 Primitive and Enumeration Property PAGEREF _Toc372792717 \h 22
HYPERLINK \l "_Toc372792718" 7.5 Complex Property PAGEREF _Toc372792718 \h 22
HYPERLINK \l "_Toc372792719" 7.6 Primitive and Enumeration Property Collection PAGEREF _Toc372792719 \h 23
HYPERLINK \l "_Toc372792720" 7.6.1 Element metadata:element PAGEREF _Toc372792720 \h 23
HYPERLINK \l "_Toc372792721" 7.7 Complex Property Collection PAGEREF _Toc372792721 \h 23
HYPERLINK \l "_Toc372792722" 7.7.1 Element metadata:element PAGEREF _Toc372792722 \h 23
HYPERLINK \l "_Toc372792723" 7.7.1.1 Attribute metadata:type PAGEREF _Toc372792723 \h 23
HYPERLINK \l "_Toc372792724" 8 Navigation Property PAGEREF _Toc372792724 \h 25
HYPERLINK \l "_Toc372792725" 8.1 Navigation Link PAGEREF _Toc372792725 \h 25
HYPERLINK \l "_Toc372792726" 8.1.1 Element atom:link PAGEREF _Toc372792726 \h 25
HYPERLINK \l "_Toc372792727" 8.1.1.1 Attribute rel PAGEREF _Toc372792727 \h 25
HYPERLINK \l "_Toc372792728" 8.1.1.2 Attribute href PAGEREF _Toc372792728 \h 25
HYPERLINK \l "_Toc372792729" 8.1.1.3 Attribute type PAGEREF _Toc372792729 \h 26
HYPERLINK \l "_Toc372792730" 8.1.1.4 Attribute metadata:context PAGEREF _Toc372792730 \h 26
HYPERLINK \l "_Toc372792731" 8.1.1.5 Attribute title PAGEREF _Toc372792731 \h 26
HYPERLINK \l "_Toc372792732" 8.2 Association Link PAGEREF _Toc372792732 \h 26
HYPERLINK \l "_Toc372792733" 8.2.1 Element atom:link PAGEREF _Toc372792733 \h 26
HYPERLINK \l "_Toc372792734" 8.2.1.1 Attribute rel PAGEREF _Toc372792734 \h 26
HYPERLINK \l "_Toc372792735" 8.2.1.2 Attribute href PAGEREF _Toc372792735 \h 27
HYPERLINK \l "_Toc372792736" 8.2.1.3 Attribute type PAGEREF _Toc372792736 \h 27
HYPERLINK \l "_Toc372792737" 8.2.1.4 Attribute title PAGEREF _Toc372792737 \h 27
HYPERLINK \l "_Toc372792738" 8.3 Expanded Navigation Property PAGEREF _Toc372792738 \h 27
HYPERLINK \l "_Toc372792739" 8.4 Deep Insert PAGEREF _Toc372792739 \h 27
HYPERLINK \l "_Toc372792740" 8.5 Bind Operation PAGEREF _Toc372792740 \h 28
HYPERLINK \l "_Toc372792741" 9 Stream Property PAGEREF _Toc372792741 \h 30
HYPERLINK \l "_Toc372792742" 9.1 Element atom:link PAGEREF _Toc372792742 \h 30
HYPERLINK \l "_Toc372792743" 9.1.1 Attribute rel PAGEREF _Toc372792743 \h 30
HYPERLINK \l "_Toc372792744" 9.1.2 Attribute href PAGEREF _Toc372792744 \h 30
HYPERLINK \l "_Toc372792745" 9.1.3 Attribute type PAGEREF _Toc372792745 \h 30
HYPERLINK \l "_Toc372792746" 9.1.4 Attribute metadata:etag PAGEREF _Toc372792746 \h 30
HYPERLINK \l "_Toc372792747" 9.1.5 Attribute title PAGEREF _Toc372792747 \h 30
HYPERLINK \l "_Toc372792748" 10 Media Entity PAGEREF _Toc372792748 \h 31
HYPERLINK \l "_Toc372792749" 10.1 Element atom:link PAGEREF _Toc372792749 \h 31
HYPERLINK \l "_Toc372792750" 10.1.1 Attribute rel PAGEREF _Toc372792750 \h 31
HYPERLINK \l "_Toc372792751" 10.1.2 Attribute href PAGEREF _Toc372792751 \h 31
HYPERLINK \l "_Toc372792752" 10.2 Element atom:content PAGEREF _Toc372792752 \h 31
HYPERLINK \l "_Toc372792753" 10.2.1 Attribute src PAGEREF _Toc372792753 \h 31
HYPERLINK \l "_Toc372792754" 10.2.2 Attribute type PAGEREF _Toc372792754 \h 31
HYPERLINK \l "_Toc372792755" 11 Individual Property PAGEREF _Toc372792755 \h 32
HYPERLINK \l "_Toc372792756" 11.1 Single Scalar Value PAGEREF _Toc372792756 \h 32
HYPERLINK \l "_Toc372792757" 11.1.1 Element metadata:value PAGEREF _Toc372792757 \h 32
HYPERLINK \l "_Toc372792758" 11.1.1.1 Attribute metadata:context PAGEREF _Toc372792758 \h 32
HYPERLINK \l "_Toc372792759" 11.1.1.2 Attribute metadata:metadata-etag PAGEREF _Toc372792759 \h 32
HYPERLINK \l "_Toc372792760" 11.1.1.3 Attribute metadata:type PAGEREF _Toc372792760 \h 32
HYPERLINK \l "_Toc372792761" 11.1.1.4 Attribute metadata:null PAGEREF _Toc372792761 \h 33
HYPERLINK \l "_Toc372792762" 11.2 Collection of Scalar Values PAGEREF _Toc372792762 \h 33
HYPERLINK \l "_Toc372792763" 11.2.1 Element metadata:value PAGEREF _Toc372792763 \h 33
HYPERLINK \l "_Toc372792764" 11.2.1.1 Attribute metadata:context PAGEREF _Toc372792764 \h 33
HYPERLINK \l "_Toc372792765" 11.2.1.2 Attribute metadata:metadata-etag PAGEREF _Toc372792765 \h 33
HYPERLINK \l "_Toc372792766" 11.2.1.3 Attribute metadata:type PAGEREF _Toc372792766 \h 34
HYPERLINK \l "_Toc372792767" 11.3 Element atom:link PAGEREF _Toc372792767 \h 34
HYPERLINK \l "_Toc372792768" 11.3.1 Attribute rel PAGEREF _Toc372792768 \h 34
HYPERLINK \l "_Toc372792769" 12 Collection of Entities PAGEREF _Toc372792769 \h 35
HYPERLINK \l "_Toc372792770" 12.1 Element atom:feed PAGEREF _Toc372792770 \h 35
HYPERLINK \l "_Toc372792771" 12.1.1 Attribute metadata:context PAGEREF _Toc372792771 \h 35
HYPERLINK \l "_Toc372792772" 12.1.2 Attribute metadata:metadata-etag PAGEREF _Toc372792772 \h 35
HYPERLINK \l "_Toc372792773" 12.2 Element atom:id PAGEREF _Toc372792773 \h 35
HYPERLINK \l "_Toc372792774" 12.3 Element metadata:count PAGEREF _Toc372792774 \h 35
HYPERLINK \l "_Toc372792775" 12.4 Element atom:link PAGEREF _Toc372792775 \h 35
HYPERLINK \l "_Toc372792776" 12.4.1 Attribute rel PAGEREF _Toc372792776 \h 36
HYPERLINK \l "_Toc372792777" 13 Entity Reference PAGEREF _Toc372792777 \h 37
HYPERLINK \l "_Toc372792778" 13.1 Element metadata:ref PAGEREF _Toc372792778 \h 37
HYPERLINK \l "_Toc372792779" 13.1.1 Attribute metadata:context PAGEREF _Toc372792779 \h 37
HYPERLINK \l "_Toc372792780" 13.1.2 Attribute id PAGEREF _Toc372792780 \h 37
HYPERLINK \l "_Toc372792781" 14 Delta Response PAGEREF _Toc372792781 \h 38
HYPERLINK \l "_Toc372792782" 14.1 Added/Changed Entity PAGEREF _Toc372792782 \h 39
HYPERLINK \l "_Toc372792783" 14.2 Deleted Entity PAGEREF _Toc372792783 \h 39
HYPERLINK \l "_Toc372792784" 14.2.1 Element atom-tombstone:deleted-entry PAGEREF _Toc372792784 \h 39
HYPERLINK \l "_Toc372792785" 14.2.1.1 Attribute ref PAGEREF _Toc372792785 \h 40
HYPERLINK \l "_Toc372792786" 14.2.1.2 Attribute when PAGEREF _Toc372792786 \h 40
HYPERLINK \l "_Toc372792787" 14.2.1.3 Attribute metadata:reason PAGEREF _Toc372792787 \h 40
HYPERLINK \l "_Toc372792788" 14.3 Added Link PAGEREF _Toc372792788 \h 40
HYPERLINK \l "_Toc372792789" 14.3.1 Element metadata:link PAGEREF _Toc372792789 \h 40
HYPERLINK \l "_Toc372792790" 14.3.1.1 Attribute source PAGEREF _Toc372792790 \h 40
HYPERLINK \l "_Toc372792791" 14.3.1.2 Attribute relationship PAGEREF _Toc372792791 \h 40
HYPERLINK \l "_Toc372792792" 14.3.1.3 Attribute target PAGEREF _Toc372792792 \h 40
HYPERLINK \l "_Toc372792793" 14.4 Deleted Link PAGEREF _Toc372792793 \h 40
HYPERLINK \l "_Toc372792794" 14.4.1 Element metadata:deleted-link PAGEREF _Toc372792794 \h 40
HYPERLINK \l "_Toc372792795" 14.4.1.1 Attribute source PAGEREF _Toc372792795 \h 41
HYPERLINK \l "_Toc372792796" 14.4.1.2 Attribute relationship PAGEREF _Toc372792796 \h 41
HYPERLINK \l "_Toc372792797" 14.4.1.3 Attribute target PAGEREF _Toc372792797 \h 41
HYPERLINK \l "_Toc372792798" 15 Bound Function PAGEREF _Toc372792798 \h 42
HYPERLINK \l "_Toc372792799" 15.1 Element metadata:function PAGEREF _Toc372792799 \h 42
HYPERLINK \l "_Toc372792800" 15.1.1 Attribute metadata PAGEREF _Toc372792800 \h 42
HYPERLINK \l "_Toc372792801" 15.1.2 Attribute target PAGEREF _Toc372792801 \h 43
HYPERLINK \l "_Toc372792802" 15.1.3 Attribute title PAGEREF _Toc372792802 \h 43
HYPERLINK \l "_Toc372792803" 16 Bound Action PAGEREF _Toc372792803 \h 44
HYPERLINK \l "_Toc372792804" 16.1 Element metadata:action PAGEREF _Toc372792804 \h 44
HYPERLINK \l "_Toc372792805" 16.1.1 Attribute metadata PAGEREF _Toc372792805 \h 44
HYPERLINK \l "_Toc372792806" 16.1.2 Attribute target PAGEREF _Toc372792806 \h 44
HYPERLINK \l "_Toc372792807" 16.1.3 Attribute title PAGEREF _Toc372792807 \h 44
HYPERLINK \l "_Toc372792808" 17 Action Invocation PAGEREF _Toc372792808 \h 45
HYPERLINK \l "_Toc372792809" 18 Instance Annotations PAGEREF _Toc372792809 \h 46
HYPERLINK \l "_Toc372792810" 18.1 Element metadata:annotation PAGEREF _Toc372792810 \h 46
HYPERLINK \l "_Toc372792811" 18.1.1 Attribute target PAGEREF _Toc372792811 \h 46
HYPERLINK \l "_Toc372792812" 18.1.2 Attribute term PAGEREF _Toc372792812 \h 46
HYPERLINK \l "_Toc372792813" 18.1.3 Attribute metadata:type PAGEREF _Toc372792813 \h 46
HYPERLINK \l "_Toc372792814" 18.1.4 Attribute metadata:null PAGEREF _Toc372792814 \h 46
HYPERLINK \l "_Toc372792815" 18.2 Annotation Value PAGEREF _Toc372792815 \h 46
HYPERLINK \l "_Toc372792816" 18.2.1 Primitive Value PAGEREF _Toc372792816 \h 46
HYPERLINK \l "_Toc372792817" 18.2.2 Collection Value PAGEREF _Toc372792817 \h 47
HYPERLINK \l "_Toc372792818" 18.2.3 Structured Value PAGEREF _Toc372792818 \h 47
HYPERLINK \l "_Toc372792819" 18.3 Instance Annotation Target PAGEREF _Toc372792819 \h 48
HYPERLINK \l "_Toc372792820" 18.3.1 Feed PAGEREF _Toc372792820 \h 48
HYPERLINK \l "_Toc372792821" 18.3.2 Entry PAGEREF _Toc372792821 \h 48
HYPERLINK \l "_Toc372792822" 18.3.3 Entity Reference PAGEREF _Toc372792822 \h 48
HYPERLINK \l "_Toc372792823" 18.3.4 Complex Type PAGEREF _Toc372792823 \h 48
HYPERLINK \l "_Toc372792824" 18.3.5 Property PAGEREF _Toc372792824 \h 48
HYPERLINK \l "_Toc372792825" 18.3.6 Navigation Property PAGEREF _Toc372792825 \h 48
HYPERLINK \l "_Toc372792826" 18.3.7 Function or Action PAGEREF _Toc372792826 \h 49
HYPERLINK \l "_Toc372792827" 18.3.8 Added Link or Deleted Link PAGEREF _Toc372792827 \h 49
HYPERLINK \l "_Toc372792828" 18.3.9 Error PAGEREF _Toc372792828 \h 49
HYPERLINK \l "_Toc372792829" 19 Error Reponse PAGEREF _Toc372792829 \h 50
HYPERLINK \l "_Toc372792830" 19.1 Element metadata:error PAGEREF _Toc372792830 \h 50
HYPERLINK \l "_Toc372792831" 19.2 Element metadata:code PAGEREF _Toc372792831 \h 50
HYPERLINK \l "_Toc372792832" 19.3 Element metadata:message PAGEREF _Toc372792832 \h 50
HYPERLINK \l "_Toc372792833" 19.4 Element metadata:target PAGEREF _Toc372792833 \h 50
HYPERLINK \l "_Toc372792834" 19.5 Element metadata:details PAGEREF _Toc372792834 \h 50
HYPERLINK \l "_Toc372792835" 19.5.1 Element metadata:detail PAGEREF _Toc372792835 \h 51
HYPERLINK \l "_Toc372792836" 19.5.2 Element metadata:code PAGEREF _Toc372792836 \h 51
HYPERLINK \l "_Toc372792837" 19.5.3 Element metadata:message PAGEREF _Toc372792837 \h 51
HYPERLINK \l "_Toc372792838" 19.5.4 Element metadata:target PAGEREF _Toc372792838 \h 51
HYPERLINK \l "_Toc372792839" 19.6 Element metadata:innererror PAGEREF _Toc372792839 \h 51
HYPERLINK \l "_Toc372792840" 20 Extensibility PAGEREF _Toc372792840 \h 52
HYPERLINK \l "_Toc372792841" 21 Security Considerations PAGEREF _Toc372792841 \h 53
HYPERLINK \l "_Toc372792842" 22 Conformance PAGEREF _Toc372792842 \h 54
HYPERLINK \l "_Toc372792843" Appendix A. Acknowledgments PAGEREF _Toc372792843 \h 55
HYPERLINK \l "_Toc372792844" Appendix B. Revision History PAGEREF _Toc372792844 \h 56
Introduction
The OData protocol is comprised of a set of specifications for representing and interacting with structured content. The core specification for the protocol is in REF ODataProtocol \h \* MERGEFORMAT [OData-Protocol]. The OData Atom Format specification extends the former by defining representations for OData requests and responses using an Atom format.
An OData payload may represent:
a HYPERLINK \l "_Service_Document" service document describing the top-level resources exposed by the service
a HYPERLINK \l "_Entity" single entity (a structured type with an identity)
a HYPERLINK \l "_Resource_Reference" resource reference
a HYPERLINK \l "_Collection_of_Entities_1" collection of entities
a HYPERLINK \l "_Single_Scalar_Value" single primitive or complex type value
a HYPERLINK \l "_Collection_of_Scalar" collection of primitive or complex type values
a HYPERLINK \l "_Media_Entity" media resource
a HYPERLINK \l "_Delta_Response_1" collection of changes
a HYPERLINK \l "_Navigation_Link_1" single link to a related entity
a HYPERLINK \l "_Association_Link" collection of links to related entities
an HYPERLINK \l "_Error_Reponse" error document
an xml document describing the entity model exposed by the service
a batch of requests to be executed in a single request
a set of responses returned from a batch request
For a description of the xml format for describing an entity model, see REF ODataCSDL \h [OData-CSDL]. For a description of batch requests and responses, see REF ODataProtocol \h [OData-Protocol] .
Terminology
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in REF rfc2119 \h [RFC2119].
Normative References
This document references the following related documents:
[GML] Portele, C., Ed., "OpenGIS Geography Markup Language (GML) Encoding", August 2007. HYPERLINK "http://portal.opengeospatial.org/files/?artifact_id=20509" http://portal.opengeospatial.org/files/?artifact_id=20509.
[OData-ABNF] OData ABNF Construction Rules Version 4.0. See link in Related work section on cover page.
[OData-CSDL] OData Version 4.0 Part 3: Common Schema Definition Language (CSDL). See link in Related work section on cover page.
[OData-MetaXML] OData Metadata XML Schema.See link in Additional artifacts section on cover page.
[OData-Protocol] OData Version 4.0 Part1: Protocol.See link inRelated work section on cover page.
[OData-URL] OData Version 4.0 Part 2: URL Conventions. See link in "Related work" section on cover page.
[OData-VocCap] OData Capabilities Vocabulary. See link in "Related work" section on cover page.
[RFC2119] Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, BCP 14, RFC 2119, March 1997. HYPERLINK "http://www.ietf.org/rfc/rfc2119.txt" http://www.ietf.org/rfc/rfc2119.txt.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, Uniform Resource Identifier (URI): Generic Syntax, IETF RFC3986, January 2005. HYPERLINK "http://www.ietf.org/rfc/rfc3986.txt" http://www.ietf.org/rfc/rfc3986.txt.
[RFC3987] Duerst, M. and M. Suignard, Internationalized Resource Identifiers (IRIs), RFC3987, January 2005. HYPERLINK "http://www.ietf.org/rfc/rfc3987.txt" http://www.ietf.org/rfc/rfc3987.txt.
[RFC4287] Nottingham, M., Ed., and R. Sayre, Ed. The Atom Syndication Format, RFC4287, December 2005. HYPERLINK "http://www.ietf.org/rfc/rfc4287.txt" http://www.ietf.org/rfc/rfc4287.txt.
[RFC5023] Gregorio, J., Ed., and B. de hOra, Ed., The Atom Publishing Protocol, RFC5023, October 2007. HYPERLINK "http://www.ietf.org/rfc/rfc5023.txt" http://www.ietf.org/rfc/rfc5023.txt.
[RFC5646] Phillips, A., Ed., and M. Davis, Ed., Tags for Identifying Languages, BCP 47, RFC 5646, September 2009. HYPERLINK "http://tools.ietf.org/html/rfc5646" http://tools.ietf.org/html/rfc5646.
[RFC6721] Snell, J., "The Atom 'deleted-entry' Element", RFC 6721, September 2012, HYPERLINK "http://tools.ietf.org/html/rfc6721" http://tools.ietf.org/html/rfc6721.
Typographical Conventions
Keywords defined by this specification use this monospaced font.
Normative source code uses this paragraph style.
Some sections of this specification are illustrated with non-normative examples.
Example SEQ Example \* ARABIC 1: text describing an example uses this paragraph style
Non-normative examples use this paragraph style.
All examples in this document are non-normative and informative only.
All other text is normative unless otherwise labeled.
Atom Format Design
The Atom Syndication Format REF RFC4287 \h [RFC4287] defines an XML-based format for describing feeds made up of individual entries. The Atom Publishing Protocol REF RFC5023 \h [RFC5023] defines an application-level protocol based on HTTP transfer of Atom-formatted representations.
OData builds on REF RFC4287 \h [RFC4287] and REF RFC5023 \h [RFC5023] by defining additional conventions and extensions for representing and querying entity data, e.g. OData collections are represented as Atom feeds, with one Atom entry for each entity within a collection.
As specified in REF RFC4287 \h \* MERGEFORMAT [RFC4287] and REF RFC5023 \h \* MERGEFORMAT [RFC5023] processors that encounter foreign markup MUST NOT stop processing and MUST NOT signal an error. This includes additional elements or attributes in any namespace, including elements and attributes in the OData HYPERLINK \l "_OData_Data" Data HYPERLINK \l "_OData_Data_Namespace" Data and HYPERLINK \l "_OData_Metadata" Metadata HYPERLINK \l "_OData_Metadata_Namespace" Metadata namespaces, e.g. values for properties not declared in $metadata, and HYPERLINK \l "_Instance_Annotations" annotation that are not defined in the version of the payload being returned.
Namespaces
OData defines meaning for elements and attributes defined in the following namespaces.
Atom Syndication
Atom elements and attributes are defined within the Atom namespace, see REF RFC4287 \h [RFC4287]:
http://www.w3.org/2005/Atom
In this specification the namespace prefix atom is used to represent the Atom Namespace, however the prefix name is not prescriptive.
Atom Publishing Protocol
Atom Publishing Protocol (AtomPub) elements and attributes are defined within the AtomPub namespace, see REF RFC5023 \h [RFC5023]:
http://www.w3.org/2007/app
In this specification the namespace prefix app is used to represent the AtomPub Namespace, however the prefix name is not prescriptive.
Atom Tombstone
The deleted-entry element is defined within the Atom Tombstone namespace, see REF RFC6721 \h [RFC6721]:
http://purl.org/atompub/tombstones/1.0
In this specification the namespace prefix atom-tombstone is used to represent the Atom Tombstone Namespace, however the prefix name is not prescriptive.
OData Data
Elements that describe the actual data values for an entity are qualified with the OData Data Namespace:
http://docs.oasis-open.org/odata/ns/data
In this specification the namespace prefix data is used to represent the OData Data Namespace, however the prefix name is not prescriptive.
OData Metadata
Attributes and elements that represent metadata (such as type, null usage, and entry-level etags) are defined within the OData Metadata Namespace:
http://docs.oasis-open.org/odata/ns/metadata
Custom elements or attributes MUST NOT use this namespace.
In this specification the namespace prefix metadata is used to represent the OData Metadata Namespace, however the prefix name is not prescriptive.
XML Schema Definition for OData Metadata
This specification contains a normative XML schema for the HYPERLINK \l "ODataMetadataNamespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, see REF ODataMetaXML \h [OData-MetaXML].
It only defines the shape of well-formed OData metadata, but is not descriptive enough to define what correct OData metadata is. This specification document defines additional rules that correct OData metadata MUST fulfill. In case of doubt on what makes OData metadata correct the rules defined in this specification document take precedence.
Requesting the Atom Format
The OData Atom format MAY be requested using the $format query option in the request URL with the MIME type application/atom+xml, or the case-insensitive abbreviation atom which MUST NOT be followed by format parameters.
Alternatively, this format MAY be requested using the Accept header with the MIME type application/atom+xml.
If specified, $format overrides any value specified in the Accept header.
The HYPERLINK \l "_Service_Document" service document MAY additionally be requested with the more specific MIME type application/atomsvc+xml using either $format or Accept.
All resources MAY additionally be requested with the less specific MIME type application/xml using either $format or Accept, or the case-insensitive abbreviation xml using $format.
Services SHOULD advertise the supported MIME types by annotating their entity container with the term Capabilities.SupportedFormats defined in REF VocCapabilities \h [OData-VocCap].
Common Characteristics
Header Content-Type
The Content-Type header for Atom responses MUST use the most specific MIME type for the requested resource that is indicated as acceptable by the client.
Requests using the $format query option with the abbreviation atom MUST receive the MIME type
application/atomsvc+xml for the HYPERLINK \l "_Service_Document" service document,
application/atom+xml for entities and collections of entities, references, or changes,
application/xml for all other resources.
Requests using $format or an Accept header with value application/atom+xml MUST receive the MIME type
application/xml for the HYPERLINK \l "_Service_Document" service document,
application/atom+xml for entities and collections of entities, references, or changes,
application/xml for all other resources.
Requests using $format or an Accept header with value application/xml or $format with the abbreviation xml MUST receive the MIME type application/xml for all resources.
Data modification requests for entities or collections of entities MUST specify a Content-Type header with a value of either application/atom+xml or application/xml. Data modification requests for all other resources MUST specify a Content-Type header with a value of application/xml.
Message Body
Each message body MUST be represented as an XML document with a single root element. This element is either the representation of an HYPERLINK \l "_Entity" entity, an HYPERLINK \l "_Resource_Reference" entity reference, a HYPERLINK \l "_Single_Scalar_Value" primitive value, a HYPERLINK \l "_Single_Scalar_Value" complex type instance, a HYPERLINK \l "_Collection_of_Scalar" collection of primitive values, a HYPERLINK \l "_Collection_of_Scalar" collection of complex values, a HYPERLINK \l "_Collection_of_Entities_1" collection of entities, or a collection of items that represent HYPERLINK \l "_Delta_Response" changes to a previous result.
Client libraries MUST retain the order of XML elements in document order for ATOM and XML responses.
OData does not impose any ordering constraints on XML attributes within XML elements.
Relative URLs
OData payloads MAY use relative references as defined in HYPERLINK \l "RFC3986" REF RFC3986 \h [RFC3986] by specifying the xml:base attribute to define a base URL for relative references defined within the scope of the element containing the xml:base attribute.
If no xml:base attribute is present in the context of a relative reference, relative URLs are relative to the request URL. This also applies to relative URLs in the xml:base attribute.
Clients that receive relative URLs in response payloads SHOULD use the same relative URLs, where appropriate, in request payloads (such as HYPERLINK \l "_Bind_Operation" bind operations and batch requests) and in system query options (such as $id).
Service Document
AtomPub defines the concept of a service document to represent the set of available collections. OData uses the service document to describe the entity sets, singletons, and parameterless function imports published by the service.
Example SEQ Example \* ARABIC 2:
DataOrdersOrder DetailsBest-Selling ProductsContoso Ltd.Human Resources
Element app:service
The root of a service document is a single app:service element. The app:service element MUST contain exactly one HYPERLINK \l "appWorkspace" app:workspace elements.
Attribute metadata:context
An app:service element MUST have a metadata:context attribute, defined in the HYPERLINK \l "_OData_Metadata_Namespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the URL that returns the metadata document of the service.
For more information on the format of the metadata document, see REF ODataCSDL \h [OData-CSDL].
Attribute metadata:metadata-etag
An app:service element MAY have a metadata:metadata-etag attribute to specify an ETag that can be used to determine the current version of the service's metadata document.
For details on how ETags are used, see REF ODataProtocol \h [OData-Protocol].
Element app:workspace
OData represents the entity container of a service (see REF ODataCSDL \h \* MERGEFORMAT [OData-CSDL]) as an app:workspace element. An app:workspace element contains zero or more HYPERLINK \l "appCollection" app:collection elements, one for each entity set published by the container, zero or more HYPERLINK \l "_Element_metadata:function-import" metadata:function-import elements, one for each function import published by the container, zero or more HYPERLINK \l "_Element_metadata:entity" metadata:singleton elements, one for each singleton published by the container, and zero or more HYPERLINK \l "_Element_metadata:service-document" metadata:service-document elements, one for each related service document.
As defined in HYPERLINK \l "RFC5023" [RFC-5023], the app:workspace element MUST contain an atom:title element containing the human-readable description of the workspace. This value may be different from the name of the entity container.
Element app:collection
OData represents entity sets that are not marked with IncludeInServiceDocument="false" (see REF ODataCSDL \h \* MERGEFORMAT [OData-CSDL]) as app:collection elements contained within the HYPERLINK \l "appWorkspace" app:workspace element.
Example SEQ Example \* ARABIC 3:
Order Details
Attribute href
The app:collection element MUST contain an href attribute which represents a URL that can be used to retrieve the members of the entity set.
Attribute metadata:name
The metadata:name attribute MUST contain the name of the entity set.
It MAY be omitted if its value is identical the the value of the href attribute, which is the case if the service uses HYPERLINK \l "_Relative_URLs" relative URLs following the OData URL conventions described in REF ODataURL \h [OData-URL].
Element atom:title
As defined in HYPERLINK \l "RFC5023" [RFC-5023], the HYPERLINK \l "appCollection" app:collection element MUST contain an atom:title element. The atom:title element SHOULD contain a human-readable description of the entity set which MAY be the name of the entity set.
Element metadata:function-import
OData represents function imports that are marked with IncludeInServiceDocument="true" (see REF ODataCSDL \h [OData-CSDL]) as metadata:function-import elements contained within the HYPERLINK \l "appWorkspace" app:workspace element.
Attribute href
The metadata:function-import element MUST contain an href attribute which represents a URL that can be used to retrieve the function import result.
Attribute metadata:name
The metadata:name attribute MUST contain the name of the function import.
It MAY be omitted if its value is identical the the value of the href attribute, which is the case if the service uses HYPERLINK \l "_Relative_URLs" relative URLs following the OData URL conventions described in REF ODataURL \h [OData-URL].
Element atom:title
The HYPERLINK \l "_Function_Imports_as" metadata:function-import element MUST contain an atom:title element. The atom:title element SHOULD contain a human-readable description of the function import which MAY be the name of the function import.
Element metadata:singleton
OData represents singletons as metadata:singleton elements contained within the HYPERLINK \l "appWorkspace" app:workspace element.
Attribute href
The metadata:singleton element MUST contain an href attribute which represents a URL that can be used to retrieve the singleton.
Attribute metadata:name
If the href attribute of a metadata:singleton element contains a HYPERLINK \l "_Relative_URLs" relative URL that follows the conventions described in REF ODataURL \h [OData-URL], the metadata:name attribute can be ommited. Otherwise the metadata:name attribute MUST be specified and MUST contain the name of the singleton.
Element atom:title
The metadata:singleton element MUST contain an atom:title element. The atom:title element SHOULD contain a human-readable description of the singleton which MAY be the name of the singleton.
Element metadata:service-document
OData represents related service documents as metadata:service-document elements contained within the HYPERLINK \l "appWorkspace" app:workspace element.
Example SEQ Example \* ARABIC 4:
Human Resources
Attribute href
The metadata:service-document element MUST contain an href attribute which represents a URL that can be used to retrieve the related service document.
Element atom:title
The metadata:service-document element MUST contain an atom:title element. The atom:title element SHOULD contain a human-readable description of the related service document.
Entity
Entities, whether individual or within an Atom feed, are represented as HYPERLINK \l "atomEntry" atom:entry elements.
Example SEQ Example \* ARABIC 5:
http://host/service/$metadata#Customers('ALFKI')2012-03-30T07:11:05ZALFKIAlfreds FutterkisteMaria AndersSales Representative030-0074321030-0076545Obere Str. 57BerlinD-12209
This section defines the elements and attributes within an atom:entry element that are assigned meaning in OData.
Element atom:entry
An atom:entry element is used to represent a single OData entity, which is an instance of a structured type with an identity.
Attribute metadata:etag
The atom:entry element MAY contain a metadata:etag attribute, representing an opaque string value that can be used in a subsequent request to determine if the value of the entity has changed. For details on how ETags are used, see to REF ODataProtocol \h [OData-Protocol].
Attribute metadata:context
If the root of the response is an HYPERLINK \l "_Element_atom:entry" atom:entry element, or the entity set cannot be determined from the HYPERLINK \l "_Attribute_metadata:metadata_1" context URL of the feed, the atom:entry element MUST have a metadata:context attribute, defined in the HYPERLINK \l "_OData_Metadata_Namespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the context URL that describes the entity represented by the atom:entry.
For more information on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:metadata-etag
If the root of the response is an atom:entry element, it MAY have a metadata:metadata-etag attribute to specify an ETag that can be used to determine the current version of the service's metadata document.
For details on how ETags are used, see REF ODataProtocol \h [OData-Protocol].
Element atom:id
The atom:id element MUST contain the entity-id; see REF ODataProtocol \h [OData-Protocol]. By convention the entity-id is identical to the canonical URL of the entity, as defined in REF ODataURL \h [OData-URL].
If the entity is transient (i.e. cannot be read or updated), the atom:id SHOULD follow the pattern odata:transient:{some-generated-unique-identifier-to-not-break-atom-parsers}.
Clients MAY assume that an entity with an atom:id that matches the transient pattern cannot be compared to other entities, reread, or updated.
Element atom:category
An OData entry MUST contain a single atom:category element with a scheme attribute equal to
http://docs.oasis-open.org/odata/ns/scheme
to identify the entity type of the entry.
An atom:category element describing an OData entity type MUST have a term attribute whose value is a URI indicating the type of the entity. The URI may be an absolute or HYPERLINK \l "_Relative_URLs" relative URL containing the namespace-qualified or alias-qualified type name as a fragment, or may simply contain the qualified type name prefixed with hash (#). In the latter case, the type MUST be defined or referenced in the metadata document defined by the current context URL.
Example SEQ Example \* ARABIC 6: entity of type Model.VipCustomer defined in the metadata document of the same service
Example SEQ Example \* ARABIC 7: entity of type Model.VipCustomer defined in the metadata document of a different service
For more information on namespace-qualified and alias-qualified names, see REF ODataCSDL \h [OData-CSDL].
The entry MAY contain additional atom:category elements with different scheme values; such atom:category elements have no semantic meaning in OData.
Element atom:link
Atom defines two types of links within an entry that represent retrieve or update/delete operations on the entry:
atom:link elements with a rel attribute of self can be used to retrieve the entity (via the URL specified in the href attribute).
atom:link elements with a rel attribute of edit can be used to retrieve, update, or delete the entity (via the URL specified in the href attribute).
An HYPERLINK \l "_Element_atom:entry" atom:entry element representing an OData entity MUST contain an edit link if and only if the entity is updatable. It MUST contain a self link if and only if the entity is read-only or the read link is different from the edit link. Transient entities contain neither a self link nor an edit link.
Clients MAY use the edit link to retrieve the entity if no self link is present. They SHOULD NOT attempt to update an entity that does not contain an edit link.
Element atom:content
The atom:content element contains the properties of the entity as a HYPERLINK \l "metadataProperties" metadata:properties element unless the entity is a HYPERLINK \l "_Media_Entity" media entity.
Structural Property
Primitive Value
OData Atom and XML payloads represent values of primitive types following the rules of REF ODataABNF \h [OData-ABNF].
Geography and Geometry values are represented as defined in REF GML \h [GML].
Strings are represented according to the XML escaping rules for character data.
Values of the other primitive types are represented according to the appropriate alternative in the primitiveValue rule of REF ODataABNF \h [OData-ABNF], i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.
Example SEQ Example \* ARABIC 8:
truefalseT0RhdGE-128
3.1415926535897931INF34.95Say "Hello",then go!2012-12-032012-12-03T07:16:23ZP12DT23H59M59.999999999999S07:59:59.99901234567-89ab-cdef-0123-456789abcdef0Yellow64.1 142.1
Note that the line break in the body of StringValue is intentional, it represents a line break.
Element metadata:properties
The metadata:properties element represents property values for an entity.
Element data:[PropertyName]
Within the metadata:properties element, individual entity properties are represented as elements where the name of the element is the name of the entity property within the HYPERLINK \l "ODataDataNamespace" OData Data Namespace.
The data:[PropertyName] element MUST include a HYPERLINK \l "_Attribute_metadata:type" metadata:type attribute to specify the type of a primitive property whose type is not Edm.String or the type of a complex property whose type is derived from the type specified in the metadata document.
Example SEQ Example \* ARABIC 9:
4
The data:[PropertyName] element MUST be empty and MUST include a HYPERLINK \l "_Attribute_metadata:null" metadata:null attribute if the primitive- or complex-typed instance has the null value.
Example SEQ Example \* ARABIC 10:
Attribute metadata:type
If the type of the property is anything other than Edm.String, the property representation MUST contain a metadata:type attribute to specify the URI that identifies the type of the property.
For built-in primitive types the value is the unqualified name of the primitive type.
For non-built in primitive types, the URI may be an absolute or HYPERLINK \l "_Relative_URLs" relative URL containing the namespace-qualified or alias-qualified type name as a fragment, or may simply contain the qualified type name prefixed with hash (#). In the latter case, the type MUST be defined or referenced in the metadata document defined by the current context URL. For properties that represent a collection of values, the fragment is the namespace-qualified or alias-qualified type name prefixed with Collection and enclosed in parentheses.
Example SEQ Example \* ARABIC 11:
25
Attribute metadata:null
Null-valued properties are represented as empty elements with the metadata:null="true" attribute.
The metadata:null attribute distinguishes null values from other empty content (such as an empty string).
Example SEQ Example \* ARABIC 12:
The absence of the metadata:null attribute is equivalent to specifying metadata:null="false".
Primitive and Enumeration Property
For primitive properties, the content of the HYPERLINK \l "_Element_data:[PropertyName]" data:[PropertyName] element represents the value of the property following the syntax for HYPERLINK \l "_Primitive_Value" primitive values.
Example SEQ Example \* ARABIC 13: string value
CEO
Example SEQ Example \* ARABIC 14: enumeration value
Solid,Yellow
Complex Property
For complex properties, the content of the HYPERLINK \l "_Element_data:[PropertyName]" data:[PropertyName] element consists of nested data:[PropertyName] elements describing the properties of the complex type.
Example SEQ Example \* ARABIC 15:
Obere Str. 57BerlinD-12209
Primitive and Enumeration Property Collection
For properties that represent a collection of primitive or enumeration values, the URI fragment specified in the HYPERLINK \l "_Attribute_metadata:type" metadata:type attribute is the namespace-qualified or alias-qualified element type prefixed with Collection and enclosed in parenthesis.
Element metadata:element
Each item in the collection is represented as a metadata:element element in the HYPERLINK \l "_OData_Metadata_Namespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace.
The value of each metadata:element in the collection follows the syntax for HYPERLINK \l "_Primitive_Value" primitive values.
An empty metadata:element element with the metadata:null="true" attribute value represents a null value within the collection.
Example SEQ Example \* ARABIC 16:
Julie@Swansworth.comJulie.Swansworth@work.com
Complex Property Collection
For properties that represent a collection of complex types, the URI fragment specified in the HYPERLINK \l "_Attribute_metadata:type" metadata:type attribute is the namespace-qualified or alias-qualified element type prefixed with "Collection" and enclosed in parenthesis..
Element metadata:element
Each item in the collection is represented as a metadata:element element in the HYPERLINK \l "_OData_Metadata_Namespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace.
The value of each complex-typed metadata:element follows the syntax for HYPERLINK \l "_Complex_Property" complex-typed properties.
An empty metadata:element element with the metadata:null="true" attribute value represents a null value within the collection.
Attribute metadata:type
A metadata:element element MAY include a HYPERLINK \l "_Attribute_metadata:type" metadata:type attribute to specify the complex type of the represented instance. It MUST include a metadata:type attribute if the instance is of a type derived from the declared type of the property.
Example SEQ Example \* ARABIC 17:
425-555-1212Home425-555-0178CellSprint
Navigation Property
A navigation property is a reference to zero or more related entities. It is represented as a navigation link that MAY be immediately preceded by an association link.
Navigation Link
The navigation link is a URL that allows retrieving the related entity or collection of entities. It is represented as an atom:link element.
Example SEQ Example \* ARABIC 18: products related to a category
The related data for the relationship MAY be included in the entity using a single child HYPERLINK \l "_Expanded_Navigation_Property_1" metadata:inline element.
Element atom:link
In the case where the atom:link element describes a navigation link the attributes rel, href, type, metadata:context, and title MUST be used as described in the following subsections.
Attribute rel
The rel attribute MUST be present and MUST contain the string
http://docs.oasis-open.org/odata/ns/related/
followed by the name of the navigation property on the entity.
Note that the full name must be used; the use of relative URLs in the rel attribute is not allowed.
Attribute href
The href attribute MUST be present and specifies the URL that can be used to retrieve the related entities. This URL may be HYPERLINK \l "_Relative_URLs" relative or absolute.
For navigation properties declared by an entity type the URL should be the canonical URL for the navigation property, i.e. the canonical URL of the source entity followed by a forward slash and the name of the navigation property, see REF _Ref357171696 \h Example 18.
For navigation properties declared by a complex type that is used as a single value in an entity type, the URL should be the canonical URL of the source entity, followed by a forward slash and the path to the navigation property, see second atom:link in REF _Ref357173514 \h Example 5.
For navigation properties declared by a complex type that is used in a collection of complex type values, the URL should be the canonical URL of the target entity.
Example SEQ Example \* ARABIC 19: country related to an address within a collection
...
...
...
Attribute type
The type attribute MUST be present and determines whether the cardinality of the related end is a single entity or a collection of entities. The value "application/atom+xml;type=entry" represents a single entity and the value "application/atom+xml;type=feed" an collection of entities.
Attribute metadata:context
The metadata:context attribute MUST be present if the navigation property is not defined in metadata. The value of the metadata:context attribute, defined in the HYPERLINK \l "ODataMetadataNamespace" HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, specifies the context URL that describes the type of the related entity or entities.
For details on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute title
The title attribute SHOULD be present and equal to the name of the navigation property, and provides human-readable, possibly language-dependent, and not necessarily unique information about the link.
Association Link
The association link is a URL that allows retrieving the reference or collection of references to the related entity or entities. It is represented as an atom:link element. If the URL follows conventions, i.e. is the navigation link with /$ref appended, the association link MAY be omitted.
Example SEQ Example \* ARABIC 20: products related to a category
Element atom:link
A collection of relationship links is represented by an atom:link element. The attributes rel, href, type, and title MUST be used as described in the following subsections.
Attribute rel
The rel attribute MUST be present. The value MUST contain the string
http://docs.oasis-open.org/odata/ns/relatedlinks/
followed by the name of the navigation property of the entity.
Note that the full name must be used; the use of relative URLs in the rel attribute is not allowed.
Attribute href
The href attribute MUST be present and MUST specify the URL that represents the collection of relationship links. This URL may be relative or absolute.
Attribute type
The type attribute MUST be present with the string "application/xml" as value.
Attribute title
The title attribute SHOULD be present and be set to the name of the navigation property. The title attribute provides human-readable, possibly language-dependent, and not necessarily unique information about the link.
Expanded Navigation Property
An expanded navigation property MUST be represented as a single metadata:inline child element of the atom:link element representing the HYPERLINK \l "_Navigation_Link_1" navigation link. The value of the metadata:inline element MUST be the correct representation of the related entity or collection of entities.
It is valid to include the metadata:inline element in only a subset of the entries within a feed.
If at most one entity can be related, the value is the representation of the related entity, or the metadata:inline element is empty if no entity is currently related.
If a collection of entities can be related, it MUST be represented as an HYPERLINK \l "_Element_atom:feed" atom:feed. An empty collection of entities (one that contains no entity type instances) MUST be represented as an empty atom:feed.
Each entity MUST be HYPERLINK \l "_Representing_an_Entity_1" represented as an HYPERLINK \l "_Element_atom:entry" atom:entry element or as HYPERLINK \l "_Resource_Reference" an entity reference.
Example SEQ Example \* ARABIC 21:
...
Deep Insert
When inserting a new entity with a POST request, related new entities MAY be specified using the same representation as for an HYPERLINK \l "_Expanded_Navigation_Property_1" expanded navigation property.
Deep inserts are not allowed in update operations using PUT or PATCH requests.
Example SEQ Example \* ARABIC 22: inserting a new order for a new customer with order items related to existing products
...
...
ANEWONE
...
...
...
...
...
...
11643
...
Bind Operation
When inserting or updating an entity, relationships of navigation properties MAY be inserted or updated via bind operations.
If at most one entity can be related, the bind operation MUST be represented as a navigation link whose href attribute MUST contain the HYPERLINK \l "_Element_atom:id" id of the entity to be related.
For update operations a bind operation on a collection navigation property MUST be represented as a navigation link with an inlined collection of entity references. The referenced entities are added as additional related entities, and existing relationships are not updated or deleted.
For insert operations collection navigation property bind operations and deep insert operations MAY be combined by inlining an HYPERLINK \l "_Element_atom:feed" atom:feed that contains HYPERLINK \l "_Element_atom:entry" atom:entry elements and HYPERLINK \l "_Element_metadata:ref" metadata:ref elements.
Example SEQ Example \* ARABIC 23: assign a product to an existing category
Stream Property
Element atom:link
An entity or complex type instance MAY have one or more stream properties (for example, a photo property of an employee entity). Properties that represent streams have a type of Edm.Stream.
OData uses the atom:link element to represent a stream property.
Example SEQ Example \* ARABIC 24: read link of stream property Thumbnail
Example SEQ Example \* ARABIC 25: edit link of stream property Thumbnail
The attributes rel, href, type, metadata:etag, and title are to be used as described in the following subsections.
Attribute rel
The rel attribute MUST be present and MUST be made up of the string http://docs.oasis-open.org/odata/ns/mediaresource/, followed by the name of the stream property on the entity.
The rel attribute for an HYPERLINK \l "atomLink" atom:link element that can be used to change a stream property value is made up of the string http://docs.oasis-open.org/odata/ns/edit-media/, followed by the name of the stream property on the entity.
In both cases the full name must be used; the use of relative URLs in the rel attribute is not allowed.
Attribute href
The href attribute MUST be present and MUST contain the URL that can be used to read, or write, the stream, according to the rel attribute. This URL may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Attribute type
The type attribute MAY be present and specifies the MIME-type of the stream.
Attribute metadata:etag
The metadata:etag attribute MAY be present and specifies an etag value that can be used in an if-match header to conditionally write to the stream property as described in REF ODataProtocol \h [OData-Protocol].
Attribute title
The title attribute MAY be present and provides human-readable, possibly language-dependent, and not necessarily unique information about the link.
Media Entity
Media entities (in AtomPub: media link entries, see REF RFC5023 \h [RFC5023]) are entities that describe and link to a media resource.
Example SEQ Example \* ARABIC 26:
http://host/service/Employees(6)
...
6
...
Element atom:link
A media entity MAY contain an atom:link element with a rel attribute of "edit-media" to specify a URL that can be used to write to the BLOB associated with the entity. The attributes rel and href MUST be used as described in the following subsections.
Attribute rel
The rel attribute MUST be present and MUST have the string edit-media as value.
Attribute href
The href MUST be present and its value MUST specify the URL that can be used to write the stream. This URL may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Element atom:content
For media entities the atom:content element MUST be empty. Properties of the media entity are represented by the HYPERLINK \l "metadataProperties" metadata:properties element as a sibling to, rather than a child of, the atom:content element.
Attribute src
The atom:content element MUST contain a src attribute and the value of the src attribute MUST be a URL that can be used to retrieve the content of the media resource.
Attribute type
The atom:content element MUST specify a type attribute that SHOULD contain the MIME type of the media resource.
Individual Property
A valid OData payload may consist of a single primitive or complex value, or of a collection of these.
A single-valued property that has the null value does not have a representation, see REF ODataProtocol \h [OData-Protocol].
Single Scalar Value
Example SEQ Example \* ARABIC 27: string value
CEO
Example SEQ Example \* ARABIC 28: primitive null value:
Example SEQ Example \* ARABIC 29: complex value
Obere Str. 57BerlinD-12209
Element metadata:value
Single scalar values are represented as a metadata:value root element that contains the representation of the scalar value. The attributes metadata:type and metadata:null MUST be used as described in the following subsections.
Attribute metadata:context
The metadata:value element MUST have a metadata:context attribute, defined in the HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the context URL that describes the element.
For more information on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:metadata-etag
The metadata:value element MAY have a metadata:metadata-etag attribute to specify an ETag for the service's metadata document. It can be used to determine whether the client's cached copy of the metadata document is outdated.
For details on how ETags are used, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:type
If the type of the scalar value being specified is anything other than Edm.String the metadata:type attribute MUST be present and specify the namespace - or alias - qualified type of the value.
Attribute metadata:null
The metadata:null attribute distinguishes null values from other empty content (such as an empty string).
Null-values are represented as an empty metadata:value element with a metadata:null="true" attribute.
Collection of Scalar Values
A valid OData payload MAY consist of a collection of primitive or complex properties.
Example SEQ Example \* ARABIC 30: collection of strings
(203)555-1718(203)555-1719
Example SEQ Example \* ARABIC 31: collection of complex values
Obere Str. 57BerlinD-1220912345 Grant StreetTaftOhioOH 98052
Element metadata:value
A collection of scalar values is represented as a metadata:value root element that contains a metadata:element child element for each item of the collection whose content is an individual primitive or complex value as defined above.
The metadata:value element MUST NOT contain a metadata:null attribute. The attribute metadata:type MUST be used as described in the following subsection.
Attribute metadata:context
The metadata:value element MUST have a metadata:context attribute, defined in the HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the context URL that describes the element.
For more information on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:metadata-etag
The metadata:value element MAY have a metadata:metadata-etag attribute to specify an ETag for the service's metadata document. It can be used to determine whether the client's cached copy of the metadata document is outdated.
For details on how ETags are used, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:type
The attribute metadata:type MUST be present and specify the collection type according to the rules described in section REF _Ref359580461 \r \h 7.3.1.
For collections of complex scalar values this attribute specifies a collection type for the base type of the collection. Individual elements of a derived type MUST specify their derived type with a metadata:type attribute on the metadata:element element.
Element atom:link
The metadata:value element MAY contain a next link to indicate the presence of additional items that belong to the collection.
Attribute rel
A next link is represented as an atom:link with a rel="next" attribute and an href attribute containing a URL that can be used to retrieve the next set of results.
Example SEQ Example \* ARABIC 33: next link
The contents of the href attribute SHOULD be treated as an opaque URL that can be used to fetch the next set of results and should not be modified other than resolving a relative URL.
Collection of Entities
Collections of entities are represented in Atom as an HYPERLINK \l "_Element_atom:feed" atom:feed element.
Element atom:feed
Collections of entities are represented using an atom:feed Element, where each entity is represented as an HYPERLINK \l "_Element_atom:entry" atom:entry or HYPERLINK \l "_Entity_References_as" metadata:ref element.
Attribute metadata:context
If the root of the response is an atom:feed element, it MUST have a metadata:context attribute, defined in the HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the context URL that describes the entity set represented by the feed.
For more information on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute metadata:metadata-etag
The metadata:metadata-etag attribute MAY appear in an atom:feed in order to specify an ETag that can be used to determine the current version of the service's metadata document.
For details on how ETags are used, see REF ODataProtocol \h [OData-Protocol].
Element atom:id
The atom:id element MUST uniquely identify the collection from which the feed was generated.
Element metadata:count
The atom:feed element MAY contain a metadata:count element to specify the total count of entities in the result to the request. This MAY be greater than the number of entries in the feed, if server-side paging has been applied, in which case the feed MUST include a HYPERLINK \l "nextLink" next results link.
Example SEQ Example \* ARABIC 32:
42
...
Element atom:link
The HYPERLINK \l "_Element_atom:feed" atom:feed element MAY contain a self link to allow reread the feed.
The atom:feed element MAY contain a next link to indicate the presence of additional entities that belong to the collection.
The atom:feed element representing the final page of results MAY contain a delta link that can be used to fetch subsequent changes (deltas) to the result.
All three cases are distinguished from another by the value of the rel attribute as described in the following subsection.
In a valid OData Atom response Payload the atom:link element representing a next link or a delta link MAY be positioned after the last HYPERLINK \l "_Element_atom:entry" atom:entry or HYPERLINK \l "_Entity_References_as" metadata:ref element. This defines an exception to the Atom Specification REF RFC4287 \h [RFC4287].
Attribute rel
A self link is represented as an atom:link with a rel="self" attribute. The href attribute MUST contain the request URL that produced this collection.
A next link is represented as an atom:link with a rel="next" attribute and an href attribute containing a URL that can be used to retrieve the next set of results.
Example SEQ Example \* ARABIC 33: next link
The contents of the href attribute SHOULD be treated as an opaque URL that can be used to fetch the next set of results.
A delta link is represented as an atom:link element with a rel attribute of " http://docs.oasis-open.org/odata/ns/delta" and an href attribute containing a URL that can be used to retrieve subsequent changes.
Example SEQ Example \* ARABIC 34: delta link
The contents of the href should be treated as an opaque URL that can be used to fetch subsequent changes.
The delta link MUST only appear on the last page of results. A page of results MUST NOT have both a delta link and a next link.
Entity Reference
An entity reference (see REF ODataProtocol \h [OData-Protocol]) MAY take the place of an HYPERLINK \l "_Entity" entity in an Atom payload, based on the client request. The id may be absolute or HYPERLINK \l "_Relative_URLs" relative.
Example SEQ Example \* ARABIC 35: entity reference to order 10643
Example SEQ Example \* ARABIC 36: collection of entity references
Element metadata:ref
A reference to an entity or one of its properties is represented in Atom using a metadata:ref element.
Attribute metadata:context
If the metadata:ref element is the root element of a response, it MUST have a metadata:context attribute, defined in the HYPERLINK \l "ODataMetadataNamespace" OData Metadata namespace, whose value is the context URL that describes the reference. If it is part of an Atom feed, the attribute is optional.
For more information on the context URL, see REF ODataProtocol \h [OData-Protocol].
Attribute id
The id attribute MUST be present. For entities the id attribute MUST be the HYPERLINK \l "_Element_atom:id" atom:id of the referenced entity. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Delta Response
The non-format specific aspects of the delta handling are described in the section Requesting Changes in REF ODataProtocol \h [OData-Protocol].
Responses from a delta request are returned as an HYPERLINK \l "_Collection_of_Entities" HYPERLINK \l "_Element_atom:feed" atom:feed. The feed MUST contain all HYPERLINK \l "_Changed/Added_Entities_as" added, HYPERLINK \l "_Changed/Added_Entities_as" changed, or HYPERLINK \l "_Deleted_entities_as_1" deleted entities, as well as HYPERLINK \l "_Added_Link" added or HYPERLINK \l "_Deleted_Links_as" deleted links between entities, and MAY contain additional, unchanged entities.
All added, changed, or deleted entities and links, including related entities, are returned as direct children of the HYPERLINK \l "_Collection_of_Entities" HYPERLINK \l "_Element_atom:feed" atom:feed element.
Entities that are not part of the entity set specified by the HYPERLINK \l "_Attribute_metadata:metadata_1" metadata:context attribute in the atom:feed element MUST include a metadata:context attribute in the atom:entry element to specify the entity set of the related entity.
If the delta response contains a partial list of changes, it MUST include a HYPERLINK \l "nextLink" next link for the client to retrieve the next set of changes.
The last page of a delta response SHOULD contain a HYPERLINK \l "_Delta_Link_as" delta link for retrieving subsequent changes once the current set of changes has been applied to the initial set.
If the response from the delta link contains a HYPERLINK \l "_Element_metadata:count" metadata:count element, the returned number MUST include all added, changed, or deleted entities, as well as added or deleted links.
Example SEQ Example \* ARABIC 37: delta response with five changes, in order of occurrence
ContactName for customer 'BOTTM' was changed to "Susan Halvenstern"
Order 10643 was removed from customer 'ALFKI'
Order 10645 was added to customer 'BOTTM'
The shipping information for order 10643 was updated
Customer 'ANTON' was deleted
Customershttp://host/service/Customers2012-11-27T15:38:25Z5http://host/service/Customers('BOTTM')2012-11-17T15:38:22ZSusan Halvensternhttp://host/service/Orders(10643)2012-11-27T15:38:24Z23 Tsawassen Blvd.TsawassenBCT2F 8M4
Added/Changed Entity
Added or changed entities within a delta response are represented as HYPERLINK \l "_Element_atom:entry" atom:entry elements.
Added or changed entities MUST NOT include HYPERLINK \l "_Expanded_Navigation_Property" inline content.
Added entities MUST include all selected properties and MAY include additional, unselected properties. Collection-valued properties are treated as atomic values; any collection-valued properties returned from a delta request MUST contain all current values for that collection.
Added entities MUST include HYPERLINK \l "_Navigation_Link" navigation links.
Changed entities MUST include all selected properties that have changed and MAY include additional properties.
Entities whose set cannot be determined from the context URL of the feed MUST include the HYPERLINK \l "_Attribute_metadata:metadata" metadata:context attribute in the HYPERLINK \l "_Element_atom:entry" atom:entry element to specify the set that the entity belongs to.
Deleted Entity
Element atom-tombstone:deleted-entry
A deleted entity within a delta response is represented as an atom-tombstone:deleted-entry element, defined within the HYPERLINK \l "_Atom_Tombstone_Namespace" Atom Tombstone namespace, as defined in HYPERLINK \l "RFC6721" [RFC6721].
The ref and a when attribute MUST be present, the metadata:reason attribute MAY be present. All attributes have to be used as described in the following subsection.
Attribute ref
As defined in HYPERLINK \l "RFC6721" [RFC6721], the ref attribute MUST be present. The value of the ref attribute MUST specify the HYPERLINK \l "_Element_atom:id" atom:id of the deleted entry. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Attribute when
As defined in HYPERLINK \l "RFC6721" [RFC6721], the when attribute MUST be present to specify the time at which the entity was deleted. This attribute is not used in OData and MAY be set to the time the delta response was generated if the service does not track when deletions occur. OData clients MUST NOT assume any semantics around this value.
Attribute metadata:reason
The metadata:reason attribute MAY be present. The value of the metadata:reason attribute MUST specify the string value "deleted", if the entity was deleted (destroyed), or "changed" if the entity was removed from membership in the result (i.e., due to a data change).
Added Link
Element metadata:link
A link within a delta response is represented by a metadata:link element.
A delta response MUST contain a metadata:link for each added link that corresponds to a $expand path in the initial request.
The source, relationship, and target attribute MUST be present. All attributes have to be used as described in the following subsection.
Attribute source
The source attribute MUST be present and specify the HYPERLINK \l "_Element_atom:id" atom:id of the entity from which the link originates. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Attribute relationship
The relationship MUST be present and specify the name of the navigation property on the source entity for which the link exists.
Attribute target
The target attribute MUST be present and specify the HYPERLINK \l "_Element_atom:id" atom:id of the related entity. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Deleted Link
Element metadata:deleted-link
A deleted link within a delta response is represented as a metadata:deleted-link element.
Delta responses MUST contain a metadata:deleted-link for each deleted link that corresponds to a $expand path in the initial request, unless either of the following is true:
The source or target entity has been deleted.
The maximum cardinality of the related entity is one and there is a subsequent HYPERLINK \l "_Element_metadata:link" metadata:link that specifies the same source and relationship.
The service MAY return a metadata:deleted-link where one of the entities has also been deleted, or where there is a subsequent HYPERLINK \l "_Element_metadata:link" metadata:link with the same source and relationship and a maximum cardinality of one for the related end.
The source, relationship and target attribute MUST be present. All attributes have to be used as described in the following subsection.
Attribute source
The source attribute MUST be present and specify the HYPERLINK \l "_Element_atom:id" atom:id of the entity from which the link originates. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Attribute relationship
The relationship attribute MUST be present and specify the name of the navigation property on the source entity for which the link is deleted.
Attribute target
The target attribute MUST be present and specify the HYPERLINK \l "_Element_atom:id" atom:id of the related entity. It may be HYPERLINK \l "_Relative_URLs" relative or absolute.
Bound Function
Zero or more functions MAY be bound to a collection of entities or an entity.
The functions associated with a particular collection of entities or an entity MAY be described using metadata:function elements that are direct children of the feed or entry to which the functions can be bound.
Example SEQ Example \* ARABIC 38: a function bound to an entry:
...
...
Example SEQ Example \* ARABIC 39: a function bound to a feed:
...
...
}
Element metadata:function
Each function is represented as a metadata:function element that MUST be a child of the HYPERLINK \l "_Element_atom:feed" atom:feed or HYPERLINK \l "_Element_atom:entry" atom:entry element representing the collection of entities or the entity on which the function exists.
Attribute metadata
The metadata attribute MUST be present and specify the namespace-qualified or alias-qualified name of the function, preceded by a #.
A function may have multiple overloads with different parameters. If function overloads exist that cannot be bound to the current entity type, the metadata attribute SHOULD address a specific function overload by appending the parentheses-enclosed, comma-separated list of non-binding parameter names, see rule qualifiedFunctionName in REF abnf \h Error! Reference source not found.. If the URL in the HYPERLINK \l "_Attribute_target" target attribute of the metadata:function element cannot be used to invoke all overloads for the function, then it MUST further be distinguished by appending the parentheses-enclosed, comma-separated list of non-binding parameter names.
Example SEQ Example \* ARABIC 40:
Attribute target
The target attribute MUST be present and specify the URL to GET from in order to invoke the function.
The first parameter of the function MUST be a binding parameter that is bound to the feed or entity on which the function is specified, and MUST NOT be provided as a separate parameter by the client when invoking the function.
Attribute title
The title attribute MUST be present and contain a human-readable, possibly language-dependent, and not necessarily unique name for the function, commonly used by clients to describe the function to a user.
Bound Action
Zero or more actions MAY be bound to a collection of entities or an entity.
The actions associated with a particular collection of entities or an entity MAY be described using metadata:action elements that are direct children of the feed or entry to which the actions can be bound.
Example SEQ Example \* ARABIC 41: action bound to an entity
...
...
Example SEQ Example \* ARABIC 42: action bound to a feed
...
...
Element metadata:action
Each action is represented as a metadata:action element that MUST be a direct child of the HYPERLINK \l "_Element_atom:feed" atom:feed or HYPERLINK \l "_Element_atom:entry" atom:entry element representing the the collection of entities or the entity on which the action exists.
Attribute metadata
The metadata attribute MUST be present and specify the namespace-qualified or alias-qualified name of the action element describing the action, preceded by a #.
Attribute target
The target attribute MUST be present and specify the URL to POST to in order to invoke the action.
The first parameter of the action MUST be a binding parameter that is bound to the feed or entity on which the action is specified, and MUST NOT be provided as a separate parameter by the client when invoking the action.
Attribute title
The title attribute MUST be present and contain a human-readable, possibly language-dependent, and not necessarily unique name for the action, commonly used by clients to describe the action to a user.
Action Invocation
Action parameter values in the request body MUST be encoded as an HYPERLINK \l "_Single_Scalar_Value" individual complex scalar value with the name parameters and no metadata:type attribute for the parameters element.
Each non-binding parameter value specified MUST be encoded as an individual primitive or complex scalar value. The name of the scalar value is the name of the parameter. The value is the parameter value in the XML representation appropriate for its type.
Any parameter values not specified in the request body MUST be assumed to have the null value.
Example SEQ Example \* ARABIC 43:
42One Microsoft Way9805214299
Instance Annotations
Annotations MAY be applied to an instance of a HYPERLINK \l "_Collection_of_Entities" feed, HYPERLINK \l "_Entity" entry, HYPERLINK \l "_Entity_Reference" entity reference, HYPERLINK \l "_Complex_Property" complex scalar value, HYPERLINK \l "_Property" property, HYPERLINK \l "NavigationProperty" navigation property, HYPERLINK \l "_Function" function, HYPERLINK \l "_Action" action, HYPERLINK \l "_Added_Link" added link, HYPERLINK \l "_Deleted_Link" deleted link, or HYPERLINK \l "_Errors_as_XML" error within an Atom payload.
Element metadata:annotation
An instance annotation in Atom is represented as an XML element with the name Annotation in the HYPERLINK \l "ODataMetadataNamespace" metadata namespace.
The value of the annotation is specified according to the Annotation Value, described below.
Attribute target
The target attribute MAY be used to specify the annotation target. If the target attribute is not specified the target of the annotation is the element represented by the direct parent of the HYPERLINK \l "_The_metadata:Annotation_Element" metadata:annotation element.
Attribute term
The HYPERLINK \l "_The_metadata:Annotation_Element" metadata:annotation element MUST have a term attribute that specifies the namespace-qualified or alias-qualified name of the term being applied.
Attribute metadata:type
If the type of the annotation value being specified is anything other than Edm.String the HYPERLINK \l "_The_metadata:Annotation_Element" metadata:annotation element MUST contain a metadata:type attribute to specify the appropriate type of the annotation value.
Attribute metadata:null
Null-valued annotations are represented as empty metadata:annotation elements with the metadata:null="true" attribute.
The metadata:null attribute distinguishes null values from other empty content (such as an empty string).
The absence of the metadata:null attribute is equivalent to specifying metadata:null="false".
Annotation Value
An instance annotation value may be specified as a HYPERLINK \l "_Primitive_Values" primitive value, HYPERLINK \l "_Collection_Value" collection value, or HYPERLINK \l "_Structure_Annotations" structured value.
Primitive Value
When specified in the content of an annotation element representing a primitive value, the content MUST be formatted as per HYPERLINK \l "_Primitive_Value" Primitive Types in Atom. If the type of the annotation value is anything other than Edm.String, then the annotation element MUST contain the HYPERLINK \l "_The_type_attribute" metadata:type attribute specifying the appropriate primitive type.
Example SEQ Example \* ARABIC 44:
Customers('ALFKI')ALFKIAlfreds Futterkistetrue
Collection Value
The content of an element representing a collection-valued annotation MUST be the individual elements of that collection formatted as direct child elements of the HYPERLINK \l "_The_metadata:Annotation_Element" metadata:annotation element as described in HYPERLINK \l "_Primitive_and_Enumeration_1" Collections of Primitive or HYPERLINK \l "_Complex_Collection_Property" Collection of Complex Scalar Values.
For collection-valued annotations, the annotation element MUST contain the HYPERLINK \l "_The_type_attribute" metadata:type attribute specifying the appropriate collection type.
Example SEQ Example \* ARABIC 45:
Customers('ALFKI')ALFKIAlfreds Futterkiste(203)555-1718(203)555-1719
Structured Value
The content of an element representing a structured annotation MUST be a single child element for each property of the annotation type being specified, formatted as per HYPERLINK \l "_Element_data:[PropertyName]" properties within an entity type.
For structural-valued annotations, the annotation element MUST contain the HYPERLINK \l "_The_type_attribute" metadata:type attribute specifying the appropriate structural type.
Example SEQ Example \* ARABIC 46:
Customers('ALFKI')2ALFKIAlfreds Futterkistetrue1
Instance Annotation Target
Instance annotations MAY target model elements represented by a HYPERLINK \l "_Collection_of_Entities" feed, HYPERLINK \l "_Entity" entry, HYPERLINK \l "_Complex_Property" complex scalar value, HYPERLINK \l "_Property" property, HYPERLINK \l "NavigationProperty" navigation property, HYPERLINK \l "_Function" function, HYPERLINK \l "_Action" action, or HYPERLINK \l "_Errors_as_XML" error within an Atom payload.
Feed
When annotating a feed, annotation elements MUST be direct children of the HYPERLINK \l "_Element_atom:feed" HYPERLINK \l "_Element_atom:feed" atom:feed element, and they MUST appear in a group at the beginning of the feed or (another) group at the end of the feed, depending on whether they are needed beforehand to understand the feed content, or can only be computed after serializing the feed content.
Entry
When annotating an entity, the annotation element MUST be a direct child of the HYPERLINK \l "_Element_atom:entry" atom:entry element representing the entity.
Entity Reference
When annotating an entity reference, the annotation element MUST be a direct child of the HYPERLINK \l "_Element_metadata:ref_1" metadata:ref element.
Complex Type
When annotating an instance of a HYPERLINK \l "_Single_Scalar_Value" complex type, the annotation element MUST be a direct child of the HYPERLINK \l "_Element_metadata:value" metadata:value element representing the complex-typed value.
Property
When annotating a property, the annotation element MUST be a direct child of the HYPERLINK \l "metadataProperties" metadata:properties element, or a direct child of the element representing a HYPERLINK \l "_Complex_Property" complex type in the case of annotating the property of a complex type. The value of the HYPERLINK \l "_Attribute_target_1" target attribute MUST specify the name of the property being annotated. The annotation elements MUST immediately precede the target property element.
Instance annotations are not supported when serializing single primitive properties in XML as described in HYPERLINK \l "_Individual_Property" Individual Primitive or Complex Scalar Values HYPERLINK "file:///C:\\Users\\d037427\\Downloads\\Instance%20Annotations%20in%20Atom%20(1).docx" \l "z174ab0b818ff4c6a9131aa62331e8133" .
Navigation Property
When annotating a navigation property, stream property, or other element represented by an HYPERLINK \l "_Element_atom:link" atom:link element, the annotation element must be a direct child of the atom:link element.
Function or Action
When annotating a function or action, the annotation element must be a direct child of the HYPERLINK \l "_Element_metadata:function" metadata:function or HYPERLINK \l "_Element_metadata:action" metadata:action element.
Added Link or Deleted Link
When annotating an added or deleted link in a delta response, the annotation element must be a direct child of the HYPERLINK \l "_Element_metadata:link" metadata:link or HYPERLINK \l "_Element_metadata:deleted-link" metadata:deleted-link element.
Error
When annotating an HYPERLINK \l "_Errors_as_XML" error, the HYPERLINK \l "_The_metadata:Annotation_Element" metadata:annotation element MUST be a direct child of the HYPERLINK \l "_The_metadata:error_Element" metadata:error element. The annotation element MAY have a HYPERLINK \l "_Attribute_target_1" target attribute value of "code", "message", or "innererror". If the target attribute is not specified, then the annotation is applied to the error itself. The annotation elements MUST follow the other child elements of the error element.
Error Reponse
In the case of an error being generated in response to a request specifying an Accept header of application/xml or application/atom+xml, or that does not specify an Accept header, the service MUST respond with an error formatted as XML.
When formatting error responses as XML, services SHOULD include a Content-Type response header with the value "application/xml".
Element metadata:error
Errors formatted as XML MUST have a root metadata:error element. The metadata:error element MUST have at least two child elements: HYPERLINK \l "metadataCode" metadata:code and HYPERLINK \l "metadataMessage" metadata:message.
In addition, errors may be annotated using custom HYPERLINK \l "_Instance_Annotations" annotations.
Example SEQ Example \* ARABIC 47:
501Unsupported functionalityquery301$search query option not supported$search
Element metadata:code
The metadata:error element MUST contain one metadata:code element specifying a service-defined string. This value MAY be used to provide a more specific substatus to the returned HTTP response code.
Element metadata:message
The metadata:error element MUST contain a metadata:message element specifying a human readable, language-dependent message describing the error. The Content-Language header MUST contain the language code from REF rfc5646 \h [RFC5646] corresponding to the language in which the value for message is written.
Element metadata:target
The metadata:error element MAY contain a metadata:target element to specify the target of the error (for example, the name of the property in error).
Element metadata:details
The metadata:error element MAY contain a metadata:details element containing one or more metadata:detail elements specifying detail about the error.
Element metadata:detail
The metadata:detail element specifies information about an individual error detail.
Element metadata:code
The metadata:detail element MUST contain one metadata:code element specifying a service-defined string. This value MAY be used to provide a more specific substatus to the returned HTTP response code.
Element metadata:message
The metadata:detail element MUST contain a metadata:message element specifying a human readable, language-dependent message describing the error.
Element metadata:target
The metadata:detail element MAY contain a metadata:target element to specify the target of the error.
Element metadata:innererror
The metadata:error element MAY contain a metadata:innererror element containing service specific debugging information that might assist a service implementer in determining the cause of an error.
The metadata:innererror element SHOULD only be used in development environments in order to guard against potential security concerns around information disclosure.
Extensibility
Implementations MAY add custom content anywhere allowed by REF RFC4287 \h \* MERGEFORMAT [RFC4287], Section 6, Extending Atom, and REF RFC5023 \h [RFC5023], Section 6.2 Document Extensibility. However, custom elements and attributes MUST NOT be defined in the HYPERLINK \l "ODataDataNamespace" OData Data Namespace nor the HYPERLINK \l "ODataMetadataNamespace" OData Metadata Namespace, and SHOULD not be required to be understood by the receiving party in order to correctly interpret the rest of the payload as the receiving party MUST ignore unknown foreign markup according to REF RFC4287 \h \* MERGEFORMAT [RFC4287].
Security Considerations
This specification raises no security issues.
This section is provided as a service to the application developers, information providers, and users of OData version 4.0 giving some references to starting points for securing OData services as specified. OData is a REST-full multi-format service that depends on other services and thus inherits both sides of the coin, security enhancements and concerns alike from the latter.
For ATOM-relevant security implications please cf. the relevant sections of REF RFC4287 \h [RFC4287] (8. Security Considerations), REF RFC5023 \h [RFC5023] (15. Security Considerations) and for the deleted-entry element: see REF RFC6721 \h [RFC6721] (7. Security Considerations) as starting points.
Conformance
Conforming clients MUST be prepared to consume a service that uses any or all of the constructs defined in this specification. The exception to this are the constructs defined in HYPERLINK \l "_Delta_Response_1" Delta Response, which are only required for clients that request changes
In order to be a conforming consumer of the OData ATOM format, a client or service:
MUST be prepared to receive all data types (section REF _Ref356829481 \r \h 7.1)
defined in this specification (client)
exposed by the service (service)
MUST be prepared to receive custom HYPERLINK \l "_Instance_Annotations" annotations (section REF _Ref356829540 \r \h 18)
MUST be prepared to receive additional constructs not defined in this version of the specification (section REF _Ref356829591 \r \h 20)
In addition, in order to conform to the OData Atom format, a service:
MUST comply with one of the conformance levels defined in REF ODataProtocol \h [OData-Protocol]
MUST support the application/atom+xml, application/xml and application/atomsvc+xml media types in the HYPERLINK \l "_Requesting_the_Atom" Accept header (section REF _Ref356829001 \r \h \* MERGEFORMAT 3)
MUST include the HYPERLINK \l "nextLink" next link in feeds containing partial results (section REF _Ref356829114 \r \h 12.4)
MUST return HYPERLINK \l "_Service_Document" service documents as Atom service documents (section REF _Ref356829145 \r \h 5)
MUST return XML responses in well formed XML according to this OData Atom specification
MUST return well-formed Atom payloads with the exceptions for the next link and the delta link (section REF _Ref359854072 \r \h 12.4)
MUST support entity instances with external metadata (section REF _Ref356921242 \r \h \* MERGEFORMAT 6.1.2)
MUST support properties with externally defined data types (section REF _Ref356921259 \r \h \* MERGEFORMAT 11.1.1.3)
MUST NOT violate any other aspects of this OData Atom specification
SHOULD support the $format system query option (section REF _Ref356829366 \r \h 3)
Acknowledgments
The contributions of the OASIS OData Technical Committee members, enumerated in REF ODataProtocol \h [OData-Protocol], are gratefully acknowledged.
Revision History
RevisionDateEditorChanges MadeWorking Draft 012012-08-22Michael PizzoTranslated Contribution to OASIS format/templateCommittee Specification Draft 012013-04-26Martin Zurmuehl
Ralf Handl
Michael PizzoExpanded error information
Added enumerations
Fleshed out descriptions and examples and addressed numerous editorial and technical issues processed through the TC
Added Conformance sectionCommittee Specification Draft 022013-07-01Martin Zurmuehl
Ralf Handl
Michael PizzoImproved metadata:type
Improved entity references
Simplified delta responses
GML for Geo types
Improved description of primitive value representation
Improved examples, aligned with JSON format specification
Aligned terms across specificationsCommittee Specification 012013-07-30Martin Zurmuehl
Ralf Handl
Michael PizzoNon-Material ChangesCommittee Specification Draft 032013-10-03Martin Zurmuehl
Ralf Handl
Michael PizzoNext link for collections of complex and primitive types
Null elements in collections of complex and primitive types
Binary values are base64url-encoded
odata-atom-format-v4.0-cs02 17 November 2013
Standards Track Work Product Copyright OASIS Open 2013. All Rights Reserved. Page PAGE 1 of NUMPAGES 56
MACROBUTTON NoMacro [document identifier] MACROBUTTON NoMacro [specification date]
Copyright OASIS Open 2004.All Rights Reserved. Page PAGE 5 of NUMPAGES 56
8 : ; C F G I J K L Y _ d e k m n z 5 6 7 G H T
Ĺ~uhE+ hc 0J hE+ hc 0J B* ph h| hJ/ 0J hJk hJ/ 0J
hJ/ 0J j hJ/ 0J Uh1D h]Q h7; h. h) CJ aJ hW CJ aJ hn( h+W hfC hW h{U h) hJk h? h h hI j hI U . ; L _ m G
b
r
9 ' A J gd] gd gdE+ gd7; gdc gd1D gd) gd gd ) gd
X
\
t
x
|
~
Z [ \ 6 7 8
`
a
b
i
j
wd $j@ hE+ hE+ B*Uph $j hE+ hE+ B*Uph hE+ hE+ h] B*ph hE+ hE+ 0J $j hE+ hE+ B*Uph hE+ hE+ B*ph j hE+ hE+ B*Uph h]Q h7;
hb 0J h| hJ/ 0J j hJ/ 0J UhJk hJ/ 0J
hJ/ 0J 'j
r
s
' ( ) 8 9 : S T U % ' 7 8 c 콶yuqj_j j h] h] Uh] h] h} h. $j
hE+ hE+ B*Uph hCL $j hE+ hE+ B*Uph $j hE+ hE+ B*Uph hE+ hE+ h] B*ph hE+ hE+ 0J $jk
hE+ hE+ B*Uph hE+ hE+ B*ph j hE+ hE+ B*Uph h7; %c d e { |
4 5 6 ? @ A H J [ \ ֺ֬֨yl hk hk 0J mHsH j hk hk Uhk hk j hk hk Uhk hk mHsH hx h. jx h] h] Uj h] h] Uj( h] h] Uh] h] h] h] 0J j h] h] Uj{ h] h] U &
" # J K L U V W c d 5 A B ǹǢǔdž~wsk j h-2 Uh] h h hV h
jV hk hk Uj hk hk Uj hk hk Uhk hk 0J je hk hk Uhk hk hk hk mHsH hk hk 0J mHsH j hk hk Uj hk hk U (J W 5
J % ] gd = gd QC gd;~T
&