History API
History API

History API

The SDK exposes three History-related patterns that match the public API:

  1. get_history()GET .../entrydata/{entryTypeId}/entries/history (or allHistory) — entries modified or deleted since modified_since.
  2. get_historical_data()POST .../entrydata/getHistoricalData — row values as of a point in time.

HTTP is via intapp-rest-client. See the DealCloud docs for History / All History (opens in a new tab) and Historical data (opens in a new tab).

💡

get_history() returns entry-level change lists (IDs, deletion flags, etc.), not a per-field audit log. For “what did this field look like last Tuesday?”, use get_historical_data() with an as_of_date.

get_history()

from datetime import datetime, timedelta
from dealcloud_sdk import DealCloud, DealCloudConfig
 
config = DealCloudConfig(
    siteUrl="yoursite.dealcloud.com",
    clientId=12345,
    clientSecret="your-secret",
)
dc = DealCloud.from_config_object(config)
 
since = datetime.now() - timedelta(days=1)
 
# Excludes rows touched only by calculations/system triggers
changes = dc.get_history("Company", modified_since=since, include_calculations=False)
 
# Include calculation/system-driven updates
all_changes = dc.get_history("Company", modified_since=since, include_calculations=True)
 
# Only deleted rows (client-side filter on isDeleted)
deleted = dc.get_history("Company", modified_since=since, deleted_only=True)

modified_since is required. Deleted entries are only returned when modified_since is set (API limits apply, e.g. six months for deletes—see product docs).

get_historical_data()

Point-in-time snapshot for one or more entries:

from datetime import datetime
 
rows = dc.get_historical_data(
    object_id="Company",
    entry_ids=[12345, 12346],
    as_of_date=datetime(2024, 6, 1, 12, 0, 0),
    fields=["12", "34"],  # optional: field ids as strings
    wrap_into_arrays=True,
)

Optional date_time_behavior accepts DateTimeBehavior.UTC, DateTimeBehavior.LOCAL, or 0/1/"UTC"/"Local"—see the SDK enum in dealcloud_sdk.history.dealcloud_history.

Relationship to delta sync

Delta sync uses get_modified_entries() (entry list history endpoint). get_history() hits the entries/history / entries/allHistory routes instead—pick the workflow that matches your integration and API permissions.

Related