# Get import task statistics

<span id="查看导入任务统计"></span>

Returns the import task statistics that can be viewed by the caller in the current workspace. The results include the total number of tasks and the number of tasks in each status, without reading task details.

~~~text
GET $CLOUDSIGMA_API_BASE/task/stats
~~~

<span id="调用前准备"></span>

## Before you call


Configure the [CloudSigma regional endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md) before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare [personal access token](https://omnifabric.cloudsigma.com/docs/guides/billing/credentials.html.md#personal-access-token) and [target workspace ID](https://omnifabric.cloudsigma.com/docs/guides/ai-studio/resource-center/workspace.html.md#复制工作区-id) that can access the target workspace.

<span id="请求参数"></span>

## Request parameters


Replace <code>$CLOUDSIGMA_API_KEY</code> and <code>$WORKSPACE_ID</code> with actual values.

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

```bash
curl "$CLOUDSIGMA_API_BASE/task/stats" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameter reference

This interface has no path or query parameters.

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


<span id="返回统计对象"></span>

## Return statistics object

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

```json
{
  "total": 22,
  "running": 10,
  "waiting": 8,
  "failed": 4
}
```

:::::
:::::{tab-item} Field reference

| Field | Type | Description |
| --- | --- | --- |
| `total` | integer | The total number of import tasks visible to the current caller. |
| `running` | integer | The number of running tasks. |
| `waiting` | integer | The number of tasks waiting to be processed, including suspended tasks. |
| `failed` | integer | The number of failed tasks. |

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