Systems
Log external workflow runs on a System, and search the Resources a System branch tracks. Branches, change requests and System configuration are on Client.
| Method | Description |
|---|---|
create_workflow_output() | Upload a file to attach to a workflow log entry. |
create_workflow_log_entry() | Log an external workflow run on a System. |
list_workflow_log_entries() | List a System's workflow log entries. |
get_workflow_log_entry() | Retrieve one entry with its outputs. |
archive_workflow_log_entry() | Archive a workflow log entry. |
restore_workflow_log_entry() | Restore an archived workflow log entry. |
search_system_resources() | Search the Resources a System branch tracks. |
Workflow logs
Record a run that happened outside an Istari job. The how-to is External workflow logs. The web app view is Workflow log.
create_workflow_output on V3Client takes a filesystem path and uploads the file. The generated method underneath takes a WorkflowOutputCreateDto; call the V3Client form.
create_workflow_output
V3Client.create_workflow_output(
system_id,
path,
*,
description=None,
display_name=None,
external_identifier=None,
) -> WorkflowOutputDto
| Name | Type | Description |
|---|---|---|
system_id | str | System that stores the output. |
path | PathLike | File to upload. |
description | str | None | Optional description. |
display_name | str | None | Optional display name. |
external_identifier | str | None | Optional external id. |
Returns: WorkflowOutputDto
create_workflow_log_entry
V3Client.create_workflow_log_entry(
system_id,
workflow_log_entry_create_dto,
http_request_timeout_secs=None,
) -> WorkflowLogEntryDto
WorkflowLogEntryCreateDto fields, all optional: title (max 255), status (max 64; the platform default when omitted is UNSPECIFIED), workflow_type (max 64; default external), configuration_id, branch_id, branchless (default False), workflow_output_ids.
Unless branchless is true, configuration_id is required. Omitting branch_id records the system's baseline branch. When branchless is true, omit both configuration_id and branch_id.
list_workflow_log_entries
V3Client.list_workflow_log_entries(
system_id,
cursor=None,
size=None,
include_total=None,
branch_id=None,
title=None,
status=None,
archive_status=None,
) -> CursorPageWorkflowLogEntryDto
branch_id, title, and status are lists. archive_status is active, archived, or all.
get_workflow_log_entry
V3Client.get_workflow_log_entry(system_id, entry_id) -> WorkflowLogEntryDetailDto
The detail includes workflow_outputs.
archive_workflow_log_entry
V3Client.archive_workflow_log_entry(system_id, entry_id) -> None
restore_workflow_log_entry
V3Client.restore_workflow_log_entry(system_id, entry_id) -> WorkflowLogEntryDto
System search
Full-text search across the platform is search().
search_system_resources()
V3Client.search_system_resources(
system_id,
q,
branch_id=None,
size=None,
cursor=None,
http_request_timeout_secs=None,
) -> SystemSearchPage
Full-text search over the Resources a System branch tracks directly: those in the current snapshot of branch_id, or of the System's baseline branch when it is omitted. Hits match on the name and description the snapshot pins and, when content search is on, on the text of Resources whose pinned revision is their latest. Subsystems are not searched; to search one, call this method with the Subsystem's id.
The caller needs view access to the System. Each hit is also filtered by the caller's access to that Resource. The call returns 403 when the caller cannot view the System or it does not exist, 404 when the System is archived, the branch is not the System's or is archived, or the System has no baseline branch, and 503 when search is disabled.
Required parameters
| Name | Type | Description |
|---|---|---|
system_id | str | System whose tracked Resources are searched. |
q | str | Search query, at least one character. |
Optional parameters
| Name | Type | Default | Description |
|---|---|---|---|
branch_id | str | None | None | Branch whose current snapshot is searched. Omit for baseline. |
size | int | None | None | Page size, 1–50. The server returns 20 when omitted. |
cursor | str | None | None | The previous page's next_cursor. Omit for the first page. |
Returns: SystemSearchPage — items (list of SearchResultItem: id, entity_type, display_name, rank, created, module_id, content_snippet), next_cursor, search_index_refreshed_at, snapshot_id (the snapshot that was searched), and content_unsearched_count (on the first page, how many tracked Resources had no searchable text).
cursor = None
while True:
page = client.search_system_resources(
"{system_id}", "bracket", size=50, cursor=cursor
)
for hit in page.items:
print(hit.display_name, hit.rank)
cursor = page.next_cursor
if not cursor:
break