# Get task execution overview

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

View task execution counts for the last seven days in the current workspace, including running, completed, failed, and pending tasks.

```text
GET https://moi.matrixorigin.cn/newmoi/dashboard/task-execution-overview
```

## Preparation before calling

First identify the workspace you want to inspect. Prepare a personal access token with access to that workspace and its [workspace ID](../../../../guides/ai-studio/resource-center/workspace.md#copy-a-workspace-id).

## Query parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Input example

```bash
curl "https://moi.matrixorigin.cn/newmoi/dashboard/task-execution-overview" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameter description

This API accepts no additional query parameters.

:::::
::::::
:::::::

## Success response

On success, the API returns a count summary for the current workspace in the reporting window, not the details of one task.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "running": 2,
    "success": 18,
    "failed": 1,
    "pending": 3,
    "total": 24,
    "window_days": 7,
    "since": "2026-08-14T09:00:00Z",
    "until": "2026-08-21T09:00:00Z"
  }
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.running` | integer | Number of running tasks. |
| `data.success` | integer | Number of completed tasks. |
| `data.failed` | integer | Number of failed tasks. |
| `data.pending` | integer | Number of pending tasks. |
| `data.total` | integer | Total number of tasks in the reporting window. |
| `data.window_days` | integer | Number of days in the reporting window. |
| `data.since` | string | Start time of the reporting window. |
| `data.until` | string | End time of the reporting window. |

:::::
::::::
:::::::

## Error response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "ErrServer",
  "msg": "Internal server error",
  "data": null
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | — |

:::::
::::::
:::::::

## Next steps

To inspect individual SQL or operation records, [list SQL execution records](list-sql-execution-records.md#request-body) or [list operation logs](list-operation-logs.md#query-parameters).
