In Geovonic Connect, data sources provide connectivity to third-party business systems. The ODATA data source allows you to fetch real-time data from your applications that expose an ODATA interface.
For example, the ODATA data source allows you to configure searches against Microsoft SharePoint and Microsoft Dynamics. This article assumes that you have some knowledge of using ODATA queries to fetch data.
Using the ODATA data source, you can fetch a list of document links from SharePoint that match attributes on your map features. For example, you can find all the related documents for a property or asset shown on the map.
Data Source Configuration
The ODATA data source configuration requires a few fields: –
- Service root URL – the URL pointing to the database server.
For example,https://yourtenantname.sharepoint.com/sites/MySPSite/_api/v1.0/files
- Token Endpoint – the URL for the OAuth request to get an authentication token.
The remaining fields are all related to the OAuth authorisation grant. There are two types of authorisation grant supported: –
- Client Credentials
- Password Grant Credentials
It is important when configuring any integration service to follow the Principle of Least Privilege. Any credentials used for the data source should only be able to access the minimum amount of information to meet the needs of your Geovonic Connect application. For example, do not provide the admin credentials for your database if Geovonic Connect only needs to access a single view. Best practice is to create a new user with the least required privileges.
Creating OAuth credentials will differ depending on the ODATA service you are connecting to. As an example, for SharePoint you will typically need to go to the “New App Registration” function. The URL of that page will be similar to: –
https://yourtenantname.sharepoint.com/_layouts/15/appregnew.aspx
Layer Link Configuration
The ODATA layer link configuration has several fields: –
- Resource URI – Appended to the Service Root URL to form the full query path.
For example,getByPath('/MyFolder/{{REGION}}')/children
- $filter – An optional ODATA filter statement.
- $select – The list of field names to be returned.
- $top – The maximum number of results to be returned.
- $orderby – The sort order for the returned results.
- $expand – Any objects to be expanded in the returned results.
- Test data – Include example values for any field attributes that will be used when validating this layer link.
For example,{{REGION}}=North
Where queries are potentially returning multiple records for a single map feature, be sure to include a $top value to set the maximum number of records that should be returned. This prevents very large datasets being inadvertently returned to the user’s browser.