Prerequisites
Before you connect, you must first do the following:- Connect a data source to your Connect AI account. See Sources for more information.
- Create a Workspace. Later, you will use the OData Service URL on that page (https://cloud.cdata.com/api/odata/{workspace\_name}) with the relevant workspace name to establish the connection.
- Generate a Personal Access Token (PAT) on the Settings page. Copy this down, as it acts as your password during authentication.
Connect to Connect AI
To establish a connection from Mendix to Connect AI using the OData protocol, follow these steps. Then, download the OData metadata file according to the steps below.Downloading the OData Metadata File
When creating a connection in Mendix, the connection flow requires a Data Source Contract File. Follow these steps to download the OData metadata file for Connect AI using curl, a command line tool:Open a command-line window for your operating system.
- On Windows, open the start menu, type cmd, and press the enter key to open a command prompt.
- On macOS and Linux, open a Terminal window.
To check if curl is installed on your system, type curl -help and press the enter key. If it is not installed, install it from the curl website.
Issue the following curl command, replacing
[user] with your Connect AI username and [PAT] with the PAT you generated above:Connect to Connect AI in Mendix
Follow these steps to establish a connection from Mendix to Connect AI:Upload the metadata.xml file from the steps above and click Next.
Enter a name in Application Name and select a technical owner (by default, this is the user who is currently logged in).
In the Environment Location field, enter https://cloud.cdata.com and select Non-Production for the environment type.