create_asset_builder_template

imerit_ango.sdk.SDK.

create_asset_builder_template(project_id, template)

Create templates to be used while uploading data via the asset builder.

Parameters

  • project_id: string

  • template: AssetBuilderTemplate

    An object defining the structure of the template, excluding the _id field. Includes:

    • name: string

      • The display name of the Asset Builder template.

    • template: string

      • Template HTML that will be filled in while uploading via asset builder.

    • external_id_column: string

      • The column name from the input tabular data to be used as the asset's externalId. In each row, the value in the cell corresponding to this column will be used as the externalId for that row.

    • data_config: Dict[str, DataConfigItem]

      Dictionary mapping column names to their configuration. Each DataConfigItem contains:

      • type: string - The data type for this column. Must be one of:

        • "text", "link", "image", "audio", "video", "iframe", "pdf"

      • storage: string, Optional, default None - Storage configuration for this column. Only necessary when the type is one of: video, image, audio, or pdf.

      • include_in_export: string, Optional, default False - Whether to include this column in exports

    • description: string, Optional, default ""

      • A description of what the template does or what it is.

    • batch_column: string, Optional, default ""

      • Batch column name from the input tabular data to be used as the batch name for that asset. In each row, the value in the cell corresponding to this column will be used as the batch name for that row.

    • pre_label_config: PreLabelConfig

      Dictionary containing pre-labeling configuration. Each item contains:

      • cla: PreLabelCla - Classification configuration with fields:

        • schemaId: string - Schema identifier

        • title: string - Display title

        • multiple: bool - Whether multiple selections are allowed

      • value: string - Column that will be used as the source of pre-label data

Returns

  • A dictionary containing the result of the operation.

  • Including a status field indicating whether the request was successful and a data field containing the response payload with updated resources produced by the operation.

How to verify in Ango Hub?

After successfully executing the create_asset_builder_template function, you can validate the changes directly in Ango Hub.

Navigate to: Projects → [Your Project] → Assets → Add Data → Asset Builder

  • Upload a CSV file and proceed to the Rich Text Editor step.

  • Open the Select Template dropdown.

  • Confirm that the newly created template appears in the list.

Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.

Example

Basic Template (minimal required fields)

Sample CSV File

Comprehensive Template (all optional fields)

Sample CSV File

Template with Batch Processing

Sample CSV File

Sample CSV File

Last updated