API Connections & Dynamic Databases#
This chapter covers advanced techniques for connecting your Hub to external data sources and building dynamic, automatically-updating content.
Tip
This chapter covers foundational patterns. Additional connection types and examples will be added as teams adopt them.
Overview#
Beyond manually uploading data, your Hub can connect to:
Source Type |
Description |
Use Case |
|---|---|---|
ArcGIS Server services |
Enterprise GIS layers |
Organizational data infrastructure |
External APIs |
REST endpoints |
Third-party data feeds |
Cloud databases |
PostgreSQL, SQL Server |
Operational databases |
Automated pipelines |
Scheduled data refresh |
Keep content current |
Referencing External Services#
Add a Service URL#
Sign in to
https://geowb.maps.arcgis.comGo to Content > My Content
Click New Item > URL
Enter the service URL
Select the item type (Map Service, Feature Service, etc.)
Complete metadata as with any item
Share to your Catalog Group
Important
Referenced services display data from the source — changes at the source appear immediately on your Hub. Ensure the source is reliable and maintained.
Supported Service Types#
Type |
URL Pattern |
Notes |
|---|---|---|
ArcGIS Feature Service |
|
Editable, queryable |
ArcGIS Map Service |
|
Read-only tiles |
OGC WFS |
|
Open standard |
OGC WMS |
|
Open standard |
GeoJSON |
|
Static or dynamic |
Automated Data Refresh#
Option 1: Overwrite Hosted Feature Layer#
For data that updates on a schedule:
Create a Python script to fetch and process data
Use ArcGIS API for Python to overwrite the layer
Schedule the script (Windows Task Scheduler, cron, or cloud function)
# Example: Overwrite a hosted feature layer
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
gis = GIS("https://geowb.maps.arcgis.com", "username", "password")
item = gis.content.get("item_id")
flc = FeatureLayerCollection.fromitem(item)
flc.manager.overwrite("path/to/updated_data.geojson")
Warning
Store credentials securely. Never commit passwords to version control. Use environment variables or secure credential storage.
Option 2: Living Atlas / External Tiles#
Some data sources provide continuously updated services:
Source |
Content |
How to Add |
|---|---|---|
Esri Living Atlas |
Global basemaps, imagery |
Search in AGOL, add to map |
OpenStreetMap |
Roads, buildings, POIs |
Reference OSM tile services |
Humanitarian Data |
Crisis data |
HDX API connections |
Database Connections#
ArcGIS Enterprise Geodatabase#
For organizations with ArcGIS Enterprise:
Register the database with ArcGIS Server
Publish as feature service
Reference in AGOL via service URL
Direct Database Queries#
For advanced use cases (dashboards, custom apps):
Approach |
Complexity |
Use Case |
|---|---|---|
ArcGIS Insights |
Medium |
Ad-hoc analysis |
Experience Builder |
Medium |
Custom data widgets |
Custom web app |
High |
Full control |
Best Practices#
Data Reliability#
Consideration |
Recommendation |
|---|---|
Source uptime |
Only reference reliable, maintained services |
Update frequency |
Document expected refresh rate |
Fallback plan |
Have static backup for critical data |
Performance#
Issue |
Solution |
|---|---|
Slow loading |
Use cached tile services for basemaps |
Large datasets |
Implement pagination or extent filtering |
Many concurrent users |
Consider dedicated hosting |
Security#
Requirement |
Approach |
|---|---|
Authentication |
Use token-based auth for secure services |
Sensitive data |
Never expose internal APIs publicly |
Credential management |
Use secure vaults, not plaintext |
Troubleshooting#
Issue |
Cause |
Solution |
|---|---|---|
Service not displaying |
CORS restrictions |
Check server configuration |
Data not updating |
Cache issues |
Clear browser/AGOL cache |
Authentication errors |
Expired tokens |
Refresh credentials |
Slow performance |
Large unoptimized data |
Add indexes, simplify geometry |