sift_py.asset.service
¶
| CLASS | DESCRIPTION |
|---|---|
AssetService |
A service for managing assets. Allows for creating, updating, and retrieving assets in the Sift API. |
AssetService
¶
AssetService(channel: SiftChannel)
A service for managing assets. Allows for creating, updating, and retrieving assets in the Sift API.
| METHOD | DESCRIPTION |
|---|---|
delete_asset |
Deletes an asset by its ID. |
get_asset |
Retrieves an asset by its ID. |
list_assets |
Lists assets in an organization. |
update_asset |
Updates an existing asset. |
get_asset
¶
get_asset(asset_id: str) -> Optional[AssetConfig]
Retrieves an asset by its ID.
| PARAMETER | DESCRIPTION |
|---|---|
asset_id
|
The ID of the asset to retrieve.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Optional[AssetConfig]
|
The Asset if found, None otherwise. |
list_assets
¶
update_asset
¶
update_asset(
asset: AssetConfig,
update_tags: bool = True,
update_metadata: bool = True,
) -> AssetConfig
Updates an existing asset.
| PARAMETER | DESCRIPTION |
|---|---|
asset
|
The asset to update.
TYPE:
|
update_tags
|
Whether to update the tags.
TYPE:
|
update_metadata
|
Whether to update the metadata.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AssetConfig
|
The updated AssetConfig. |