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 presentns.list("/123456", (err, res, body) => {
if (!err) console.log(body?.list.file.length);
});npx akamai-netstorage list static --max-entries 1000Signatures
listAsync(opts: DirListOpts | string): Promise<ListResponse>
list(opts: DirListOpts | string, callback: (err: any, res?: http.IncomingMessage, body?: ListResponse) => void): void
Parameters
| Name | Type | Description |
|---|---|---|
opts | string | DirListOpts | A 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 method | GET |
| X-Akamai-ACS-Action | version=1&action=list&format=xml |
| Signed with | X-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256) |
| CLI | akamai-netstorage list static --max-entries 1000 |
Build and sign this request in the playground →
Notes
- Names in the result are full paths relative to the CP code root.
- Each
listcall counts as 10 reads toward NetStorage's rate limits.