Skip to main content
Version: 2026.10

Resources

Upload, read, list, archive and revise Resources (models, artifacts and files), their comments, and the relationships between their revisions.

MethodDescription
create_resource()Upload a file and register it as a new resource.
create_resource_revision()Upload a new file revision for an existing resource.
create_comment()Upload a file and attach it as a comment on a resource.
update_comment()Replace an existing comment's file.
get_content()Download raw file bytes from a resource, revision, or comment.
download_content()Stream a resource, revision, or comment's content to a file.
generate_revision_download_url()Get a temporary browser download URL for a revision.
get_resource()Retrieve a resource by ID.
get_resource_revision()Retrieve a specific revision of a resource.
get_comment()Retrieve a comment by ID.
list_resources()List resources with optional filters.
list_resource_revisions()List revisions for a resource.
list_comments()List comments on a resource.
archive_resource()Archive a resource.
restore_resource()Restore an archived resource.
archive_comment()Archive a comment.
restore_comment()Restore an archived comment.
create_revision_relationship()Create a typed relationship between two revisions.
list_revision_relationships()List relationships for a revision.
list_revision_relationship_types()List available relationship types.
update_resource_revision()Change the description, labels, or external id of a revision.

Upload​

create_resource​

V3Client.create_resource(
path,
resource_type,
*,
description=None,
version_name=None,
external_identifier=None,
display_name=None,
upstream_remote_info=None,
progress=None,
cancel=None,
) -> ResourceDto

Upload a local file and register it as a new resource. The resource_type determines how the resource is classified. V3Client handles file tokenisation and storage automatically — pass a plain filesystem path.

Required parameters

NameTypeDescription
pathPathLikeFilesystem path to the file to upload.
resource_typeResourceTypeDtoClassification: model, artifact, file, connected_container, or connected_resource.

Optional parameters

NameTypeDefaultDescription
descriptionstr | NoneNoneText describing the resource's purpose or contents.
version_namestr | NoneNoneUser-defined version label (e.g. "v2.1.0").
external_identifierstr | NoneNoneIdentifier from an external system for cross-referencing.
display_namestr | NoneNoneHuman-readable name for the resource.
upstream_remote_infoUpstreamInfoCreateDto | NoneNoneProvenance when the remote sync service imports this resource over a receiving connection. Leave unset for a file you upload.
progressCallable[[TransferEvent], None] | NoneNoneCalled with a TransferEvent as the upload advances. See download_content().
cancelthreading.Event | NoneNoneSet the event to abort the upload.

UpstreamInfoCreateDto requires every field together: upstream_remote_id, upstream_file_id, upstream_file_created, upstream_file_revision_id, and upstream_file_revision_created.

Returns: ResourceDto — the newly created resource.

from istari_digital_client.v3.models.resource_type_dto import ResourceTypeDto

resource = client.create_resource(
path="model.onnx",
resource_type=ResourceTypeDto.MODEL,
)
print(resource.resource_id)

create_resource_revision​

V3Client.create_resource_revision(
resource_id,
path,
*,
description=None,
version_name=None,
external_identifier=None,
display_name=None,
upstream_revision_info=None,
progress=None,
cancel=None,
) -> ResourceRevisionDto

Upload a new file and add it as a revision to an existing resource. Each call appends a new revision to the resource's history; previous revisions remain accessible.

Required parameters

NameTypeDescription
resource_idstrUnique identifier of the resource to add a revision to.
pathPathLikeFilesystem path to the new file.

Optional parameters

NameTypeDefaultDescription
descriptionstr | NoneNoneDescription for this revision.
version_namestr | NoneNoneVersion label for this revision.
external_identifierstr | NoneNoneExternal system identifier.
display_namestr | NoneNoneHuman-readable name for this revision.
upstream_revision_infoUpstreamRevisionInfoCreateDto | NoneNoneProvenance when the remote sync service imports this revision over a receiving connection. Leave unset for a revision you author locally.
progressCallable[[TransferEvent], None] | NoneNoneCalled with a TransferEvent as the upload advances. See download_content().
cancelthreading.Event | NoneNoneSet the event to abort the upload.

UpstreamRevisionInfoCreateDto requires every field together: receiving_connection_id, upstream_file_revision_id, and upstream_file_revision_created.

Returns: ResourceRevisionDto — the newly created revision.

revision = client.create_resource_revision(
resource_id="550e8400-e29b-41d4-a716-446655440000",
path="model-v2.onnx",
)
print(revision.file_revision_id)

create_comment​

V3Client.create_comment(
resource_id,
path,
parent_comment_id=None,
*,
progress=None,
cancel=None,
) -> CommentDto

Upload a local file and attach it as a comment on a resource. Supports threaded replies via parent_comment_id.

