Backups API
Backups API

Backups API

Request, list, download, and delete site backup files via /api/rest/v4/backups. The backup identifier on the wire is the backup fileName. Large downloads stream through intapp-rest-client. On failure, error bodies may be surfaced on HttpError (see Error handling).

💡

request_backup may require ids and/or api_names (object lists) so the API knows what to include—otherwise some sites return 400 (e.g. “select at least one list or binary”). Pass the objects you need in the backup.

request_backup()

from dealcloud_sdk import DealCloud, DealCloudConfig
 
config = DealCloudConfig(
    siteUrl="yoursite.dealcloud.com",
    clientId=12345,
    clientSecret="your-secret",
)
dc = DealCloud.from_config_object(config)
 
# Site-specific: include at least one scope when required
resp = dc.request_backup(api_names=["Company", "Contact"])

Returns the API response body (often minimal; some servers return 204).

list_backups()

Returns a normalized list of {"name", "link"} rows (SAS or HTTPS URLs for download):

rows = dc.list_backups()
for row in rows:
    print(row["name"], row["link"][:48], "...")

download_backup()

Typical flow: get a link from list_backups(), then download by URL (OAuth skipped for SAS):

rows = dc.list_backups()
link = rows[0]["link"]
 
path = dc.download_backup(
    output_path="./site_backup.zip",
    download_link=link,
)

Or resolve by file_name (looks up the link from list_backups(), or uses GET .../backups/{fileName} when needed):

path = dc.download_backup(
    output_path="./site_backup.zip",
    file_name="backup-2025-01-15.zip",
)

delete_backup()

dc.delete_backup("backup-2025-01-15.zip")

Operational notes

  • request_backup uses post_no_retry429 so daily quota HTTP 429 responses are not retried blindly.
  • For very large zips, rely on streaming downloads and a sufficient client timeout.

Related