Connections
A connection is one link to an outside system. Data comes in from it, goes out to it, or both, on its own schedule and with its own credentials.
Adding a connection
On the category it serves, open ⋯ › New connection here and pick the kind. The window that opens asks only what that kind needs: an address, a schedule, a query, a folder, and its credentials.
The kinds each category takes:
| Category | Kinds |
|---|---|
| Map | ArcGIS, OGC API Features / WFS, Census (Statistics Canada) |
| Assets & inventory | JSON feed, Geotab telematics, Inbound push, Supplier |
| Charges | Stripe account |
| Website / CMS | Website (WordPress or Drupal), News / RSS feed |
| System – Communications | Webhook |
| System – Files & storage | PostgreSQL / PostGIS table, Microsoft SQL Server table, PostgreSQL write, SQL Server write, File drop |
| System – Security | API access, Master system |
A connection that reads from a database runs your query on its schedule and brings the rows in. Point it at a read-only database user.
A Master system connection names the areas another system masters, such as assets, work or charges. Each request raised for those areas goes to that system, and its answer comes back on the request. See Requests.
Save writes the connection. A new key or code the connection issues shows once, with Copy this key now. It is shown once.
Credentials
Credentials lists the secrets a connection holds: a password, a token, an API key, a client secret. Each reads saved or none saved. A saved secret never shows again. Replace sets a new one.
Pairing a website
A Website (WordPress or Drupal) connection pairs with the Aptli plugin on that site.
- Save the connection, then Generate code.
- On the website's admin, open the plugin's Hub page and enter the code.
A code works once and expires in 10 minutes. New pairing code, in the connection's ⋯, issues another and cancels any earlier one. Once paired, the site sends a copy of each post whenever it is saved. See Website articles.
Syncing map layers with ArcGIS
An ArcGIS connection is one ArcGIS instance and its sign-in. Each layer it keeps in step with Aptli is a row under the connection.
- Save the connection with its address, its client ID, its token address and its client secret.
- On the connection's row in the window, open ⋯ › Add a layer.
- Enter Their layer's address: the address of the layer itself, ending in
/FeatureServer/and its number. - Pick Our layer and Save.
Each layer has its own field map. For each field, Theirs (remote wins), Ours (never overwritten) or Shared says who owns it. Aptli refuses a change to a field ArcGIS owns, on Save.
A change made on the map goes to ArcGIS after it is published, on the connection's next sync. A change made in ArcGIS arrives on that same sync. Sync now runs one at once.
Aptli matches each feature to its ArcGIS row by GlobalID. A layer with no GlobalIDs is matched by OBJECTID.
A layer takes one outside system. Aptli refuses a second connection on a layer that already has one.
Having ArcGIS call Aptli when a layer changes
The connection shows Their webhook, an address. A webhook in ArcGIS that calls it starts a sync as soon as a layer is edited.
- On the connection, Generate the webhook secret and copy it. It is shown once.
- In ArcGIS, create a webhook on the feature service.
- Set its hook URL to the address under Their webhook.
- Set its signature key to the webhook secret.
- Choose the feature events to send, then activate the webhook.
ArcGIS Enterprise signs feature service webhooks from version 11.2.
An OGC API Features / WFS connection works the same way, with one row per collection. Edits go back through the connection's WFS endpoint, and each layer names its feature type. Its webhook sends the secret as a bearer key.
Status
A connection's window shows its Status:
- what it does, in a sentence, such as "Your system sends data to Aptli over push";
- Rules can listen for: the events it raises;
- Rules can act through it: what a rule can do with it;
- Used by: the rules and records that use it.
Send a test checks the connection end to end and says Test passed or Test failed with the reason. A push connection with nothing received yet says so: the first batch it sends appears in Activity.
Deleting a connection
⋯ › Delete stops its schedule. A push connection's key is retired with it.