update_asset_language
Reassign an asset's language; may trigger AI reprocessing (captions/transcription).
update_asset_language
Reassign an asset's language; may trigger AI reprocessing (captions/transcription).
Reassign the asset's language (may kick off AI reprocessing).
Safety class: A · API type: admin · Min version: —
Confinementasset_id must be within your run-root anchor.
Signatures
def update_asset_language(sdk, asset_id, language_id):
"""Set asset_id's language to language_id; return the response dict or None."""
return sdk.update_asset_language(asset_id, language_id)export async function updateAssetLanguage(sdk, assetId, languageId) {
// Reassign the asset's language (may kick off AI reprocessing).
return await sdk.updateAssetLanguage(assetId, languageId);
}Parameters
| Parameter (Python) | Parameter (JS) | Type | Required | Notes |
|---|---|---|---|---|
sdk | sdk | Nomad_SDK | yes | |
asset_id | assetId | str | yes | e.g. <asset-uuid> |
language_id | languageId | str | yes | a valid platform language id |
Returns
dict | None — updated asset info; None on failure.
Errors
- 401 unauthenticated
- 404 asset/language not found
Notes
Obtaining a language_id
language_idThere is no list-languages SDK verb. The real-world pattern is to search the Languages
content definition and read the matching record's id:
# component: search. languages_content_definition_id is the stable platform
# content definition for languages (per-deployment; discover once and reuse).
def find_language_id(sdk, languages_content_definition_id, display_name):
"""Return the language id whose displayName matches, or None."""
flt = [{"fieldName": "contentDefinitionId", "operator": "Equals",
"values": languages_content_definition_id}]
items = (search(sdk, filters=flt, size=200) or {}).get("items", [])
for item in items:
if (item.get("identifiers") or {}).get("displayName") == display_name:
return item.get("id")
return NoneObtaining a languageId
languageIdThere is no list-languages SDK verb. The real-world pattern is to search the Languages
content definition and read the matching record's id:
// component: search. languagesContentDefinitionId is the stable platform
// content definition for languages (per-deployment; discover once and reuse).
export async function findLanguageId(sdk, languagesContentDefinitionId, displayName) {
const flt = [{ fieldName: "contentDefinitionId", operator: "Equals",
values: languagesContentDefinitionId }];
const res = await search(sdk, null, flt, null, 200);
const items = res ? res.items : [];
const match = items.find((i) => i.identifiers?.displayName === displayName);
return match ? match.id : null;
}See also: Python ↔ JS naming map · Return shapes.
