duplicate
Duplicate an asset into the same parent folder.
duplicate
Duplicate an asset into the same parent folder.
Create an exact copy of asset_id in its current parent folder.
Safety class: A · API type: admin · Min version: —
Confinement
asset_id must be within your run-root anchor; the duplicate inherits that parent, so it stays confined.
Signatures
def duplicate(sdk, asset_id):
"""Duplicate asset_id into the same parent; return {id} of the new asset."""
return sdk.duplicate_asset(asset_id)
export async function duplicate(sdk, assetId) {
// Exact copy in the original's parent folder.
return await sdk.duplicateAsset(assetId);
}
Parameters
| Parameter (Python) | Parameter (JS) | Type | Required | Notes |
|---|---|---|---|---|
sdk | sdk | Nomad_SDK | yes | |
asset_id | assetId | str | yes | e.g. <asset-uuid> |
Returns
dict | None — {id: new duplicate asset id}; the duplicate lands in the SAME parent folder as the original.
Errors
- 401 unauthenticated
- 404 asset not found
See also: Python ↔ JS naming map · Return shapes.
