View Task Execution Overview¶
Use the AI Studio SDK to read recent task execution status rollups for a workspace. The overview provides counts for running, succeeded, failed, pending, and total tasks, along with the statistical window in days; it does not replace querying individual task or workflow run statuses.
Task workflow¶
Provide a verified workspace ID to read the recent execution summary for that workspace. If failed tasks or workloads requiring tracking are identified, navigate to the relevant resource task page to read detailed metrics using the specific task or run ID.
Prerequisites¶
Required item |
How to obtain |
Role on this page |
|---|---|---|
Authenticated client |
Created during initial connection setup. |
Read workspace-scoped execution summaries. |
Workspace ID |
Obtained from workspace creation, listing, or operator selection. |
Define the statistical scope. |
Read the execution overview¶
The following example reads the status counts and statistical window for recent tasks in a workspace. The overview is intended only to identify workloads that need further investigation; do not treat these aggregate numbers as the final outcome of any single run.
import os
import moi_product_sdk as sdk
client = sdk.new_with_personal_access_token(
os.environ["PRODUCT_API_BASE_URL"],
os.environ["PRODUCT_API_KEY"],
)
overview = client.dashboard("<workspace-id>").task_execution_overview()
print(overview.running)
print(overview.success)
print(overview.failed)
print(overview.pending)
print(overview.total)
print(overview.window_days)
package main
import (
"context"
"fmt"
"os"
sdk "github.com/matrixorigin/matrixflow/sdk/go-sdk"
)
func main() {
ctx := context.Background()
client, err := sdk.NewWithPersonalAccessToken(
os.Getenv("PRODUCT_API_BASE_URL"),
os.Getenv("PRODUCT_API_KEY"),
)
if err != nil {
panic(err)
}
overview, err := client.Dashboard("<workspace-id>").TaskExecutionOverview(ctx)
if err != nil {
panic(err)
}
fmt.Println(overview.Running)
fmt.Println(overview.Success)
fmt.Println(overview.Failed)
fmt.Println(overview.Pending)
fmt.Println(overview.Total)
fmt.Println(overview.WindowDays)
}
Next steps¶
For workflow runs that require attention, use Run and track workflows to read specific run states and execution results.