Appendix A - Metadata elements for JSON
SData for JSON recognizes a set of metadata elements presented in the table below. Any application can extend this set with native metadata elements that should be described in their respective contracts.
It should be noted that some metadata elements in the table below are not referenced directly in this document. In these cases, the metadata elements are drawn from SData v1.1, and are applicable to the SData 2.0 JSON format. For further explanation of these elements, the reader is referred to [1].
Name | Description | Applicable to | Point of definition |
---|---|---|---|
$applicationCode | JSON diagnosis related: Application specific diagnosis code | Diagnoses object | JSON format doc |
$averageLength | Contains the average display length needed | Property | Sme.xsd |
$baseUrl |
URL leading to the resource kind level of an application.
The URL SHOULD NOT end in a "/"; this is to aid readability
when $baseUrl is concatenated with other strings to form
new URLs. Examples: "$baseUrl": "http://www.example.com/MyApp/Contract/-" "$url" : "{baseUrl}/$services/pricingService" |
Feed | JSON format doc |
$batch |
expresses the manner of invocations supported in batch by
the provider.
Allowable values are:
|
Request | JSON metadata doc (here) |
$batchingMode | Batching is supported for the resource kind. Allowable values are: sync, async, syncOrAsync | Links | Sme.xsd |
$body | JSON object containing the payload transported to the provider from an SData link | Links | JSON metadata doc (here) |
$capabilities | String element containing a comma separated list of the resource's capabilities. These may contain | Links | JSON metadata doc (here) |
$create | Link used to create a new resource. | Links | JSON metadata doc (here) |
$delete | Link used to delete an existing resource | Links | JSON metadata doc (here) |
$deleteMissing | Indicates that all elements not present in an array must be considered as deleted | Request | sdata.xsd |
$details | Link used to retrieve a single resource (response is an entry) | Links | JSON metadata doc (here) |
$diagnoses | Array containing objects providing detailed indications of errors and warnings encountered by the provider during the execution of a request | Response | JSON format doc |
$elapsedSeconds |
JSON tracking related: Time elapsed since operation started, in seconds. |
Tracking response | JSON format doc |
$enum | Contains the allowable values of an enum property (see sdata/choice type) | Property | JSON metadata doc (here) |
$etag | opaque identifier assigned by the provider to a version of a resource | Response | JSON format doc |
$format | Is associated with sdata/string properties; imposes a particular structure to the string | Property | JSON metadata doc (here) |
$fractionDigits | Number of digits after the decimal point | Property | Sme.xsd |
$groupName | A group (category) name to group related properties | Property | Sme.xsd |
$invocation |
The manner in which the provider should process the
request 12.
Allowable values are:
|
Links | JSON metadata doc (here) |
$isDeleted | Indicates that a member of an array has been deleted | Response | sdata.xsd |
$isLocalized | The property contains localized text | Property | Sme.xsd |
$isMandatory | The property cannot have an empty content | Property | Sme.xsd |
$isReadOnly | The contents of the property cannot be modified | Property | Sme.xsd |
$isUniqueKey | The property contains a unique key | Property | Sme.xsd |
$item | Contains the description of an individual element in an sdata/array, sdata/choice, sdata/reference, sdata/object | Entry definition | JSON metadata doc (here) |
$key | The native primary key of the resource. Its value can be used to target a single resource (ex: http://www.example.com/MyApp/-/myResource('123') ) | Property | JSON format doc |
$links | Object containing links that present functional aspects of the resource (ex: edit, lookup, create). | Entry | JSON format doc JSON metadata doc (here) |
$list | Link used to retrieve a set of resources (response is a feed) | Links | JSON metadata doc (here) |
$lookup | Link used to retrieve a set of resources to be used to populate a list of choices. This corresponds to the sdata:lookup defined in the SData specification section 6.7 | Links | JSON metadata doc (here) |
$maxLength | Contains the maximum length of a string | Property | Sme.xsd |
$message | JSON diagnosis related: Friendly message for the diagnosis | Diagnosis object | JSON format doc |
$method | HTTP method used to operate on a resource | Links | JSON metadata doc (here) |
$payloadPath | JSON diagnosis related: XPath expression that refers to the payload element responsible for the error | Diagnosis object | JSON format doc |
$phase | JSON tracking related: End user message describing the current phase of the operation. | Tracking response | JSON format doc |
$phaseDetail | JSON tracking related: Detailed message for the progress within the current phase. | Tracking response | JSON format doc |
$pluralName | Name of a resource in plural form | Feed | Sme.xsd |
$pollingMillis | JSON tracking related: Delay (in milliseconds) that the consumer should use before polling the service again. | Tracking response | JSON format doc |
$precedence | Controls the visibility of properties on small screens | Property | Sme.xsd |
$progress | JSON tracking related: Percentage of operation completed. | Tracking response | JSON format doc |
$properties | JSON object containing the metadata in a per-property manner for a resource | Entry | JSON metadata doc (here) |
$protocolFilters | Comma separated list of properties that can be used for filtering within the where clause of the URL | Feed | Sme.xsd |
$remainingSeconds | JSON tracking related: Expected remaining time, in seconds. | Tracking response | JSON format doc |
$request |
Contains either
|
Links | JSON metadata doc (here) |
$resources | Array containing the individual entries | Feed | JSON format doc |
$response |
Contains either
|
Feed/entry | JSON metadata doc (here) |
$sdataCode | JSON diagnosis related; The SData diagnosis code | Diagnosis object | JSON format doc |
$severity |
JSON diagnosis related:
Severity of the diagnosis entry. Possible values are:
|
Diagnosis object | JSON format doc |
$stackTrace | JSON diagnosis related: Stack trace - to be used with care | Diagnosis object | JSON format doc |
$tags | Comma separated list of tags | Sme.xsd | |
$title | Human-readable description of the resource | Feed/entry | JSON format doc |
$totalDigits | Maximum overall number of digits for a decimal property | Property | Sme.xsd |
$type | SData JSON type of a property | Property | JSON metadata doc (here) |
For a Link, the $type identifies the internet media type of the response. | Links | JSON metadata doc (here) | |
$unsupported | The element is an unsupported part of a global contract | Feed/entry/property | Sme.xsd |
$updated | the time stamp of the last update of the resource, formatted according to ISO 8601 dateTime specification | Entry | JSON format doc |
$updateFull | Link used to update a resource by providing all its contents | Links | JSON metadata doc (here) |
$updatePartial | Link used to update only a selected subset of the properties of a resource | Links | JSON metadata doc (here) |
$url | URL pointing to the resource | Feed/entry | Sdata.xsd, JSON format doc |
$uuid | UUID identifying the resource. UUIDs may complement the native primary keys; they are frequently encountered in application integration to identify the same logical resource across application boundaries. | Entry | JSON format doc |
$value | Introduces the value of a property in an enum context (see sdata/choice type) | Property | JSON metadata doc (here) |
12. This should not be confused with client-side AJAX requests. The mechanism corresponds to the sme:invocationMethod described in section 11.4 and 11.5 of the SData 1.1 standard