Data source detail
The per-source view: connection status, last-sync metadata, error log, and the manual sync / pause / config controls a data operator needs.
Data source detail
Open any source at Data → Sources → to see its live connection
state and the controls an operator needs. The page reads
GET /v1/data/sources/{id} and mutates through the same source endpoints —
there is no separate detail API.
What the page shows
- Status badge —
idle,syncing,error, ordisabled, straight off the row (erroris set when a sync fails). - Last sync — for Salesforce and HubSpot sources, the connector's last run: when it finished, records imported and updated, how it ended, and the run-log entry it came from. For a labeled sample source, its seeded figures marked Sample. For any other kind, a note saying no connector reads it yet and what to do instead; no count, and no Sync now button.
- Connection config — the editable
config_jsonfor the source'skind.
Run history belongs to the connector
Run history lists the connector's recent runs from integration_sync_logs
(GET /v1/data/sources/{id}/runs), newest first: when each started, how long it
took, how it ended, the records it moved and its run-log entry. Runs belong to
the connection, not the source row, so every source of the same kind lists the
same runs. A run still in flight shows no count until it finishes.
Controls
- 1
Manual sync
POST /v1/data/sources/{id}/syncstarts the connector's run (Salesforce and HubSpot sources only). While the run is in flight the page pollsGET /v1/data/sources/{id}every 3 seconds, and the count appears when the run finishes. See Data sources for what each answer means. - 2
Pause / resume
PATCH /v1/data/sources/{id}with{"status":"disabled"}pauses the source;{"status":"idle"}resumes it. A disabled source rejects sync requests. - 3
Edit connection config
PATCH /v1/data/sources/{id}with aconfigobject rewritesconfig_jsonin place — credentials and per-provider settings never change the row shape.
# Start a Salesforce source's sync, then read the measured result
curl -X POST https://api.pact.place/v1/data/sources/42/sync \
-H "Authorization: Bearer $PACT_API_KEY"
# → { "status": "queued", "records_ingested": null, "measured_by": "integration_sync_logs", … }
curl https://api.pact.place/v1/data/sources/42 \
-H "Authorization: Bearer $PACT_API_KEY"
# → { "last_records_count": 1204,
# "sync": { "state": "measured", "records_imported": 1100, "records_updated": 104,
# "measured_by": "integration_sync_logs:88", … }, … }
Cross-tenant lookups return 404, never 403 — every query is scoped to your
tenant, so an id that belongs to another tenant simply isn't found. (The {id}
path param is the internal integer id today; the routes type it as int, so a
UUID public_id is not yet accepted on this surface.)