Boffin Codersts-netstorageapi-akamaiby Boffin Coders

Browse

list GET

List files recursively, with a marker to resume long listings.

const { list } = await ns.listAsync({ path: "/123456", actions: { max_entries: "1000" } });
list.file.forEach((f) => console.log(f.name, f.size));
const next = list.resume?.[0]?.start; // continue from here when present

Signatures

listAsync(opts: DirListOpts | string): Promise<ListResponse>
list(opts: DirListOpts | string, callback: (err: any, res?: http.IncomingMessage, body?: ListResponse) => void): void

Parameters

NameTypeDescription
optsstring | DirListOptsA path, or { path, actions } with max_entries, end, encoding or mtime_all.

Returns

ListResponse

{ list: { file: [{ type, name, size, md5, mtime }], resume: [{ start }] } }

On the wire

HTTP methodGET
X-Akamai-ACS-Actionversion=1&action=list&format=xml
Signed withX-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256)
CLIakamai-netstorage list static --max-entries 1000

Build and sign this request in the playground →

Notes

← dirdu →