Aras Innovator specific extensions

This section describes the extensions that can be used in Aras Innovator to:

  • Configure server-driven paging
  • Retrieve the language associated with multi-lingual string types

Use the offset and fetch AML attributes to configure Server-driven paging. When the client specifies the odata.maxpagesize value in the Prefer request header, the OData Interface translates the value using a combination of the offset and fetch attributes while considering any $skip and $top options specified in the request. The @odata.nextLink annotation value includes a $skiptoken option, which determines the starting position of the next page within a requested data set. All query options from the original request appear in the @odata.nextLink URL.

The last page cannot contain the @odata.nextLink annotation. To determine whether @odata.nextLink must be present in the response, the translator produces AML that requests one additional item. If all requested items are received, @odata.nextLink must be included in the response. If the number of returned items is less than requested, @odata.nextLink must be omitted.

GET http://host/server/odata/Part?$skip=3&$top=30
Prefer: odata.maxpagesize=10
Response:
{
 "@odata.context": “http://host/server/odata/$metadata#Part”,
 "@odata.nextLink": “http://host/server/odata/Part?$skip=3&$top=30&$skiptoken=10",
 “value": [
 { “id": "…", “item_number": “P-01", … remaining Part item properties },
 … 9 remaining Part items
 ]
}

The request for the next page is translated as follows:

GET http://host/server/odata/Part?$skip=3&$top=30&$skiptoken=10
Prefer: odata.maxpagesize=10
Response:
{
 "@odata.context": “http://host/server/odata/$metadata#Part”,
 "@odata.nextLink": “http://host/server/odata/Part?$skip=3&$top=30&$skiptoken=20",
 “value": [
 { “id": "…", “item_number": “P-10", … remaining Part item properties },
 … 9 remaining Part items
 ]
}

The properties of the multilingual string type are always returned using the lang attribute to specify the language used by the string. The lang attribute is translated to @aras.lang annotation for this property:

GET http://host/server/odata/ItemType(‘4F1A…8A88’)?$select=label
Response:
{
 "@odata.context": “http://host/server/odata/$metadata#ItemType(label)/$entity”,
 “id": “4F1A…8A88", 
 “label": “Part”,
 “label@aras.lang": “en”
}

The client can also ask for the property value specifying a language other than the language used in the session or all the languages defined in the database. In AML, the language attribute serves this purpose. It may contain a comma-separated list of languages or star “*” specifying all the languages in the database. The OData service introduces the lang query option with the same meaning and #aras.lang.* annotation qualifier that is used to return the property or property attribute value in the requested languages:

GET http://host/server/odata/ItemType(‘4F1A…8A88’)?$select=label&lang=*
Response:
{
 "@odata.context": “http://host/server/odata/$metadata#ItemType(label)/$entity”,
 “id": “4F1A…8A88", 
 “label": “Part”,
 “label@aras.lang": “en”,
 “label@aras.custom_attr": “PPP”,
 “label@#aras.lang.ru": “Деталь”
 “label@aras.custom_attr#aras.lang.ru": “ДДД”
}

Currently, the OData interface does not support the following terms. It will respond with a “501 Not Implemented” HTTP code if you use one of them: