Skip to content

Function: getAllDataStoreFiles()

ts
function getAllDataStoreFiles(ctx: Context, params: {
  dataStoreId: string;
  sessionTokens?: string[];
}): Promise<DataStoreFileDownload[]>;

Defined in: src/data-store/index.ts:153

Get all files (latest versions) from a data store.

Parameters

ParameterTypeDescription
ctxContextCurrent execution context.
params{ dataStoreId: string; sessionTokens?: string[]; }Query parameters.
params.dataStoreIdstringThe ID of the data store.
params.sessionTokens?string[]Optional session tokens.

Returns

Promise<DataStoreFileDownload[]>

All file downloads in the data store.

Example

ts
const files = await getAllDataStoreFiles(ctx, { dataStoreId: 'store-123' });
for (const file of files) {
  console.log(file.name, file.url);
}

Matterway Assistant SDK Documentation