SuperAPI AI Directory

lark-wiki

General & other

View repository

Updated 10-16 09:28

About this skill

wiki (v2)

CRITICAL — Before starting, you MUST first use the Read tool to read ../lark-shared/SKILL.md, which contains authentication and permission handling

Shortcuts (recommended for priority use)

A Shortcut is a high-level wrapper for common operations (lark-cli wiki +<verb> [flags]). For operations with a Shortcut, use it first.

Shortcut Description
+node-create Create a wiki node with automatic space resolution

Known Limitations

Adding external users to Wiki spaces

wiki spaces members create with an external tenant user's email returns 131005: identity not found. The Lark API cannot look up or add external-organization users by email.

Workarounds:

Need Solution
Invite external user Use Lark admin console (admin.larksuite.com) → External collaborators → Invite
Add after invitation Use member_type: openid with the open_id issued after admin invitation
Public read access Set open_sharing: anyone_readable — no Lark account required
# After admin-console invitation:
lark-cli wiki spaces members create \
  --params '{"space_id":"<space_id>"}' \
  --data '{"member_id":"ou_XXXXXX","member_type":"openid","member_role":"member"}'

# Link-based public access (no account required):
lark-cli api PUT /open-apis/wiki/v2/spaces/<space_id>/setting \
  --data '{"open_sharing":"anyone_readable"}'

Reference: docs/known-issues/lark-external-user-api-gap.md

API Resources

lark-cli schema wiki.<resource>.<method>   # 调用 API 前必须先查看参数结构
lark-cli wiki <resource> <method> [flags] # 调用 API

Important: When using the native API, you must first run schema to view the --data / --params parameter structure. Do not guess the field format.

spaces

  • get — Get knowledge space information
  • get_node — Get knowledge space node information
  • list — Get knowledge space list

nodes

  • copy — Create a knowledge space node copy
  • create — Create a knowledge space node
  • list — Get knowledge space child node list

Permissions table

Method Required scope
spaces.get wiki:space:read
spaces.get_node wiki:node:read
spaces.list wiki:space:retrieve
nodes.copy wiki:node:copy
nodes.create wiki:node:create
nodes.list wiki:node:retrieve