Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions api-reference/go/workflows/Clusters.Create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ icon: circle-nodes
func (*ClusterClient) Create(
ctx context.Context,
name string,
options ...cluster.CreateOption,
) (*workflows.Cluster, error)
```

Expand All @@ -16,17 +17,25 @@ Create a cluster.
## Parameters

<ParamField path="name" type="string">
A display name for the cluster
A display name for the cluster.
</ParamField>
<ParamField path="cluster.WithDescription(description string)" type="cluster.CreateOption">
Optional cluster description.
</ParamField>
<ParamField path="cluster.WithSlug(slug string)" type="cluster.CreateOption">
Optional cluster slug. If omitted, Tilebox generates a slug from the cluster name.
</ParamField>

## Returns

The created cluster object.
The created cluster object, including its slug, name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```go Go
cluster, err := client.Clusters.Create(ctx,
"My cluster"
createdCluster, err := client.Clusters.Create(ctx,
"My cluster",
cluster.WithDescription("Development workloads"),
cluster.WithSlug("dev"),
)
```
</RequestExample>
2 changes: 1 addition & 1 deletion api-reference/go/workflows/Clusters.Get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Get a cluster by its slug.

## Returns

A cluster object.
A cluster object, including its slug, name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```go Go
Expand Down
2 changes: 1 addition & 1 deletion api-reference/go/workflows/Clusters.List.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Fetch all available clusters.

## Returns

A list of all available clusters.
A list of all available clusters. Each cluster includes its slug, name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```go Go
Expand Down
47 changes: 47 additions & 0 deletions api-reference/go/workflows/Clusters.Update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Clusters.Update
sidebarTitle: Clusters.Update
icon: circle-nodes
---

```go
func (*ClusterClient) Update(
ctx context.Context,
slug string,
options ...cluster.UpdateOption,
) (*workflows.Cluster, error)
```

Update a cluster.

## Parameters

<ParamField path="slug" type="string">
The slug of the cluster to update.
</ParamField>
<ParamField path="cluster.WithName(name string)" type="cluster.UpdateOption">
Optional new display name for the cluster.
</ParamField>
<ParamField path="cluster.WithDescription(description string)" type="cluster.UpdateOption">
Optional new cluster description. Pass an empty string to clear the description.
</ParamField>

## Returns

The updated cluster object, including its slug, name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```go Go
updatedCluster, err := client.Clusters.Update(ctx,
"dev",
cluster.WithName("Development"),
cluster.WithDescription("Development workloads"),
)
```
</RequestExample>

## Errors

<ParamField path="not_found" type="cluster not found">
The specified cluster does not exist.
</ParamField>
2 changes: 1 addition & 1 deletion api-reference/go/workflows/Workflows.PublishRelease.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Publish an immutable release for a workflow.

## Returns

The published workflow release.
The published workflow release, including any clusters where the release is deployed.

<RequestExample>
```go Go
Expand Down
47 changes: 47 additions & 0 deletions api-reference/go/workflows/Workflows.Update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Workflows.Update
sidebarTitle: Workflows.Update
icon: diagram-project
---

```go
func (workflowClient) Update(
ctx context.Context,
slug string,
options ...workflow.UpdateOption,
) (*workflows.Workflow, error)
```

Update a workflow.

## Parameters

<ParamField path="slug" type="string" required>
The workflow slug.
</ParamField>
<ParamField path="workflow.WithName(name string)" type="workflow.UpdateOption">
Optional new display name for the workflow.
</ParamField>
<ParamField path="workflow.WithDescription(description string)" type="workflow.UpdateOption">
Optional new workflow description. Pass an empty string to clear the description.
</ParamField>

## Returns

The updated workflow object.

<RequestExample>
```go Go
updatedWorkflow, err := client.Workflows.Update(ctx,
"scene-processing",
workflow.WithName("Scene processing"),
workflow.WithDescription("Process new scenes into analysis-ready outputs."),
)
```
</RequestExample>

## Errors

<ParamField path="not_found" type="workflow not found">
The specified workflow does not exist.
</ParamField>
7 changes: 7 additions & 0 deletions api-reference/python/tilebox.workflows/Client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ def Client.clusters() -> ClusterClient

A client for managing clusters.

```python
def Client.workflows() -> WorkflowClient
```

A client for managing workflows and workflow release deployments.

```python
def Client.automations() -> AutomationClient
```
Expand Down Expand Up @@ -96,6 +102,7 @@ client = Client(
# access sub clients
job_client = client.jobs()
cluster_client = client.clusters()
workflow_client = client.workflows()
automation_client = client.automations()

# or instantiate a runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ List all available clusters.

## Returns

A list of all available clusters.
A list of all available clusters. Each cluster includes its slug, display name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```python Python
Expand Down
22 changes: 18 additions & 4 deletions api-reference/python/tilebox.workflows/ClusterClient.create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ icon: circle-nodes
---

```python
def ClusterClient.create(name: str): Cluster
def ClusterClient.create(
name: str,
description: str | None = None,
slug: str | None = None,
) -> Cluster
```

Create a cluster.

## Parameters

<ParamField path="name" type="string">
A display name for the cluster
A display name for the cluster.
</ParamField>
<ParamField path="description" type="str | None">
Optional cluster description.
</ParamField>
<ParamField path="slug" type="str | None">
Optional cluster slug. If omitted, Tilebox generates a slug from the cluster name.
</ParamField>

## Returns

The created cluster object.
The created cluster object, including its slug, display name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```python Python
cluster = cluster_client.create("My cluster")
cluster = cluster_client.create(
"My cluster",
description="Development workloads",
slug="dev",
)
```
</RequestExample>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Get a cluster by its slug.

## Returns

A cluster object.
A cluster object, including its slug, display name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```python Python
Expand Down
40 changes: 40 additions & 0 deletions api-reference/python/tilebox.workflows/ClusterClient.update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: ClusterClient.update
icon: circle-nodes
---

```python
def ClusterClient.update(
cluster_or_slug: Cluster | str,
name: str | None = None,
description: str | None = None,
) -> Cluster
```

Update a cluster.

## Parameters

<ParamField path="cluster_or_slug" type="Cluster | str">
The cluster or cluster slug to update.
</ParamField>
<ParamField path="name" type="str | None">
Optional new display name for the cluster. If omitted, the display name is unchanged.
</ParamField>
<ParamField path="description" type="str | None">
Optional new cluster description. Pass an empty string to clear the description. If omitted, the description is unchanged.
</ParamField>

## Returns

The updated cluster object, including its slug, display name, description, whether it can be deleted, and deployed workflows.

<RequestExample>
```python Python
cluster = cluster_client.update(
"dev",
name="Development",
description="Development workloads",
)
```
</RequestExample>
5 changes: 5 additions & 0 deletions api-reference/python/tilebox.workflows/JobClient.query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def JobClient.query(
job_states: JobState | list[JobState] | None = None,
name: str | None = None,
task_states: TaskState | list[TaskState] | None = None,
clusters: Cluster | str | list[Cluster | str] | None = None,
) -> list[Job]
```

Expand Down Expand Up @@ -42,6 +43,9 @@ Query jobs in the specified interval.
<ParamField path="task_states" type="TaskState | list[TaskState] | None">
A task state or list of task states to filter jobs by. If specified, only jobs that have at least one task in any of the given states are returned. Useful for finding jobs with [optional](/workflows/concepts/tasks#optional-tasks) task failures, e.g. `task_states=TaskState.FAILED_OPTIONAL`.
</ParamField>
<ParamField path="clusters" type="Cluster | str | list[Cluster | str] | None">
A cluster or list of clusters to filter jobs by. Pass actual cluster slugs or cluster objects. `None` and `[]` apply no cluster filter. Empty string cluster slugs are not accepted.
</ParamField>

## Returns

Expand All @@ -50,5 +54,6 @@ A list of jobs.
<RequestExample>
```python Python
jobs = job_client.query(("2025-01-01", "2025-02-01"))
jobs_on_cluster = job_client.query(("2025-01-01", "2025-02-01"), clusters="production")
```
</RequestExample>
20 changes: 20 additions & 0 deletions api-reference/python/tilebox.workflows/WorkflowClient.all.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: WorkflowClient.all
icon: diagram-project
---

```python
def WorkflowClient.all() -> list[Workflow]
```

List all workflows.

## Returns

A list of workflow objects.

<RequestExample>
```python Python
workflows = workflow_client.all()
```
</RequestExample>
32 changes: 32 additions & 0 deletions api-reference/python/tilebox.workflows/WorkflowClient.create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: WorkflowClient.create
icon: diagram-project
---

```python
def WorkflowClient.create(name: str, description: str = "") -> Workflow
```

Create a workflow.

## Parameters

<ParamField path="name" type="str" required>
The workflow display name.
</ParamField>
<ParamField path="description" type="str">
Optional workflow description.
</ParamField>

## Returns

The created workflow object.

<RequestExample>
```python Python
workflow = workflow_client.create(
"Scene processing",
description="Process new scenes into analysis-ready outputs.",
)
```
</RequestExample>
22 changes: 22 additions & 0 deletions api-reference/python/tilebox.workflows/WorkflowClient.delete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: WorkflowClient.delete
icon: diagram-project
---

```python
def WorkflowClient.delete(workflow_or_slug: Workflow | str) -> None
```

Delete a workflow.

## Parameters

<ParamField path="workflow_or_slug" type="Workflow | str" required>
The workflow or workflow slug to delete.
</ParamField>

<RequestExample>
```python Python
workflow_client.delete("scene-processing")
```
</RequestExample>
Loading