[{"data":1,"prerenderedAt":460},["ShallowReactive",2],{"guide:en:automations\u002Fconnections":3},{"id":4,"title":5,"body":6,"description":452,"extension":453,"meta":454,"navigation":455,"path":456,"seo":457,"stem":458,"__hash__":459},"guide_en\u002Fguides\u002Fen\u002Fuser\u002Fautomations\u002Fconnections.md","Connections",{"type":7,"value":8,"toc":439},"minimark",[9,13,17,22,30,33,171,174,186,195,199,216,220,225,242,257,261,267,299,312,319,322,325,330,337,367,370,379,383,389,413,429,433],[10,11,5],"h1",{"id":12},"connections",[14,15,16],"p",{},"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.",[18,19,21],"h2",{"id":20},"adding-a-connection","Adding a connection",[14,23,24,25,29],{},"On the category it serves, open ",[26,27,28],"strong",{},"⋯ › 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.",[14,31,32],{},"The kinds each category takes:",[34,35,36,49],"table",{},[37,38,39],"thead",{},[40,41,42,46],"tr",{},[43,44,45],"th",{},"Category",[43,47,48],{},"Kinds",[50,51,52,72,93,105,120,132,156],"tbody",{},[40,53,54,60],{},[55,56,57],"td",{},[26,58,59],{},"Map",[55,61,62,65,66,65,69],{},[26,63,64],{},"ArcGIS",", ",[26,67,68],{},"OGC API Features \u002F WFS",[26,70,71],{},"Census (Statistics Canada)",[40,73,74,79],{},[55,75,76],{},[26,77,78],{},"Assets & inventory",[55,80,81,65,84,65,87,65,90],{},[26,82,83],{},"JSON feed",[26,85,86],{},"Geotab telematics",[26,88,89],{},"Inbound push",[26,91,92],{},"Supplier",[40,94,95,100],{},[55,96,97],{},[26,98,99],{},"Charges",[55,101,102],{},[26,103,104],{},"Stripe account",[40,106,107,112],{},[55,108,109],{},[26,110,111],{},"Website \u002F CMS",[55,113,114,65,117],{},[26,115,116],{},"Website (WordPress or Drupal)",[26,118,119],{},"News \u002F RSS feed",[40,121,122,127],{},[55,123,124],{},[26,125,126],{},"System – Communications",[55,128,129],{},[26,130,131],{},"Webhook",[40,133,134,139],{},[55,135,136],{},[26,137,138],{},"System – Files & storage",[55,140,141,65,144,65,147,65,150,65,153],{},[26,142,143],{},"PostgreSQL \u002F PostGIS table",[26,145,146],{},"Microsoft SQL Server table",[26,148,149],{},"PostgreSQL write",[26,151,152],{},"SQL Server write",[26,154,155],{},"File drop",[40,157,158,163],{},[55,159,160],{},[26,161,162],{},"System – Security",[55,164,165,65,168],{},[26,166,167],{},"API access",[26,169,170],{},"Master system",[14,172,173],{},"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.",[14,175,176,177,179,180,185],{},"A ",[26,178,170],{}," 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 ",[181,182,184],"a",{"href":183},"\u002Fguides\u002Frequests","Requests",".",[14,187,188,191,192],{},[26,189,190],{},"Save"," writes the connection. A new key or code the connection issues shows once, with ",[26,193,194],{},"Copy this key now. It is shown once.",[18,196,198],{"id":197},"credentials","Credentials",[14,200,201,203,204,207,208,211,212,215],{},[26,202,198],{}," lists the secrets a connection holds: a password, a token, an API key, a client secret. Each reads ",[26,205,206],{},"saved"," or ",[26,209,210],{},"none saved",". A saved secret never shows again. ",[26,213,214],{},"Replace"," sets a new one.",[18,217,219],{"id":218},"pairing-a-website","Pairing a website",[14,221,176,222,224],{},[26,223,116],{}," connection pairs with the Aptli plugin on that site.",[226,227,228,235],"ol",{},[229,230,231,232,185],"li",{},"Save the connection, then ",[26,233,234],{},"Generate code",[229,236,237,238,241],{},"On the website's admin, open the plugin's ",[26,239,240],{},"Hub"," page and enter the code.",[14,243,244,245,248,249,252,253,185],{},"A code works once and expires in 10 minutes. ",[26,246,247],{},"New pairing code",", in the connection's ",[26,250,251],{},"⋯",", issues another and cancels any earlier one. Once paired, the site sends a copy of each post whenever it is saved. See ",[181,254,256],{"href":255},"\u002Fguides\u002Faddons\u002Fwebsite-articles","Website articles",[18,258,260],{"id":259},"syncing-map-layers-with-arcgis","Syncing map layers with ArcGIS",[14,262,263,264,266],{},"An ",[26,265,64],{}," connection is one ArcGIS instance and its sign-in. Each layer it keeps in step with Aptli is a row under the connection.",[226,268,269,272,278,290],{},[229,270,271],{},"Save the connection with its address, its client ID, its token address and its client secret.",[229,273,274,275,185],{},"On the connection's row in the window, open ",[26,276,277],{},"⋯ › Add a layer",[229,279,280,281,284,285,289],{},"Enter ",[26,282,283],{},"Their layer's address",": the address of the layer itself, ending in ",[286,287,288],"code",{},"\u002FFeatureServer\u002F"," and its number.",[229,291,292,293,296,297,185],{},"Pick ",[26,294,295],{},"Our layer"," and ",[26,298,190],{},[14,300,301,302,65,305,207,308,311],{},"Each layer has its own field map. For each field, ",[26,303,304],{},"Theirs (remote wins)",[26,306,307],{},"Ours (never overwritten)",[26,309,310],{},"Shared"," says who owns it. Aptli refuses a change to a field ArcGIS owns, on Save.",[14,313,314,315,318],{},"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. ",[26,316,317],{},"Sync now"," runs one at once.",[14,320,321],{},"Aptli matches each feature to its ArcGIS row by GlobalID. A layer with no GlobalIDs is matched by OBJECTID.",[14,323,324],{},"A layer takes one outside system. Aptli refuses a second connection on a layer that already has one.",[326,327,329],"h3",{"id":328},"having-arcgis-call-aptli-when-a-layer-changes","Having ArcGIS call Aptli when a layer changes",[14,331,332,333,336],{},"The connection shows ",[26,334,335],{},"Their webhook",", an address. A webhook in ArcGIS that calls it starts a sync as soon as a layer is edited.",[226,338,339,346,349,358,364],{},[229,340,341,342,345],{},"On the connection, ",[26,343,344],{},"Generate"," the webhook secret and copy it. It is shown once.",[229,347,348],{},"In ArcGIS, create a webhook on the feature service.",[229,350,351,352,355,356,185],{},"Set its ",[26,353,354],{},"hook URL"," to the address under ",[26,357,335],{},[229,359,351,360,363],{},[26,361,362],{},"signature key"," to the webhook secret.",[229,365,366],{},"Choose the feature events to send, then activate the webhook.",[14,368,369],{},"ArcGIS Enterprise signs feature service webhooks from version 11.2.",[14,371,263,372,374,375,378],{},[26,373,68],{}," connection works the same way, with one row per collection. Edits go back through the connection's ",[26,376,377],{},"WFS endpoint",", and each layer names its feature type. Its webhook sends the secret as a bearer key.",[18,380,382],{"id":381},"status","Status",[14,384,385,386,388],{},"A connection's window shows its ",[26,387,382],{},":",[390,391,392,395,401,407],"ul",{},[229,393,394],{},"what it does, in a sentence, such as \"Your system sends data to Aptli over push\";",[229,396,397,400],{},[26,398,399],{},"Rules can listen for",": the events it raises;",[229,402,403,406],{},[26,404,405],{},"Rules can act through it",": what a rule can do with it;",[229,408,409,412],{},[26,410,411],{},"Used by",": the rules and records that use it.",[14,414,415,418,419,207,422,425,426,185],{},[26,416,417],{},"Send a test"," checks the connection end to end and says ",[26,420,421],{},"Test passed",[26,423,424],{},"Test failed"," with the reason. A push connection with nothing received yet says so: the first batch it sends appears in ",[26,427,428],{},"Activity",[18,430,432],{"id":431},"deleting-a-connection","Deleting a connection",[14,434,435,438],{},[26,436,437],{},"⋯ › Delete"," stops its schedule. A push connection's key is retired with it.",{"title":440,"searchDepth":441,"depth":441,"links":442},"",2,[443,444,445,446,450,451],{"id":20,"depth":441,"text":21},{"id":197,"depth":441,"text":198},{"id":218,"depth":441,"text":219},{"id":259,"depth":441,"text":260,"children":447},[448],{"id":328,"depth":449,"text":329},3,{"id":381,"depth":441,"text":382},{"id":431,"depth":441,"text":432},"Connecting Aptli to other systems: the kinds of connection in each category, credentials, pairing a website, sending a test and reading a connection's status.","md",{},true,"\u002Fguides\u002Fen\u002Fuser\u002Fautomations\u002Fconnections",{"title":5,"description":452},"guides\u002Fen\u002Fuser\u002Fautomations\u002Fconnections","fbu3syohLf_yzd2qrPTsJtn37rWV_3hHhplX45hllVQ",1793063446011]