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
normalstate, 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 inrunId. -
Building is an asynchronous process. Query the build status through the
latestBuild.statusfield returned by this interface, and poll until the status becomesreadyor the build fails.
Request parameters
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
The name of the memory store. |
|
|
object |
Yes |
The full three-segment Agent Scope. |
|
|
string |
Yes |
The application identifier. |
|
|
string |
Yes |
The tenant or user identifier. |
|
|
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 |
|
|
The Wiki name. The default value is |
|
|
The Wiki summary. Omitted when not set. |
|
|
The Wiki status: |
|
|
The number of pages currently published. |
|
|
Whether the source has changes that have not yet been built and published. |
|
|
The most recent build. Omitted when no build has been initiated. |
|
|
The creation and update times. |
latestBuild contains the following fields.
|
Field |
Description |
|
|
The build status. |
|
|
The current processing step. Omitted when no value is available. |
|
|
The current progress. Omitted when no value is available. |
|
|
The number of source changes relative to the last published version. |
|
|
The number of pages affected by the source changes. |
|
|
The number of pages generated by the build and the total number of bytes of page data. |
|
|
The build quality metrics. Returned after the quality check is completed. |
|
|
The reason for the build failure. Omitted when there is no error. |
|
|
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"
}