API reference
Data Source
The replication framework. Configure external data sources, sync data into the engine’s database, and query replicated records — without live API calls during scheduling.
Key points
- External system data is replicated into the engine’s database, not proxied through live API calls
- Adapters are pre-built integrations (NetSmart CRM, Outlook, custom REST APIs); each registers with the engine
- Sync runs in three modes: initial-load (full), incremental (delta), and replicate (USS-internal)
- Schedulers register cron-based recurring syncs; one-off syncs are also supported
About data sources
The Data Source API exposes the engine’s replication framework. External data — patient records, calendar events, GPS feeds — gets replicated into the engine’s database ahead of time. Scheduling decisions read locally, never live.
See the integrations framework for the architectural reasoning. The endpoints below are the operational surface — most teams configure once and let the engine sync automatically, but the manual operations are useful for debugging, backfills, and one-off imports.
Configuration
Eight endpoints for inspecting and configuring data sources.
List registered adapters
/api/v1/data-source/adaptersList all adapter factories registered with the engine. Adapters are the building blocks for data sources.
Responses
200Names of all registered adapters{
"adapters": [
"netsmart_crm",
"outlook_calendar",
"google_maps",
"test_source"
]
}Load configuration
/api/v1/data-source/configureConfigure data sources from template JSON. Reads the data source section of a template and applies it.
Request body
Either inline configuration or a templateId reference. Most production setups use templates.
{
"templateId": "home_care_v1",
"sources": [
{
"name": "netsmart_crm",
"type": "rest_api",
"config": {
"baseUrl": "https://api.netsmart.example",
"authType": "oauth2",
"syncInterval": "PT15M"
}
}
]
}Responses
200Data sources configured successfullyParse config (dry-run)
/api/v1/data-source/parse-configParse a template config without applying it. Useful for validating configuration before deployment.
Responses
200Parsed config returned without changesFetch directly
/api/v1/data-source/fetchFetch directly from an adapter. Bypasses replication; useful for testing adapter configuration.
Responses
200Data fetched from the adapterAdapter health
/api/v1/data-source/healthHealth check across all configured adapters. Returns per-adapter status.
Responses
200Health status for all adaptersConfiguration summary
/api/v1/data-source/statusCurrent data source configuration summary.
Responses
200Configuration summary with active source count{
"configured": [
{
"name": "netsmart_crm",
"type": "rest_api",
"status": "active",
"lastSyncAt": "2026-04-26T15:00:00Z"
}
],
"totalSources": 3,
"activeSources": 3
}List templates with data sources
/api/v1/data-source/templatesList non-deprecated templates that include data source configuration sections.
Responses
200List of templates with data source metadataReplicated data
Four endpoints for working with replicated records — the snapshot of external data that lives in the engine’s database.
Upsert single record
/api/v1/data-source/replicated-dataUpsert a replicated data record. Creates if new, updates if existing (matched by external system + ID).
Request body
Required: recordType, externalSystemName, externalRecordId, data. Optional: parentEntityId to link to a USS entity.
{
"recordType": "patient",
"externalSystemName": "netsmart_crm",
"externalRecordId": "PT-9001",
"parentEntityId": "ent_pt_9001",
"data": {
"firstName": "Mary",
"lastName": "Johnson",
"carePlanId": "CP-114782"
}
}Responses
201Record upserted successfullyBulk upsert
/api/v1/data-source/replicated-data/bulkUpsert many replicated records in one call. Each item processes independently with per-item status.
Responses
200Bulk upsert completed; check per-item resultsQuery records
/api/v1/data-source/replicated-dataQuery replicated records by type and optional parent entity.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
recordTypestringFilter by replicated record type
parentEntityIdUUIDFilter to records linked to a specific entity
Responses
200Matching replicated recordsLook up by external ID
/api/v1/data-source/replicated-data/lookupLook up a single record by its external system name and external record ID.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
externalSystemNamestringrequiredSource system name
externalRecordIdstringrequiredRecord ID in the external system
Responses
200Replicated record (null if not found)Sync operations
Nine endpoints for triggering and managing sync. Most production flows use scheduled incremental sync; the manual operations are for backfills, debugging, and one-off imports.
Sync engine status
/api/v1/data-source/sync/statusGet the SyncEngine’s current state — running flag, polling info, last sync timestamps.
Responses
200SyncEngine statusStart unified sync
/api/v1/data-source/sync/startStart sync based on template configuration. Runs initial load if needed and registers incremental schedulers.
Headers
x-organization-idUUIDrequiredOrganization scope
Responses
200Sync started based on template configurationInitial load
/api/v1/data-source/sync/initial-loadRun a full initial data extraction. Use for first-time sync or when forcing a complete refresh.
Headers
x-organization-idUUIDrequiredOrganization scope
Responses
200Initial load completed with summaryIncremental sync (one-off)
/api/v1/data-source/sync/incrementalRun a one-off incremental delta sync. Pulls changes since last sync timestamp.
Headers
x-organization-idUUIDrequiredOrganization scope
Responses
200Incremental sync completed with summary{
"summary": {
"source": "netsmart_crm",
"recordsProcessed": 247,
"recordsCreated": 12,
"recordsUpdated": 235,
"recordsFailed": 0,
"durationMs": 8243
}
}Schedule incremental sync
/api/v1/data-source/sync/incremental/scheduleRegister an automatic cron-based incremental sync for a source.
Headers
x-organization-idUUIDrequiredOrganization scope
Request body
Cron expression and source name. Standard cron syntax (5-field).
{
"sourceName": "netsmart_crm",
"cronExpression": "*/15 * * * *",
"enabled": true
}Responses
200Incremental scheduler registeredList schedulers
/api/v1/data-source/sync/schedulersList all active incremental cron schedulers.
Responses
200List of active schedulersFlush stale schedulers
/api/v1/data-source/sync/schedulersRemove stale or unused cron schedulers. Use during cleanup or when reconfiguring sync.
Responses
200Schedulers removed successfullyReplicate to domain tables
/api/v1/data-source/sync/replicateReplicate from internal source tables to the USS domain tables. The final step in the sync pipeline that maps replicated data into entity records.
Headers
x-organization-idUUIDrequiredOrganization scope
Responses
200Replication completed with summaryVerify replicated data
/api/v1/data-source/sync/verifyVerify replicated data in target tables. Useful for post-sync sanity checks and reconciliation.
Headers
x-organization-idUUIDrequiredOrganization scope
Responses
200Verification resultsTest source helpers
/api/v1/data-source/sync/seed-sourceSeed test_source tables with sample data. Development and testing only — not for production use.
Responses
200Source data seeded successfullySync operations affect production data