Introduction
- The service document (located at the service root) lists the available top-level resources, and
- The service metadata document (located at the address $metadata relative to the service root) describes the structure of all resources in the service.
Contents
AtomPub Service Document
Element app:service
- <atom:link rel="self" href="..."/> contains the link to this service document, and
- <atom:link rel="latest-version" href="..."/> contains the link to latest version of this service.
Element app:collection
- <sap:member-title> contains the human-readable name or caption for a single member of the collection. This typically is the singular form of the content of the <atom:title> element of this collection.
- <atom:link rel="search" href="..."/> contains the link to an OpenSearch description document that describes how to use free-text search for this collection. For those not familiar with OpenSearch: just append the SAP-specific query option searchto the URL of the collection.
- <atom:link rel=http://www.sap.com/Protocols/SAPData/rel#subscribe href="..."/> contains the link to the collection of the same service that allows subscribing to content changes of the annotated collection. For more information see the HowTo Guides - Subscription & Notification with SAP NetWeaver Gateway - Series.
It can also contain the attribute sap:addressable with the same value as for the corresponding entity set in the metadata document.
Metadata Document
Element edm:EntityContainer
Entity containers can be annotated with the following attributes. If not stated explicitly, consumers can assume them to have the default value listed in the second column. This default value reflects the "normal" behavior.
Attribute Name | Default Value | Meaning |
---|---|---|
use-batch | false | Wrap all requests to ressources of this service in batch requests; only the service document and the metadata document can be accessed unwrapped.
|
Element edm:EntitySet
Attribute Name | Default Value | Meaning |
---|---|---|
label | - | Description, will also be used as atom:title in the service document |
creatable | true | New entities can be created in this set |
updatable | true | Entities in this set can be updated |
deletable | true | Entities can be deleted from this set |
searchable | false | Supports custom query option search |
pageable | true | Supports system query options $top and $skip |
topable | true | Supports system query option $top |
addressable | true | Use “false” if this entity set can only be accessed within its containing entity, e.g. SalesOrderItems within SalesOrders through SalesOrders(4711)/Items. Direct access to non-addressable entity collections will result in a 404 response code. The set may however allow access to single entities identified by their key properties values, e.g. SalesOrderItems(OrderID=4711,ItemID=3) |
requires-filter | false | Use “true” if this set cannot be queried without providing a $filter expression. If accessed without a filter expression, it will respond with a human-readable error message explaining which kinds of filter expressions are required as a minimum |
semantics | - | See table below |
Attribute sap:semantics
This attribute can take the following values in the context of an entity type:
Value | Meaning |
---|---|
aggregate | The entities of this set are automatically aggregated if the query option $select is specified. Each property listed in $select is treated according to its aggregation role, see description of attribute sap:aggregation-role below |
fixed-values | The entity set represents a list of fixed values, i.e. it is unlikely to change often, and the list is typically short |
Element edm:EntityType
Attribute Name | Meaning |
---|---|
label | Description, will also be used as sap:member-title in the service document |
semantics | See table below |
Attribute sap:semantics
Value | Meaning |
---|---|
vcard | Entities of this type contain contact information following the vCard standard, see values for sap:semantics on property level |
vevent | Entities of this type contain event/appointment information following the iCalendar standard, see values for sap:semantics on property level |
vtodo | Entities of this type contain todo/task information following the iCalendar standard, see values for sap:semantics on property level |
parameters | This entity type represents parameters for an analytical query |
aggregate | Entity sets with this type return result feeds with aggregated values for properties annotated with sap:aggregation-role="measure". The aggregation takes into account the dimension properties specified in the $select system query option of the request. See also description of annotation sap:aggregation-role. |
variant | This entity type represents query selection variants bundling parameter selections and filter expressions for obtaining specific query results |
Element edm:Property
Attribute Name | Default Value | Meaning |
---|---|---|
label | - | A short, human-readable text suitable for labels and captions in UIs |
heading | - | A short, human-readable text suitable for column headings in UIs |
quickinfo | - | A human-readable text suitable for tool tips in UIs |
semantics | - | See table below |
creatable | true | Values for this property can be chosen by client when creating an instance. “False” if value is always set by the server, e.g. document number from number range. |
updatable | true | Values of this property can be changed. Must be “false” if it is “false” at entity set level. |
sortable | true | Can be used in $orderby system query option. |
filterable | true | Can be used in $filter system query option. |
required-in-filter | false | Must be used in $filter system query option. |
filter-restriction | - | See table below |
text | - | The name of a property in the same type containing a human-readable text for the value of this property. |
unit | - | The name of a property in the same type containing the currency code or unit of measure for a numeric value. |
precision | - | The name of a property in the same type containing the number of significant decimal places for a numeric value. |
field-control | - | The name of a property in the same type containing a numeric value that controls visibility:
See section below for details |
validation-regexp | - | Values for this property have to match the specified regular expression. The regular expression is a JavaScript Regular Expression. |
display-format | - | There are currently three possible values:
|
lower-boundary | - | A property holding the upper boundary of a value range includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property holding the related lower boundary. |
upper-boundary | - | A property holding the lower boundary of a value range includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property holding the related upper boundary. |
aggregation-role | - | See table below |
super-ordinate | - | If values of this property are meaningful (unique) only in the context provided by the value of another property, then this attribute holds the name of the context-providing property. The value of this attribute is always the name of another property in the same type. |
attribute-for | - | A property representing an attribute of another property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property for which this property is an attribute. |
hierarchy-node-for | - | A property holding node IDs for a hierarchy structure of values of some other property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property for whose values the hierarchy is defined. |
hierarchy-level-for | - | A property holding level numbers for a hierarchy structure of values of some other property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property for whose values the hierarchy is defined. |
hierarchy-parent-node-for | - | A property holding parent node IDs for a hierarchy structure of values of some other property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the property for whose values the hierarchy is defined. |
hierarchy-drill-state-for | - | A property holding the drill state of a hierarchy node includes this attribute. The drill state is indicated by one of the following values: collapsed, expanded, leaf. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID. |
parameter | - | See table below |
is-annotation | false | Represents an instance annotation. |
updatable-path | - | If a property can be updated or not depending on the state of its entity, it can be annotated with this attribute. The value of this attribute is always the name of a Boolean property in the same type. This related property indicates whether the annotated property can be updated for the containing entity or not. Note: if used in addition to the more expressive field-control annotation, the values of the two must be in sync. |
preserve-flag-for | - | See below |
filter-for | - | A property whose value is a $filter expression includes this attribute. The $filter expression must be valid for the entity type specified in this attribute. |
Attributes sap:unit and sap:precision
Amounts in a currency or absolute measures MUST be represented as simple properties with an appropriate numeric Edm type, preferably Edm.Decimal. These numeric properties SHOULD refer to a string property containing the ISO currency or unit of measure with the sap:unit attribute. They MAY refer to a numeric property containing the (non-negative) number of decimal places to be used for displaying the amount or measure with the sap:precision attribute.Example in metadata document:
sap:unit="OrderedUnit" />
<Property Name="OrderedUnit" Type="Edm.String"
sap:semantics="unit-of-measure" />
<Property Name="Price" Type="Edm.Decimal" Precision="10" Scale="3"
sap:unit="Currency" sap:precision="DisplayScale" />
<Property Name="DisplayScale" Type="Edm.Byte" />
<Property Name="Currency" Type="Edm.String"
sap:semantics="currency-code" sap:text="CurrencyText" />
<Property Name="CurrencyText" Type="Edm.String" />
Example in Atom entry:
<d:OrderedUnit>KGM</d:OrderedUnit>
<d:Price>86.9</d:Price>
<d:DisplayScale>2</d:DisplayScale>
<d:Currency>EUR</d:Currency><d:CurrencyText>Euro</d:CurrencyText>
Attribute sap:field-control
Whether a property can or must contain value may depend on the state of its entity, so it is impossible to express this up-front via metadata annotations. In these cases the "edit state" of the property can be expressed via a separate "field control" property, and the link between data properties and their field-control properties is expressed with the sap:field-control attribute.
Example in metadata document:
<Property Name="Street" Type="Edm.String"
sap:field-control="UX_FC_Address" />
<Property Name="City" Type="Edm.String"
sap:field-control="UX_FC_Address" />
<Property Name="UX_FC_Address" Type="Edm.Byte"/>
The possible values for a field-control property are:
Value | Meaning |
---|---|
7 | Mandatory - property must contain a value |
3 | Optional - property may contain a null value |
1 | Read-only - property cannot be changed |
0 | Hidden - property should not be visible on user interfaces |
Attribute sap:semantics
The possible values in the context of a property are:
Value | Meaning |
---|---|
tel | Telephone number |
tel;type=cell,work | Work cellphone number; see explanation below table for more values |
tel;type=fax | Fax number |
Email address | |
email;type=pref | Preferred email address |
url | Web URL |
name | Formatted text of the full name |
givenname | First name or given name of a person |
middlename | Middle name of a peron |
familyname | Last name or family name of a person |
nickname | Descriptive name given instead of or in addtion to the one marked as "name" |
honorific | Title of a person (Ph.D., Dr., ...) |
suffix | Suffix to the name of a person |
note | Supplemental information or a comment that is associated with the vCard |
photo | URL of a photo of a person |
city | Address: city |
street | Address: street |
country | Address: country |
region | Address: state or province |
zip | Address: postal code |
pobox | Address: post office box |
org | Organization name |
org-unit | Organizational unit |
org-role | Organizational role |
title | Job title |
bday | Birth date |
summary | Calendar: summary of a calendar component |
description | Calendar: description of a calendar component, detailing the summary |
categories | Calendar: comma-separated list of categories for a calendar component |
dtstart | Calendar: the date and time that a calendar component starts |
dtend | Calendar: the date and time that a calendar component ends |
duration | Calendar: duration as an alternative to dtend |
due | Calendar: the date and time that a to-do is expected to be completed |
completed | Calendar: the date and time that a to-do was actually completed |
priority | Calendar: the relative priority for a calendar component, 0 for undefined, 1 for highest, ... 9 for lowest |
class | Calendar: access classification for a calendar component |
status | Calendar: overall status or confirmation for the calendar component |
percent-complete | Calendar: percent completion of a to-do., ranging from 0 to 100 (integer) |
contact | Calendar: contact information or alternatively a reference to contact information associated with the calendar component |
location | Calendar: the intended venue for the activity defined by a calendar component |
transp | Calendar: defines whether or not an event is transparaent to busy time searches |
fbtype | Calendar: free/busy time type, see [iCalendar, Section 3.2.9] |
wholeday | Calendar: "true" or "false, depending on whether an event is scheduled for an entire day |
from | Mail: author of message, see [RFC5322, section 3.6.2] |
sender | Mail: mailbox of agent responsible for actual transmission |
to | Mai: comma-separated list of primary recipients, see [RFC5322, section 3.6.3] |
cc | Mail: carbon copy, comma-separated |
bcc | Mail: blind carbon copy, comma-separated |
subject | Mail: topic of the message |
body | Mail: message body |
keywords | Mail: comma-separated list of important words and phrases that might be useful for the recipient |
received | Mail: DateTime the message was received |
geo-lon | Geolocation: longitude |
geo-lat | Geolocation: latitude |
currency-code | ISO currency code |
unit-of-measure | Unit of measure, preferably ISO |
- "home" to indicate a telephone number associated with a residence
- "work" to indicate a telephone number associated with a place of work
- “pref" to indicate a preferred-use telephone number
- "text" to indicate a telephone number supporting text messages (SMS)
- "voice" to indicate a voice telephone number
- "fax" to indicate a facsimile telephone number
- "cell" to indicate a cellular telephone number
- "video" to indicate a video conferencing telephone number
- "pager" to indicate a paging device telephone number
- "textphone" to indicate a telecommunication device for people with hearing or speech difficulties
- "home" to indicate an email address associated with a residence
- "work" to indicate an email address associated with a place of work
- “pref" to indicate a preferred-use email address
- "home" to indicate an address associated with a residence
- "work" to indicate an address associated with a place of work
- “org" to indicate an address associated with the organization
- “pref” to indicate a preferred address “other” to indicate some other address
Attribute sap:filter-restriction
Value | Meaning |
---|---|
single-value | Only a single “eq”clause is possible. |
multi-value | Several “eq” clauses, separated by or, are possible. |
interval | At most one “ge” and one “le” clause, separated by “and”, alternatively a single “eq” clause. |
Attribute sap:aggregation-role
Value | Meaning |
---|---|
dimension | The property represents the key of a dimension. Only valid for properties of an entity type that is annotated with sap:semantics=“aggregate“. |
measure | The property represents a measure whose values will be aggregated according to the aggregating behavior of the containing entity type. Only valid for properties of an entity type that is annotated with sap:semantics=“aggregate“. |
totaled-properties-list | The property value is a comma-separated list of totaled dimension property names. |
Attribute sap:parameter
Value | Meaning |
---|---|
mandatory | A value must be supplied for this parameter. |
optional | A value for this parameter can be left out by specifying an empty string (applicable only for parameter properties of type Edm.String). |
Attribute sap:preserve-flag-for
<Property Name="UnitPricePreserveFlag" Type="Edm.Boolean"
sap:preserve-flag-for="UnitPrice"/>
Element edm:NavigationProperty
Attribute Name | Default Value | Meaning |
---|---|---|
filterable | true | Can be used as a path segment for properties in $filter system query option |
Element edm:FunctionImport
Attribute Name | Meaning |
---|---|
action-for | Value is the qualified name of an entity type in scope. Indicates that the function or action operates on instances of that entity type. The function import MUST have a required parameter for each key property of that entity type. Parameter name and type must be identical to the name and type of the corresponding key property. |
applicable-path | Value is a path to a Boolean property in the entity type named in the action-for attribute. The property indicates whether the function import can be invoked for the entity. The path can be the name of a Boolean property, or the name of a complex property followed by a forward slash and the path to a Boolean property in the complex type. |
label | Description |
planning-function | This function processes or generates plan data that may be exposed by entity sets of aggregate entity types in the same service. Its logic may have side-effects on these entity sets. |
Element sap:value-constraint
<sap:value-constraint set="Regions">
<sap:parameter-ref name="Country"/>
<sap:parameter-ref name="Region"/>
</sap:value-constraint>
It has a set attribute that identifies the entity set containing the list of allowed parameter value combinations.
Nested sap:parameter-ref elements link the function import parameters specified with the name attribute to a key property of the entity type of the specified entity set. The sequence of sap:parameter-ref elements matches the sequence of the edm:PropertyRef elements of the Key element.
Element edm:Parameter
Attribute Name | Meaning |
---|---|
label | Description |
Element edm:AssociationSet
Attribute Name | Default Value | Meaning |
---|---|---|
creatable | true | Relations can be created |
updatable | true | Relations can be changed |
deletable | true | Relations can be deleted |
Instance Annotations
annotation holders and separate them from the other properties of the entity type.
- Zero or more for the entity itself.
- Zero or more for every property contained in the entity.