List simulator model revisions
- async AsyncCogniteClient.simulators.models.revisions.list(
- limit: int = 25,
- sort: PropertySort | None = None,
- model_external_ids: str | SequenceNotStr[str] | None = None,
- all_versions: bool | None = None,
- created_time: TimestampRange | None = None,
- last_updated_time: TimestampRange | None = None,
Filter simulator model revisions
Retrieves a list of simulator model revisions that match the given criteria.
- Parameters:
limit (int) – Maximum number of results to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
sort (PropertySort | None) – The criteria to sort by.
model_external_ids (str | SequenceNotStr[str] | None) – The external ids of the simulator models to filter by.
all_versions (bool | None) – If True, all versions of the simulator model revisions are returned. If False, only the latest version is returned.
created_time (TimestampRange | None) – Filter by created time.
last_updated_time (TimestampRange | None) – Filter by last updated time.
- Returns:
List of simulator model revisions
- Return type:
Examples
- List simulator model revisions:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.simulators.models.revisions.list(limit=10)
- Specify filter and sort order:
>>> from cognite.client.data_classes.simulators.filters import PropertySort >>> from cognite.client.data_classes.shared import TimestampRange >>> res = client.simulators.models.revisions.list( ... model_external_ids=["model1", "model2"], ... all_versions=True, ... created_time=TimestampRange(min=0, max=1000000), ... last_updated_time=TimestampRange(min=0, max=1000000), ... sort=PropertySort(order="asc", property="createdTime"), ... limit=10, ... )