<span id="查询智能体产物版本"></span>

# Get an agent artifact version

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

Read an accessible file and its provenance by artifact ID and version.


```http
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-artifacts/{artifact_id}/versions/{version}
```

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

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`; use the corresponding product API URL for a dedicated deployment.

[Prepare identity, volume permissions, and version references](objects.md#prepare).

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

## Request

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

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts/$ARTIFACT_ID/versions/$ARTIFACT_VERSION" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

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

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | Path | string | Yes | Workspace ID in the current environment. |
| `artifact_id` | Path | string | Yes | Artifact ID returned by the list. |
| `version` | Path | integer | Yes | Positive integer version returned by the list. Do not substitute a file ID. |

The read also requires artifact status completed, an active source conversation, an unarchived Agent, and an accessible readable mount. The result is metadata, not file bytes. Source fields may be empty when the original source cannot be shown to the current user.

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

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

## Successful response

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

```json
{
  "code": 0,
  "data": {
    "workspace_id": "workspace-example",
    "artifact_id": "artifact-example",
    "version": 1,
    "artifact_kind": "file",
    "status": "completed",
    "file_id": "file-example",
    "placement_id": 23,
    "volume_id": 10,
    "file_path": "reports/summary.txt",
    "file_name": "summary.txt",
    "content_type": "text/plain",
    "file_category": "document",
    "size": 128,
    "md5": "0123456789abcdef0123456789abcdef",
    "agent_workspace_id": "workspace-example",
    "agent_id": "agent-example",
    "agent_name": "资料助手",
    "conversation_id": "conversation-example",
    "conversation_title": "资料整理",
    "task_id": "task-example",
    "call_id": "call-example",
    "tool_id": "tool-example",
    "created_by": "user-example",
    "creator_name": "示例用户",
    "source_event_id": "event-example",
    "source_event_seq": 3,
    "generated_at": "2026-11-12T01:00:00Z",
    "created_at": "2026-11-12T01:00:00Z",
    "updated_at": "2026-11-12T01:00:00Z"
  }
}
```

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | 0 on success; batch actions still require checking individual results. |
| `data` | object | [Corresponding response object](objects.md#responses). |

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

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

## Error responses

[Errors and result confirmation](boundaries.md#errors) distinguishes whole-request failure, item-level failure, and invisible provenance.