Required parameters

NameTypeDescription
resource_idstrUnique identifier of the resource to comment on.
pathPathLikeFilesystem path to the comment file.

Optional parameters

NameTypeDefaultDescription
parent_comment_idstr | NoneNoneID of the parent comment to reply to.
progressCallable[[TransferEvent], None] | NoneNoneCalled with a TransferEvent as the upload advances. See download_content().
cancelthreading.Event | NoneNoneSet the event to abort the upload.

Returns: CommentDto — the newly created comment.

comment = client.create_comment(
resource_id="550e8400-e29b-41d4-a716-446655440000",
path="review-notes.pdf",
)
print(comment.id)

update_comment​

V3Client.update_comment(
resource_id,
comment_id,
path,
*,
progress=None,
cancel=None,
) -> CommentDto

Replace an existing comment's content by uploading a new file. The previous file is retained in history.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the parent resource.
comment_idstrUnique identifier of the comment to update.
pathPathLikeFilesystem path to the replacement comment file.

Optional parameters: progress and cancel, as for create_comment().

Returns: CommentDto — the updated comment.

updated = client.update_comment(
resource_id="550e8400-e29b-41d4-a716-446655440000",
comment_id="aabb1234-...",
path="corrected-review.pdf",
)

Retrieve​

get_content​

V3Client.get_content(
resource,
) -> bytes

Fetch and return the raw file content bytes for a resource, resource revision, or comment. The object must have a content_token attribute set.

tip

Pass the object returned by get_resource(), get_resource_revision(), or get_comment() directly — no need to extract the token manually.

Parameters

NameTypeDescription
resourceResourceDto | ResourceRevisionDto | CommentDtoObject whose content to download. Must have a content_token.

Returns: bytes — raw file content.

resource = client.get_resource("550e8400-e29b-41d4-a716-446655440000")
data = client.get_content(resource)
with open("downloaded.onnx", "wb") as f:
f.write(data)

download_content()​

V3Client.download_content(
resource,
dest,
*,
progress=None,
cancel=None,
) -> Path

Download the content of a resource, resource revision, or comment to a file and return its path. Use it instead of get_content() when the content is too large to hold in memory or you want progress and cancellation.

The bytes stream to a temporary file beside dest and are renamed into place only after the content's salted digest verifies. Large content is fetched as parallel ranges. Raises ValueError when the object has no content_token.

Required parameters

NameTypeDescription
resourceResourceDto | ResourceRevisionDto | CommentDtoObject whose content to download. Must have a content_token.
destPathLikeDestination file path.

Optional parameters

NameTypeDefaultDescription
progressCallable[[TransferEvent], None] | NoneNoneCalled with a TransferEvent (kind, bytes_done, bytes_total, part_number, attempt, latency) as the transfer advances. Runs on transfer threads, so return promptly.
cancelthreading.Event | NoneNoneSet the event to abort the transfer.

Returns: Path — the destination path.

resource = client.get_resource("550e8400-e29b-41d4-a716-446655440000")
path = client.download_content(resource, "downloads/model.onnx")

generate_revision_download_url()​

V3Client.generate_revision_download_url(
revision_id,
http_request_timeout_secs=None,
) -> RevisionDownloadUrlDto

Generate a temporary URL that downloads one revision's content as a browser attachment. A plain GET of the URL, with no Authorization header, returns the content with Content-Disposition: attachment and the revision's name as the filename. Use it to hand a download to a browser or to a tool that has no Istari Digital credentials; to read the bytes in Python, use get_content() or download_content().

Each call mints a new URL. The caller needs view permission on the revision's file; this covers workflow outputs as well as resource revisions. The call returns 403 without that permission, 404 when the revision does not exist or its content is in no object store, and 410 when the content has been revoked.

Parameters

NameTypeDescription
revision_idstrRevision to download, for example a ResourceRevisionDto.file_revision_id.

Returns: RevisionDownloadUrlDto — url and expires. expires is an upper bound on the URL's lifetime, not a guarantee: signing credentials, storage policy, or revocation can invalidate it earlier. Request a fresh URL if it stops working.

resource = client.get_resource("550e8400-e29b-41d4-a716-446655440000")
download = client.generate_revision_download_url(resource.file_revision_id)
print(download.url, download.expires)

get_resource​

V3Client.get_resource(
resource_id,
) -> ResourceDto

Retrieve a resource by its unique identifier.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the resource to retrieve.

Returns: ResourceDto — the resource.

resource = client.get_resource("550e8400-e29b-41d4-a716-446655440000")
print(resource.resource_type)

get_resource_revision​

V3Client.get_resource_revision(
resource_id,
revision_id,
) -> ResourceRevisionDto

