OData
The OData (Open Data Protocol) is a set of best practices for developing and using RESTful APIs.
The OData 3.0 specification is a powerful way to fetch and display data from a Data service. This specification defines a standard way of exchanging data between systems, allowing developers to retrieve data from external sources such as a database or API. By utilising the capabilities of the oData 3.0 specification, developers can create dynamic and customisable lists that can be updated in real-time with minimal manual intervention.
An OData URL consists of three parameters: the service root URL, resource path and query options.
In the ComUnity Development Toolkit the service root URL is system defined and and is not exposed publicly for security reasons.
The ComUnity Development Toolkit only supports the OData 3.0 specification.
The following links will provide you with more information on OData.
OData in 6 steps
The OData metadata enables the development of powerful generic client tools. The following six steps demonstrate interesting scenarios of OData across different programming platforms.
Source: www.odata.org
The link below will provide you with a better understanding of OData.
How is OData used in the Toolkit
This article describes in some detail how OData is used within the ComUnity Platform Toolkit.
The OData protocol and URL conventions are used to interact with the platform Screen Controls in the following ways:
Specifying the target URL for buttons and links, the data path for the content of links or the data path for the reference values of a reference field.
Populating a list with database values (the Data Path and any Query values).
Getting record values for a form (the Target URL).
Screen Controls in the Application Pages
App Action | Field | OData Syntax |
---|---|---|
ActionButton | UrlTemplate (OData resource path) |
|
DocumentTemplate (OData body) SME Note: DocTemplate control deprecated, should be replaced with a Content control |
| |
BlockTemplate | BlockUrl (OData resource path) | SME Note: Get clarity from Developers |
QueryFilter (OData query option, value for $filter) | SME Note: Get clarity from Developers | |
EntityListItem | EntitySetOrNavProperty (OData resource path) | SME Note: Get clarity from Developers |
QueryFilter (OData query option, value for $filter) | SME Note: Get clarity from Developers | |
FormInput | PropertyNav (navigation portion of an OData resource path) | SME Note: Get clarity from Developers |
ReferenceInput | PropertyNav (navigation portion of an OData resource path) | SME Note: Get clarity from Developers |
DataPathTemplate (OData resource path) | SME Note: Get clarity from Developers | |
Query (OData query option, value for $filter) | SME Note: Get clarity from Developers |
Navigation
Nav Type | Field | OData Syntax |
---|---|---|
ListLink | DataPath |
|
Query | Open Code Box to add Query string:
| |
SingleListItem | DataPath |
|
Application Objects
App Object | Field | OData Syntax |
---|---|---|
AppObject | DataServiceUrl (OData service root URL) | / |
SortOrder (OData query option, value for $orderby) |
|
Last updated