index_asset
(Re)index an asset into the search index.
index_asset
(Re)index an asset into the search index.
(Re)index a confined asset into the search index.
Safety class: C · API type: admin · Min version: —
ConfinementClass C: writes into the GLOBAL search index. Only index a confined asset (under your run-root); deleting the asset in teardown removes it from the index. Non-prod only.
Signatures
def index_asset(sdk, asset_id):
"""(Re)index asset_id into the search index; return the result dict or None."""
return sdk.index_asset(asset_id)export async function indexAsset(sdk, assetId) {
// (Re)index a confined asset into the search index.
return await sdk.indexAsset(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 — index result; None on failure.
Errors
- 401 unauthenticated
- InvalidAPITypeException on a non-admin session
- 404 asset not found
See also: Python ↔ JS naming map · Return shapes.