Retrieve a specific revision of a resource.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the parent resource.
revision_idstrUnique identifier of the revision to retrieve.

Returns: ResourceRevisionDto — the revision.

revision = client.get_resource_revision(
resource_id="550e8400-e29b-41d4-a716-446655440000",
revision_id="aabb1234-...",
)
print(revision.version_name)

get_comment​

V3Client.get_comment(
resource_id,
comment_id,
) -> CommentDto

Retrieve a comment by its ID.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the parent resource.
comment_idstrUnique identifier of the comment to retrieve.

Returns: CommentDto — the comment.

comment = client.get_comment(
resource_id="550e8400-e29b-41d4-a716-446655440000",
comment_id="aabb1234-...",
)
data = client.get_content(comment)

List​

list_resources​

V3Client.list_resources(
*,
cursor=None,
size=None,
include_total=None,
resource_id=None,
created_by_id=None,
name=None,
type_name=None,
description=None,
version_name=None,
external_identifier=None,
display_name=None,
mime_type=None,
archive_status=None,
) -> CursorPageResourceDto

List resources with optional filters. Results are cursor-paginated; pass the cursor field from the previous page to fetch the next.

tip

Most filter parameters accept a list and support a ! prefix for negation (e.g. type_name=["!artifact"] excludes artifacts).

Optional parameters

NameTypeDefaultDescription
cursorstr | NoneNonePagination cursor from the previous response.
sizeint | NoneNonePage size (0–100, default 10).
include_totalbool | NoneNoneInclude total item count in the response.
resource_idlist[str] | NoneNoneFilter by resource ID(s). Supports ! negation.
created_by_idlist[str] | NoneNoneFilter by creator user ID(s).
namelist[str] | NoneNoneFilter by filename (exact match).
type_namelist[str] | NoneNoneFilter by ResourceTypeDto: model, artifact, file, connected_container, connected_resource.
descriptionlist[str] | NoneNoneFilter by description (exact match).
version_namelist[str] | NoneNoneFilter by version label.
external_identifierlist[str] | NoneNoneFilter by external identifier.
display_namelist[str] | NoneNoneFilter by display name (exact match).
mime_typelist[str] | NoneNoneFilter by MIME type (e.g. model/stl).
archive_statusArchiveStatus | NoneNoneactive (default), archived, or all.

Returns: CursorPageResourceDto — paginated list of resources.

page = client.list_resources(type_name=["model"], size=20)
for r in page.items:
print(r.id, r.resource_type)

list_resource_revisions​

V3Client.list_resource_revisions(
resource_id,
*,
cursor=None,
size=None,
include_total=None,
file_revision_id=None,
created_by_id=None,
name=None,
description=None,
version_name=None,
external_identifier=None,
display_name=None,
mime_type=None,
) -> CursorPageResourceRevisionDto

List revisions for a resource. Results are cursor-paginated.

Required parameters

NameTypeDescription
resource_idstrUnique identifier of the resource whose revisions to list.

Optional parameters

NameTypeDefaultDescription
cursorstr | NoneNonePagination cursor.
sizeint | NoneNonePage size (0–100).
include_totalbool | NoneNoneInclude total count.
file_revision_idlist[str] | NoneNoneFilter by revision ID(s).
created_by_idlist[str] | NoneNoneFilter by creator user ID(s).
namelist[str] | NoneNoneFilter by filename.
descriptionlist[str] | NoneNoneFilter by description.
version_namelist[str] | NoneNoneFilter by version label.
external_identifierlist[str] | NoneNoneFilter by external identifier.
display_namelist[str] | NoneNoneFilter by display name.
mime_typelist[str] | NoneNoneFilter by MIME type.

Returns: CursorPageResourceRevisionDto — paginated list of revisions.

page = client.list_resource_revisions(
resource_id="550e8400-e29b-41d4-a716-446655440000",
size=10,
)
for rev in page.items:
print(rev.file_revision_id, rev.version_name)

list_comments​

V3Client.list_comments(
resource_id,
*,
cursor=None,
size=None,
include_total=None,
comment_id=None,
created_by_id=None,
) -> CursorPageCommentDto

List comments on a resource. Results are cursor-paginated.

Required parameters

NameTypeDescription
resource_idstrUnique identifier of the resource whose comments to list.

Optional parameters

NameTypeDefaultDescription
cursorstr | NoneNonePagination cursor.
sizeint | NoneNonePage size (0–100).
include_totalbool | NoneNoneInclude total count.
comment_idlist[str] | NoneNoneFilter by comment ID(s). Supports ! negation.
created_by_idlist[str] | NoneNoneFilter by creator user ID(s).

Returns: CursorPageCommentDto — paginated list of comments.

