workos-office / docs /10_API_Gateway /examples.json
dellweb3's picture
Work OS validated demo local-v0.8
99caad5 verified
Raw History Blame Contribute Delete
6.52 kB
{
"description": "Contract examples only; not execution results. Secrets and tokens are placeholders.",
"skill_source_fixtures": [
{
"skill_id": "document-understand",
"content": "从来文提取主题、对象、时限,缺项标记待确认。"
},
{
"skill_id": "knowledge-cite",
"content": "仅使用获准知识库,保留来源、版本和引用。"
},
{
"skill_id": "document-draft",
"content": "按文种结构写作,不虚构事实与依据。"
},
{
"skill_id": "document-review",
"content": "检查日期、引用和格式,保留待确认项。"
}
],
"cases": [
{
"schema": "LoginInput",
"value": {
"username": "demo-writer-a",
"password": "<deployment-configured-password>"
}
},
{
"schema": "Token",
"value": {
"access_token": "<access-token>",
"token_type": "Bearer",
"expires_in": 900,
"auth_mode": "demo"
}
},
{
"schema": "WorkspaceCreate",
"value": {
"title": "培训通知起草"
}
},
{
"schema": "Workspace",
"value": {
"workspace_id": "ws-001",
"parent_id": "personal-u-001",
"title": "培训通知起草",
"version": 1,
"status": "active"
}
},
{
"schema": "MessageCreate",
"value": {
"content": "请根据来文和培训制度起草培训通知,缺少日期时标记待确认。"
}
},
{
"schema": "Message",
"value": {
"message_id": "msg-001",
"workspace_id": "ws-001",
"role": "user",
"content": "请起草培训通知。",
"created_at": "2026-10-10T02:00:00Z"
}
},
{
"schema": "StartRun",
"value": {
"employee_id": "official-document-writer",
"input_message_id": "msg-001"
}
},
{
"schema": "Run",
"value": {
"run_id": "run-001",
"workspace_id": "ws-001",
"status": "queued",
"last_sequence": 0,
"mode": "real",
"workflow_id": "official-document",
"workflow_version": 1,
"effective_skills": [
{
"skill_id": "document-understand",
"version": 1,
"content_hash": "323691abf65edf6247ffa624dff3c83adb36c42cfc025cb76e62435611362336"
},
{
"skill_id": "knowledge-cite",
"version": 1,
"content_hash": "c886c9e3494f8e3585180f15bfb5266f2f07423fb3164cff5a54a50eed452f94"
},
{
"skill_id": "document-draft",
"version": 1,
"content_hash": "07c1d4078d9fd24c1c5f018cbf536ce51ac47ce51bfb16bf3976f161cfafe136"
},
{
"skill_id": "document-review",
"version": 1,
"content_hash": "2f482de6114365419406cada457eee531d8e38485a5355694e146354f8ac26f4"
}
],
"artifact_id": null
}
},
{
"schema": "RunEventEnvelope",
"value": {
"event_id": "evt-005",
"event_type": "task.step.completed",
"event_version": 1,
"tenant_id": "demo-tenant",
"owner_user_id": "u-001",
"workspace_id": "ws-001",
"run_id": "run-001",
"step_id": "retrieve",
"sequence": 5,
"trace_id": "trace-001",
"occurred_at": "2026-10-10T02:00:00Z",
"payload": {
"step": "retrieve",
"progress": 40,
"citation_ids": [
"cite-001"
]
}
}
},
{
"schema": "ArtifactPatch",
"value": {
"expected_version": 1,
"content": "关于开展办公技能培训的通知\n培训日期:待确认。"
}
},
{
"schema": "Artifact",
"value": {
"artifact_id": "art-001",
"workspace_id": "ws-001",
"version": 2,
"content": "关于开展办公技能培训的通知\n培训日期:待确认。",
"content_hash": "84f2a76803982f8b2e4550b246f82e6dfc44de2f1807697836f2437944f53753",
"approval_status": "unconfirmed",
"citation_ids": [
"cite-001"
]
}
},
{
"schema": "ApprovalInput",
"value": {
"artifact_id": "art-001",
"expected_version": 2,
"content_hash": "84f2a76803982f8b2e4550b246f82e6dfc44de2f1807697836f2437944f53753"
}
},
{
"schema": "Error",
"value": {
"code": "ARTIFACT_VERSION_CONFLICT",
"message": "草稿已更新,请查看最新版本后重新确认。",
"trace_id": "trace-002",
"details": {
"expected_version": 2,
"current_version": 3
}
}
},
{
"schema": "SkillCreate",
"value": {
"name": "公文日期核对",
"category": "document",
"content": "核对正文中的日期;缺少的信息标记待确认,不自行推测。"
}
},
{
"schema": "SearchInput",
"value": {
"workspace_id": "ws-001",
"query": "培训通知的写作要求",
"base_ids": [
"kb-policy",
"kb-templates"
],
"top_k": 5
}
},
{
"schema": "CitationPage",
"value": {
"items": [
{
"citation_id": "cite-001",
"document_id": "doc-demo-001",
"document_version": 1,
"title": "培训通知示例规范(合成)",
"locator": "第2节",
"snippet": "培训通知应明确培训对象、时间与地点。"
}
],
"next_cursor": null
}
},
{
"schema": "Notification",
"value": {
"notification_id": "nt-001",
"run_id": "run-001",
"title": "培训通知已保存",
"read": false,
"delivery_status": "pending",
"provider_mode": "real"
}
},
{
"schema": "ToolReceipt",
"value": {
"receipt_id": "receipt-001",
"run_id": "run-001",
"artifact_id": "art-001",
"artifact_version": 2,
"status": "succeeded",
"execution_location": "pc"
}
}
]
}