Alo Files

SharePoint sync

Learn how a SharePoint sync source imports files into Alo Files and what happens when SharePoint or the connection changes.

A SharePoint sync source imports files and folders from SharePoint into an Alo Files workspace through a Central Hub SharePoint connection. Alo Files stores the content in its workspace and keeps the remote mapping, so the files are searchable and usable as Agent knowledge.

How it works

  • A source starts from a SharePoint connection in Central Hub, created or re-authenticated there.
  • The source names a site, a drive (document library), and file or folder roots, and is created with POST /connector-syncs/sharepoint and a destination folder.
  • GET /contents lists the imported files and folders with their sync and ingestion status.
  • A source is refreshed with the connector-sync endpoints when needed; each refresh is a run you can poll.
SituationBehavior
The connection needs re-authenticationSyncing returns 409 with details.reason sharepoint_reconnect_required. Reconnect the Central Hub connection, or sync with replacement_connection_id set to another SharePoint connection that can read the same site and drive.
Item deleted remotelyThe item is listed in the source's pending_deletions; keep the imported item as a local copy, or delete it from Alo Files.
Another member syncs your sourceRefused with 409 and details.reason sharepoint_connection_required: a source is private to the person who created it, though its imported files are visible to the workspace.

Boundaries

  • A sync source is not a SharePoint connection of its own: imports reuse the Central Hub connection, so reconnecting happens in Central Hub.
  • Source-managed items are not reorganized locally: renaming or moving one in Alo Files returns 409 with details.reason managed_by_sync, because the remote hierarchy is authoritative.

Reference

Endpoints

ActionEndpointBodyReturnsAuth
Create a sourcePOST /connector-syncs/sharepointSee Create body202 {sync, run}Key or bearer
List your sourcesGET /connector-syncsNoneList of sourcesKey or bearer
Get a sourceGET /connector-syncs/{sync_id}NoneSourceKey or bearer
Sync a sourcePOST /connector-syncs/{sync_id}/syncOptional {replacement_connection_id}202, runKey or bearer
Sync all your sourcesPOST /connector-syncs/sync-allNone202 {runs}Key or bearer
Get a runGET /connector-sync-runs/{run_id}NoneRunKey or bearer
Resolve remote deletionsPOST /connector-syncs/{sync_id}/resolve-deletions{"items": [{"sync_item_id", "action"}]}{deleted, kept}Key or bearer
Delete a sourceDELETE /connector-syncs/{sync_id}?files=keepNone204Key or bearer
  • POST /connector-syncs/{sync_id}/sync takes an optional ?remote_item_id= to sync one item of the source. If the source already has an active run, you get that run.
  • POST /connector-syncs/sync-all skips sources whose connection cannot be used.
  • A run has state, last_error, and counts: added, changed, unchanged, moved, unsupported, failed, deleted, pending_deletion.
  • In resolve-deletions, action is keep or delete, and each sync_item_id must come from the source's pending_deletions (400 otherwise).
  • Deleting a source with files=keep (the default) leaves the imported files and folders in place; files=delete deletes them too.
  • Other members get 404 from every endpoint for your source, except sync, which returns 409 sharepoint_connection_required.

Create body

FieldDescription
connection_idThe Central Hub SharePoint connection
site_idThe SharePoint site
drive_idThe drive (document library) in that site
rootsItems to import: at least one, each item_id unique, [{"item_id": "…", "kind": "file"}] with kind file or folder
parent_idOptional destination folder ID, root, or null; the folder must be visible to the whole workspace (400 otherwise)

Creating with a connection that needs re-authentication returns 403.

Errors

Statusdetails.reasonWhen
409sharepoint_reconnect_requiredThe source's connection needs re-authentication and no replacement_connection_id was sent
409sharepoint_connection_requiredYou sync a source another member created
409managed_by_syncYou rename or move an imported file or folder
409file_not_readyYou request a download link for a file that is still being imported
503None; details.retryable is trueThe run could not be scheduled; retry

On this page