page = client.list_comments(
resource_id="550e8400-e29b-41d4-a716-446655440000",
)
for c in page.items:
print(c.id)

Archive & Restore​

archive_resource​

V3Client.archive_resource(
resource_id,
) -> None

Archive a resource. Archived resources are excluded from default list queries unless archive_status="archived" or archive_status="all" is passed.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the resource to archive.

Returns: None

client.archive_resource("550e8400-e29b-41d4-a716-446655440000")

restore_resource​

V3Client.restore_resource(
resource_id,
) -> ResourceDto

Restore an archived resource, making it active again.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the resource to restore.

Returns: ResourceDto — the restored resource.

resource = client.restore_resource("550e8400-e29b-41d4-a716-446655440000")
print(resource.resource_id)

archive_comment​

V3Client.archive_comment(
resource_id,
comment_id,
) -> CommentDto

Archive a comment on a resource.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the parent resource.
comment_idstrUnique identifier of the comment to archive.

Returns: CommentDto — the archived comment.

client.archive_comment(
resource_id="550e8400-e29b-41d4-a716-446655440000",
comment_id="aabb1234-...",
)

restore_comment​

V3Client.restore_comment(
resource_id,
comment_id,
) -> CommentDto

Restore an archived comment.

Parameters

NameTypeDescription
resource_idstrUnique identifier of the parent resource.
comment_idstrUnique identifier of the comment to restore.

Returns: CommentDto — the restored comment.

comment = client.restore_comment(
resource_id="550e8400-e29b-41d4-a716-446655440000",
comment_id="aabb1234-...",
)

Revision Relationships​

create_revision_relationship​

V3Client.create_revision_relationship(
new_revision_relationship_dto,
) -> RevisionRelationshipDto

Create a typed relationship between two revisions. Relationships record provenance, dependency, or lineage links between resource versions.

Parameters

NameTypeDescription
new_revision_relationship_dtoNewRevisionRelationshipDtoDTO with the left revision, right revision, and relationship type IDs.

Returns: RevisionRelationshipDto — the created relationship.

from istari_digital_client.v3.models.new_revision_relationship_dto import NewRevisionRelationshipDto

rel = client.create_revision_relationship(
new_revision_relationship_dto=NewRevisionRelationshipDto(
left_revision_id="rev-aaa",
right_revision_id="rev-bbb",
relationship_type_id="type-ccc",
)
)
print(rel.id)

list_revision_relationships​

V3Client.list_revision_relationships(
revision_id,
*,
cursor=None,
size=None,
include_total=None,
left_revision_id=None,
right_revision_id=None,
owning_entity_type=None,
) -> CursorPageRevisionRelationshipDto

List relationships that the caller has access to for a given revision.

Required parameters

NameTypeDescription
revision_idstrThe revision ID to list relationships for.

Optional parameters

NameTypeDefaultDescription
cursorstr | NoneNonePagination cursor.
sizeint | NoneNonePage size (0–100).
include_totalbool | NoneNoneInclude total count.
left_revision_idlist[str] | NoneNoneFilter by left revision ID(s). Use !uuid to negate.
right_revision_idlist[str] | NoneNoneFilter by right revision ID(s).
owning_entity_typelist[str] | NoneNoneFilter by entity type (e.g. model, artifact, file).

Returns: CursorPageRevisionRelationshipDto — paginated list of relationships.

page = client.list_revision_relationships(revision_id="rev-aaa")
for r in page.items:
print(r.left_revision.file_revision_id, "->", r.right_revision.file_revision_id)

list_revision_relationship_types​

V3Client.list_revision_relationship_types(
*,
cursor=None,
size=None,
include_total=None,
) -> CursorPageRevisionRelationshipTypeDto

List all available revision relationship types registered in the system.

Optional parameters

NameTypeDefaultDescription
cursorstr | NoneNonePagination cursor.
sizeint | NoneNonePage size (0–100).
include_totalbool | NoneNoneInclude total count.

Returns: CursorPageRevisionRelationshipTypeDto — paginated list of relationship types.

types = client.list_revision_relationship_types()
for t in types.items:
print(t.id, t.name)

Revision properties​

update_resource_revision​

V3Client.update_resource_revision(
resource_id,
revision_id,
resource_revision_update_dto,
http_request_timeout_secs=None,
) -> ResourceRevisionDto

Patches user-provided properties on an existing revision. Omitted fields stay as they are. An explicit null clears the value. A new upload is create_resource_revision().

Required parameters

NameTypeDescription
resource_idstrResource that owns the revision.
revision_idstrRevision to update.
resource_revision_update_dtoResourceRevisionUpdateDtoOptional fields: display_name, description, version_name, external_identifier. Each max 255.

Returns: ResourceRevisionDto