ComUnity Platform
25.x
25.x
  • ComUnity Technical Overview
  • Getting Started
    • ComUnity Developer Toolkit
      • Login
      • Manage your account: Profile, Settings, and Actions
    • Manage your project
      • Create a project
      • Project Settings
      • General
      • Build and launch your project
      • Templates
      • App Users & Roles
      • Themes
      • Versions
      • Icon Management
      • Store URLs
      • Deploy
        • Environments
        • Manual Project Deployment Across Environments
        • Configuration
    • Organisations
      • Roles and Permissions
      • Organisational Management
      • Teams
  • Toolkit Guides
    • Data
      • Customising the Data Model
      • Manage Entities in the Data Model: Step-by-Step Guide
      • Setting Up Role-Based Permissions for Entities: Access Control Configuration
      • Creating Entity Associations: Configuring Table Links
      • Manage Inheritance in the Data Model: Configuring Entity Hierarchy and Inheritance
    • Screens
      • Integrated Navigation and UI Builder for Screens in the ComUnity Developer Toolkit
      • Building Screens
        • Screen Controls
        • Navigation
          • Lists in Navigation pages
            • Dynamic List Rendering in Navigation pages
            • Adding Sub-Screens to Navigation pages Using List Navigation
          • Page Link
        • Form
          • Screen Controls
          • Lists in Form pages
            • Static Item - List Item
            • Single Item - List Item
            • Entity Items - List Item
    • Custom Classes
    • Custom Website
      • Bindings
      • Pages
        • Page Development
        • Page Elements
        • Templates
        • Resources
    • Communications
      • Configuring Dynamic Action Templates for Event-Driven Communication Channels
        • Event Details: Understanding Data Sources for Dynamic Template Building
        • Email
        • SMS & WhatsApp
        • INAPP
        • Push Notifications
        • HTTP
      • Triggering the Communication Service
      • Communication Settings
    • Events and Notifications Management
    • Observability
      • Client Analytics
      • Metrics
      • Traces
    • Third Party Services
      • Azure Function Apps
      • Azure Logic Apps
      • Integrations
      • Microsoft Fabric
      • APIs
    • Services
      • Media Server
  • General Information
    • Debugging and editing your application code
  • Toolkit Tutorials
    • Build a Simple Blog App: The Beginner's Guide to ComUnity Development
    • Building a Comprehensive News App: Integrating In-App Messaging, Push Notifications, SMS, and Email
    • APIs
      • JSON Placeholder Todos API Integration in a Simple Blog App
      • Countries GraphQL API Integration Using the APIs feature in the Toolkit
      • Integrating the JSONPlaceholder Posts API Using the Toolkit’s OpenAPI Feature
      • OData Integration with the Bookings API Using the APIs feature
    • How to Configure In-App Notifications for User Profile Updates Using Communications
  • Enhancing Cases App: Real-time Comment Notifications
  • Reference articles
    • Glossary
    • Privacy by Design
    • OData
    • Razor
    • CRUD Functions
    • Mustache Templating
    • Temporal Tables
    • Integrating WhatsApp Business with the ComUnity Platform
    • Data Types
    • Field Types
    • Table Links
    • Release Notes
    • Keyboard Shortcuts
Powered by GitBook
On this page
  • OData in 6 steps
  • How is OData used in the Toolkit
  • Screen Controls in the Application Pages
  • Navigation
  • Application Objects
Export as PDF
  1. Reference articles

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.

  • https://www.odata.org/

  • https://hevodata.com/learn/odata-vs-rest/#u2

  • https://docs.microsoft.com/en-us/sql/integration-services/data-flow/odata-source?view=sql-server-ver15

  • https://www.odata.org/documentation/odata-version-3-0/url-conventions/

  • https://www.odata.org/odata-services/

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.

  • https://www.odata.org/getting-started/understand-odata-in-6-steps/

  • https://docs.microsoft.com/en-us/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)

/UserProfile(guid'{{=userguid}}')/Posts({{= postId }})

DocumentTemplate (OData body) SME Note: DocTemplate control deprecated, should be replaced with a Content control

{"NewsId":{{= NewsId }},"Deleted":"{{= now }}"} OR {"odata.type": "Demo211026.PersonalNotification","Message": "{{= Message }}", "Subject": "{{= Subject }}", "ClickAction": "{{= ClickAction }}"}

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

/EDBusiness

Query

Open Code Box to add Query string:

Deleted eq null and ShowListing eq true and (LicenceExpiry eq null or LicenceExpiry ge DateTime'{{=now}}')

SingleListItem

DataPath

/EDBusiness

Application Objects

App Object
Field
OData Syntax

AppObject

DataServiceUrl (OData service root URL)

/Fault({{= faultId}})

SortOrder (OData query option, value for $orderby)

Created desc OR Deleted eq null

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;
	    {
	{