Skip to main content

Common project item members

Every project item (model, trial, virtual population, ...) has these members.

ProjectItem​

MemberKindDescription
contentmethodReturn content for the latest version or a revision.
sidpropertyReturn the stable item identifier (SID).
typepropertyReturn the project item type as provided by the API.
namepropertyReturn the item name.
descriptionpropertyReturn the item description, if present.
core_idpropertyReturn the core item id used by manager endpoints.
snapshot_idpropertyReturn the snapshot id used by manager endpoints.
is_templatepropertyReturn True when this item is marked as a template.
author_namepropertyReturn the name of the author of the item
author_usernamepropertyReturn the username of the author of the item (usually an email adress)
created_atpropertyReturn the item creation timestamp.
updated_atpropertyReturn the last update timestamp.
deleted_atpropertyReturn the deletion timestamp, or None if not deleted.
versionpropertyReturn version metadata for this snapshot, if available.
versionspropertyReturn available versions for this project item.
folderspropertyReturns the folders for this snapshot.
folderpropertyReturn this item's folder, or the first API folder if multiple exist.
urlpropertyReturn the Jinko app URL for this project item.
url_with_fixed_revisionmethodThe jinko app URL for this project item, set to a fixed revision. Defaults to this object's revision.
info_folderspropertyReturn a human-readable string of the item's folder paths.
infomethodShows a readable metadata summary for this item.
refreshmethod
renamemethodRename this item and optionally set a version label.
set_descriptionmethodSet the item description and optionally set a version label.
set_version_labelmethodSet the label and optional description of the current head version.
move_to_foldermethodMove this item to one folder, or to no folder when folder is None.
deletemethodDelete this project item.
restore_if_deletedmethodRestore this item only when the API currently reports it as deleted.

content​

content(*, revision: int | None = None)

Return content for the latest version or a revision.

sid​

Type: str

Return the stable item identifier (SID).

type​

Type: str

Return the project item type as provided by the API.

name​

Type: str

Return the item name.

description​

Type: str | None

Return the item description, if present.

core_id​

Type: str | None

Return the core item id used by manager endpoints.

snapshot_id​

Type: str | None

Return the snapshot id used by manager endpoints.

is_template​

Type: bool

Return True when this item is marked as a template.

author_name​

Type: str

Return the name of the author of the item

author_username​

Type: str

Return the username of the author of the item (usually an email adress)

created_at​

Type: datetime

Return the item creation timestamp.

updated_at​

Type: datetime

Return the last update timestamp.

deleted_at​

Type: datetime | None

Return the deletion timestamp, or None if not deleted.

version​

Type: Version | None

Return version metadata for this snapshot, if available.

versions​

Return available versions for this project item.

folders​

Type: list[Folder]

Returns the folders for this snapshot.

folder​

Type: Folder | None

Return this item's folder, or the first API folder if multiple exist.

url​

Type: str

Return the Jinko app URL for this project item.

url_with_fixed_revision​

url_with_fixed_revision(revision: int | None = None) -> str

The jinko app URL for this project item, set to a fixed revision. Defaults to this object's revision.

info_folders​

Type: str

Return a human-readable string of the item's folder paths.

info​

info() -> None

Shows a readable metadata summary for this item.

refresh​

refresh() -> Self

rename​

rename(name: str, *, version: str | dict | None = None) -> Self

Rename this item and optionally set a version label.

set_description​

set_description(
description: str, *, version: str | dict | None = None
) -> Self

Set the item description and optionally set a version label.

set_version_label​

set_version_label(version: str | dict) -> Self

Set the label and optional description of the current head version.

Pass a string to set only the label, or a dictionary such as {"name": "baseline", "description": "Initial state"} to set both fields. This uses the same version format as the SDK's other mutation methods.

move_to_folder​

move_to_folder(
folder: Folder | str | None = None, *, version: str | dict | None = None
) -> Self

Move this item to one folder, or to no folder when folder is None.

delete​

delete() -> None

Delete this project item.

restore_if_deleted​

restore_if_deleted() -> Self

Restore this item only when the API currently reports it as deleted.

This method does not trust the wrapper's local deleted_at state. Instead, it re-fetches the item from the API with allow_deleted=True. If the API reports that the item is not deleted, a warning is emitted and no restore request is sent. Otherwise, the item is restored, refreshed, updated in place, and returned.