<span id="查询插件发布列表"></span>

# List plugin releases

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

List visible system or workspace plugin releases.

```text
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/plugin-releases
```

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

## Before you call this API

Prepare the target workspace ID and a personal access token with resource access and permission for this action. Use the actual resource `workspace_id` in the path and `X-Workspace-ID`. See [common objects and inputs](objects.md#input-identifiers) for environment variable sources.

<span id="查询参数"></span>

## Query parameters

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

```bash
curl -X GET "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/plugin-releases" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --get \
  --data-urlencode "namespace=$RELEASE_NAMESPACE" \
  --data-urlencode "limit=20" \
  --data-urlencode "offset=0"
```

Set `$NEXT_OFFSET` to the original offset plus the number of items on this page. Request the next page only while it remains below total.

```bash
curl -X GET "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/plugin-releases" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --get \
  --data-urlencode "namespace=$RELEASE_NAMESPACE" \
  --data-urlencode "limit=20" \
  --data-urlencode "offset=$NEXT_OFFSET"
```

:::::
:::::{tab-item} Parameters

Save the release id and selected namespace, then get release details. Continue with offset plus the current items count until reaching total. Stop on an empty page and recheck the list.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `namespace` | string | Yes | system or workspace; no default. |
| `limit` | integer | No | 1–100 entries per page, default 20. The parameter may appear only once. |
| `offset` | integer | No | Zero-based offset, default 0. Must not be negative or appear more than once. |
| `q` | string | No | Search release names or descriptions. |

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

<span id="成功响应"></span>

## Successful response

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

```json
{
  "code": 0,
  "data": {
    "items": [],
    "total": 0
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | 0 on success. |
| `data` | object | Data returned by this action. |
| `data.items` | array | Results on this page; read fields according to the resource object. |
| `data.total` | integer | Total records matching the current filters. |

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

<span id="错误响应"></span>

## Error responses

Handle business errors with numeric `code`, `message`, and `details.reason` separately from authorization-layer errors with string codes. See [errors and states](objects.md#error-responses). On state or version conflicts, read the current resource before changing identifiers or retrying writes.
