assign_batches
imerit_ango.sdk.SDK.
assign_batches(project_id, asset_ids, batches)
Assign a list of assets to one or more existing batches within your project.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projectsfunction.
asset_ids: List[str]
List of asset IDs that will be assigned to the specified batches. Asset IDs can be obtained from the UI, or from
get_assetsfunction.Example:
['0000000aa0a00a0000aaaa0a', '0000000aa0a00a0000aaaa0b']
batches: List[str]
List of batch IDs to assign to the specified assets. Batch IDs can be obtained using the
get_batchesfunction.Example:
['0000000aa0a00a0000aaaa0a', '0000000aa0a00a0000aaaa0b']
Returns:
output: dict
A dictionary containing the result of the operation.
Including a
statusfield indicating whether the request was successful and adatafield containing the response payload with updated resources produced by the operation.
All specified batches must already exist in the project. If necessary, create batches first using the create_batch function.
The assets to assign must already exist in the project. To upload assets, use upload_files or upload_files_cloud or any other appropriate upload function.
How to verify in Ango Hub?
After successfully executing the assign_batches function, you can validate the changes directly in Ango Hub.
Navigate to: Projects → [Your Project] → Assets
Filter assets using their Asset ID or Batch column.
Confirm that the selected assets are assigned to the correct batches.
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
See also
Last updated