All Products
Search
Document Center

Tablestore:Query Wiki

Last Updated:Sep 24, 2026

Use the GetWiki interface to query the Wiki that corresponds to a three-segment Agent Scope. The Wiki is automatically created on the first call.

Prerequisites

  • An AgentStorage instance has been created and is in the normal state, and you have obtained the instance endpoint and instance name.

  • An API Key has been created.

  • Wiki operations use the full three-segment Agent Scope (appId/tenantId/agentId). Each segment must be non-empty and cannot be *, must be at most 128 bytes, and cannot contain /. Do not pass in runId.

  • Building is an asynchronous process. Query the build status through the latestBuild.status field returned by this interface, and poll until the status becomes ready or the build fails.

Request parameters

Field

Type

Required

Description

memoryStoreName

string

Yes

The name of the memory store.

scope

object

Yes

The full three-segment Agent Scope.

scope.appId

string

Yes

The application identifier.

scope.tenantId

string

Yes

The tenant or user identifier.

scope.agentId

string

Yes

The Agent identifier.

Scope fields cannot be empty or use *. Each segment must be at most 128 bytes and cannot contain /. Do not pass in runId.

Request example

When you authenticate with an API Key, pass the instance name and API Key through the x-ots-instancename and x-ots-apikey request headers.

curl -X POST https://<endpoint>/GetWiki \
  -H "x-ots-instancename: <instance-name>" \
  -H "x-ots-apikey: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
  "memoryStoreName": "agent_memory",
  "scope": {
    "appId": "app-001",
    "tenantId": "user-001",
    "agentId": "assistant"
  }
}'

Response

Field

Description

name

The Wiki name. The default value is Wiki.

summary

The Wiki summary. Omitted when not set.

status

The Wiki status: draft or ready.

pageCount

The number of pages currently published.

hasPendingChanges

Whether the source has changes that have not yet been built and published.

latestBuild

The most recent build. Omitted when no build has been initiated.

createdAt, updatedAt

The creation and update times.

latestBuild contains the following fields.

Field

Description

status

The build status.

step

The current processing step. Omitted when no value is available.

progress

The current progress. Omitted when no value is available.

changes.added, modified, deleted

The number of source changes relative to the last published version.

changes.affectedPages

The number of pages affected by the source changes.

pageCount, totalBytes

The number of pages generated by the build and the total number of bytes of page data.

quality

The build quality metrics. Returned after the quality check is completed. quality contains sourceCoverage, groundedPageRate, brokenLinkCount, orphanPageCount, uncitedPageCount, and duplicateTitleCount.

errorMessage

The reason for the build failure. Omitted when there is no error.

createdAt, updatedAt, finishedAt

The build time information.

{
    "name": "Wiki",
    "status": "draft",
    "pageCount": 0,
    "hasPendingChanges": false,
    "createdAt": "2026-09-16T12:21:46.826185003Z",
    "updatedAt": "2026-09-16T12:21:46.826185003Z"
}