<span id="web应用管理对象"></span>

# Web App administration objects

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

Publication management uses product identity and the target Agent scope. Public visitor sessions and site configuration each use their own entry points.

<span id="prepare"></span>

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

## Before you call this API

Obtain BASE_URL, MOI_KEY, WORKSPACE_ID, and AGENT_ID from the same environment. BASE_URL includes the deployment product prefix. Publication and history reads reuse agent.read; enable/disable and rotation reuse agent.update, subject to formal identity and Role boundaries.

CONVERSATION_ID comes from the target Web App's visitor conversation list. Publisher administration reads do not filter visitors by the current signed-in user. Do not substitute ordinary signed-in conversation IDs. Public link access and visitor session acquisition use separate /public/webapp actions. Product PATs and publication tokens are not visitor sessions.

<span id="responses"></span>

<span id="发布记录"></span>

## Publication record

| Field | Type | Description |
| --- | --- | --- |
| `agent_id` | string | Target agent. |
| `enabled` | boolean | Whether public access is currently enabled. |
| `url` | string | Full access URL when PublicOrigin is configured; otherwise omitted. |
| `token` | string | Current link admission token; returned by administration reads. |
| `created_at` | string | Publication creation time in RFC3339 format. |
| `updated_at` | string | Latest change time in RFC3339 format. |
| `last_rotated_at` | string or null | Latest rotation time; null if never rotated. |

Prefer the actual returned url. Not every deployment's frontend address can be derived from the API domain. Current tokens can project to short-code links; old formats also support webapp/t queries. Clients must not truncate or reconstruct links themselves. Example tokens and addresses are placeholders, not real credentials.

Publication records contain no version-pinning parameters. These APIs cannot create a publication pinned to an Agent version. Confirm the relationship among existing conversations, frozen tasks, and the current conversational configuration through the runtime protocol. Link rotation is not a runtime version upgrade.

<span id="会话列表"></span>

## Conversation list

Returns data.items/total/limit/offset. Each item contains:

| Field | Type | Description |
| --- | --- | --- |
| `conversation_id` | string | Visitor conversation ID. |
| `title` | string | Conversation title. |
| `status` | string | active or archived. |
| `end_user_id` | string | Visitor identity under the publication, not the current administrator's user ID. |
| `message_count` | integer | Stored message count for this conversation, not completed tasks. |
| `created_at`、`updated_at` | string | RFC3339 timestamp. |

Lists are restricted to purpose=webapp, the target Agent's definition workspace, and visibility=visible. Missing or duplicate visitor bindings are projection errors. The API neither invents anonymous users nor silently skips entries and claims complete success.

<span id="消息列表"></span>

## Message list

Pagination contains items/total/limit/offset. Each message uses the public conversation-message projection:

| Field | Type | Description |
| --- | --- | --- |
| `id`、`workspace_id`、`conversation_id` | string | Message, owning workspace, and conversation. |
| `task_id`、`agent_id`、`manifest_id` | string | Associated run identifier; omitted when empty. |
| `role` | string | user/agent/system/tool/assistant。 |
| `parts` | array (message parts) | Message content projection; nested variants depend on the actual task. |
| `parent_message_id`、`source_message_id` | string | Parent and source messages; omitted when empty. |
| `display_history` | JSON | Display history; omitted when unset. |
| `seq` | integer | Message sequence number. |
| `created_at` | string | RFC3339 timestamp. |
| `answer_task_id` | string | Task associated with the answer projection; omitted when empty. |
| `answer_versions` | array (version references) | Answer version projections containing message_id/task_id; omitted when empty. |

Validate complete parts, candidates, and interaction union types against the corresponding message contract. The text example does not define every variant.

<span id="反馈与统计"></span>

## Feedback and statistics

| Detail fields | Type | Description |
| --- | --- | --- |
| `feedback_id`、`conversation_id` | string | Feedback and owning conversation IDs. |
| `message_id`、`task_id` | string | Target message or task of the feedback; omitted when empty. |
| `rating` | string | up/down/neutral。 |
| `comment` | string | Comment; omitted when empty. |
| `end_user_id` | string | Visitor ID that created the feedback. |
| `created_at` | string | RFC3339 timestamp. |

Feedback lists return items/total/limit/offset. Statistics return total and by_rating, with counts for up/down/neutral. The current statistics entry point has no parameters binding it to a detail-list rating filter.

<span id="站点配置"></span>

## Site configuration

/webapp/config returns string code=OK, msg=OK, and data. data contains name, title, logo.favicon/primary/mini, and auth_provider. The current auth_provider is uc. Logos and names come from deployment configuration. This object contains no individual Agent enablement, links, or visitor sessions.
