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

Application Objects

public Object generateToken() throws Exception {
	try {
		String client_id = clientId;
		String client_secret = clientSecret;
		String grant_type = "client_credentials";
		URL url = null;
		InputStream stream = null;
		HttpURLConnection urlConnection = null;
	    {
	{