Retrieve Download Urls
- async AsyncCogniteClient.data_modeling.files.retrieve_download_urls(
- node_ids: NodeId | tuple[str, str] | Sequence[NodeId | tuple[str, str]],
- *,
- extended_expiration: bool = False,
Get download URLs for one or more files by instance ID.
Note
If you pass instance IDs as tuple(s), the returned mapping will always use NodeIds as keys.
- Parameters:
- Returns:
Dictionary mapping each instance ID to its download URL.
- Return type:
dict[NodeId, str]
Examples
Get a download URL for a single file:
>>> from cognite.client import CogniteClient >>> from cognite.client.data_classes.data_modeling import NodeId >>> client = CogniteClient() >>> urls = client.data_modeling.files.retrieve_download_urls( ... NodeId("my-space", "my-file") ... )
Get download URLs for multiple files:
>>> urls = client.data_modeling.files.retrieve_download_urls( ... [("my-space", "file-1"), ("my-space", "file-2")] ... )