Manage
rename POST
Rename or move a file.
await ns.renameAsync("/123456/static/app.js", "/123456/static/app.v2.js");ns.rename("/123456/a.txt", "/123456/b.txt", (err, res) => console.log(res?.statusCode));npx akamai-netstorage rename static/app.js static/app.v2.jsSignatures
renameAsync(ns_target: string, ns_destination: string): Promise<RenameResponse>
rename(ns_target: string, ns_destination: string, callback: (err: any, res?: http.IncomingMessage, body?: RenameResponse) => void): void
Parameters
| Name | Type | Description |
|---|---|---|
ns_target | string | Current path. |
ns_destination | string | New path. |
Returns
RenameResponse
parsed response body
On the wire
| HTTP method | POST |
| X-Akamai-ACS-Action | version=1&action=rename&destination=… |
| Signed with | X-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256) |
| CLI | akamai-netstorage rename static/app.js static/app.v2.js |
Build and sign this request in the playground →
Notes
- The destination is URL-encoded into the action header.