Manage runs
Use these methods to retrieve, import, update, or delete runs.
Read
Retrieve runs from the backend or import them from a YAML descriptor.
get_run
Get an unversioned run entity from the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
str
|
Entity ID or entity key in the format
|
required |
project
|
str
|
Project name. Required when |
None
|
Returns:
| Type | Description |
|---|---|
Run
|
Retrieved run entity. |
list_runs
List run entities in a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
str
|
Project name. |
required |
q
|
str
|
Query string used to filter entities. |
None
|
name
|
str
|
Entity name used to filter results. |
None
|
kind
|
str
|
Entity kind used to filter results. |
None
|
user
|
str
|
User who created the entity. |
None
|
state
|
str
|
Entity state used to filter results. |
None
|
created
|
str
|
Creation date filter. |
None
|
updated
|
str
|
Update date filter. |
None
|
function
|
str
|
Function reference used to filter results. |
None
|
workflow
|
str
|
Workflow reference used to filter results. |
None
|
task
|
str
|
Task reference used to filter results. |
None
|
action
|
str
|
Action name used to filter results. |
None
|
Returns:
| Type | Description |
|---|---|
list[Run]
|
Run entities matching the filters. |
import_run
Import a run entity from a YAML file or entity key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
str
|
Path to a YAML file containing the entity descriptor. Provide either
|
None
|
key
|
str
|
Entity key in the format
|
None
|
reset_id
|
bool
|
Whether to generate a new entity identifier instead of preserving the identifier from the imported entity. |
False
|
context
|
str
|
Project name used for context resolution. If omitted, the project from the entity descriptor is used. |
None
|
Returns:
| Type | Description |
|---|---|
Run
|
Imported run entity. |
Update
Update a run after changing its mutable metadata.
update_run
Update a run entity in the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity
|
Run
|
Entity to update. The entity specification is immutable. |
required |
Returns:
| Type | Description |
|---|---|
Run
|
Updated run entity. |
Delete
Delete a run from the backend.
delete_run
Delete an unversioned run entity from the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
str
|
Entity ID or entity key in the format
|
required |
project
|
str
|
Project name. Required when |
None
|
entity_id
|
str
|
Identifier of the entity to delete. If omitted, |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Response data from the backend. |