Both a command-line pair and REST endpoints exist:
# command line (Process Center profile, <install_root>/bin) - BPM 8.5.x / BAW
BPMExport.sh -containerAcronym ORD -containerSnapshotAcronym 2.3 -outputFile /backup/ORD-2.3.twx -user admin -password pw [-containerTrackAcronym Main to export the tip]
BPMImport.sh -inputFile /transfer/ORD-2.3.twx -user admin -password pw # imports app + bundled toolkits
# list what exists
BPMShowProcessApplication.sh -containerAcronym ORD -user admin -password pw
# BPMExport / BPMImport exist since 8.5.5
# REST (Process Center)
GET /rest/bpm/wle/v1/processApps -> apps, snapshots (ids)
GET /rest/bpm/wle/v1/project/{id}/snapshots -> snapshots per branch
GET /rest/bpm/wle/v1/processApps/export?snapshotId=2064.… -> twx download (BAW; on 8.5.x the export is console-only or BPMExport)
POST /rest/bpm/wle/v1/processApps/import -> multipart file=… (BAW)
# BAW 20+ Operations REST (works on Workflow Center too)
POST /ops/std/bpm/containers/install (multipart file=twx or installation package; installOnly=false imports into the repository)
POST /ops/std/bpm/containers/ORD/versions/2.3/offline_package?server=prod-offline -> zip for an offline serverNotes: export from the snapshot, not the tip, for reproducible backups; imported snapshots keep their ids, so re-importing the same package is idempotent (it is skipped as "already exists"); toolkits bundled in the export are imported when missing; the commands need the Process Center running and a tw_admins user; keep the twx files with the snapshot name and the Git commit of the pipeline in the file name. The exact REST paths for export / import moved between 8.5.7, 8.6 and BAW 20 - the safest automation on any traditional level is BPMExport / BPMImport; on BAW 20+ and CP4BA the Operations REST is the stable choice.
References