Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / operations/jobs / siteArchiveExportToBuffer

Function: siteArchiveExportToBuffer()

siteArchiveExportToBuffer(instance, dataUnits, options): Promise<SiteArchiveExportResult & object>

Defined in: packages/b2c-tooling-sdk/src/operations/jobs/site-archive.ts:528

Exports a site archive and downloads it to memory.

Runs the export job on the instance, downloads the archive via WebDAV, and returns the data as a Buffer. Optionally keeps the archive on the instance.

Parameters

instance

B2CInstance

B2C instance to export from

dataUnits

Partial<ExportDataUnitsConfiguration>

Data units configuration specifying what to export

options

SiteArchiveExportOptions & object = {}

Export and download options

Returns

Promise<SiteArchiveExportResult & object>

Export result with archive data buffer

Example

typescript
const result = await siteArchiveExportDownload(instance, {
  global_data: { meta_data: true }
});
const zip = await JSZip.loadAsync(result.data);

Released under the Apache-2.0 License.