Skip to content

Establish Project

Establish Your Codebase

Before you can start building your Connector you should go through Getting Started and ensure you have the CLI tool installed:

dotnet tool list --global

Generate Connector Scaffolding

Create a folder for your new connector named after your connector and use xchange connector new like so:

mkdir connector-ExampleConnector
cd connector-ExampleConnector/

The CLI offers an easy way to generate the initial code for your connector code base with the following command:

xchange connector new --name ExampleConnector

The created "Connector" folder and solution file will organize your work. Before you can run any more xchange commands you must first change your directory to the Connector folder.

cd Connector

In this directory you'll also find a settings.json file. The name and description of the connector will be visible on the platform, so make sure those fields are configured before you submit. When you submit your code, the field url-part must correspond to a connector key provided by Trimble App Xchange which you may see referenced elsewhere - at first the value is automatically generated based on the connector name.

Once you've established your connector, you will want a module to organize endpoints. Most connectors need only one module. You may want to consider multiple modules if you have multiple products, services, authorization scopes, and/or base URLs. Multiple modules have the benefit of breaking up your Connector and each module will be viewable on App Xchange to help the end user find what they're looking for. You can think of modules as directories to organize similar resources. Remember the ideal connector is agnostic about the products it will eventually integrate with.

To create your first module for your Connector you can run the following example command:

xchange module new --id app-1 --name App --key app --version 1
Info

xchange commands should be ran in the working directory of your Connector project or with the --connector-path option supplied.

This example will create a new module named App, and populate settings.json, which once again will be used to display the name and description to the user on the platform. From here you can relate data objects to it.