weaver-e10-api

泛微 E10 系统 API 调用工具,支持流程创建、待办查询、审批提交、流程退回等操作。使用 OAuth2.0 认证,自动管理 token 刷新。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "weaver-e10-api" with this command: npx skills add xfnet/clawhub-skill-weaver-e10-api

泛微 E10 API 调用 Skill

功能列表

功能命令说明
获取 Tokenweaver-e10 auth获取/刷新 access_token
创建流程weaver-e10 create发起新的审批流程
查询待办weaver-e10 todos获取用户待办列表
提交审批weaver-e10 approve提交/同意流程
退回流程weaver-e10 reject退回审批流程
查询流程weaver-e10 get获取流程详情

环境变量配置

/ollama/workspace/.env/weaver-e10.env 中配置:

# 泛微 E10 API 配置
# ⚠️ 请替换为你自己的实际值,不要使用示例中的占位符
WEAVER_API_BASE=http://your-weaver-server:port
WEAVER_APP_KEY=your_app_key_here
WEAVER_APP_SECRET=your_app_secret_here
WEAVER_CORPID=your_corpid_here

🔒 安全警告

  1. 凭证保管.env/weaver-e10.env 文件包含敏感凭证,请:

    • 不要提交到 Git 等版本控制系统
    • 设置文件权限:chmod 600 .env/weaver-e10.env
    • 不要通过聊天工具、邮件等方式明文传输
  2. Token 缓存:Token 缓存在 ~/.weaver-e10/token.json,请:

    • 确保家目录权限安全
    • 定期清理过期 token
    • 不要在共享主机上使用
  3. 网络隔离:建议在内部网络使用,避免暴露在公网

使用示例

1. 获取 Token(自动)

# 首次获取
weaver-e10 auth

# 输出
{
  "access_token": "xxx",
  "expires_in": 7200,
  "refresh_token": "xxx"
}

2. 创建流程

weaver-e10 create \
  --userid 731942425541656576 \
  --workflow-id 5955363498899145211 \
  --title "请假申请" \
  --form-data '{"dataDetails": [{"fieldId": "123", "content": "张三"}]}' \
  --next-flow

3. 查询待办

weaver-e10 todos --userid 731942425541656576 --page 1 --size 20

4. 提交审批

weaver-e10 approve \
  --userid 731942425541656576 \
  --request-id 848951654078865410 \
  --remark "同意"

5. 退回流程

weaver-e10 reject \
  --userid 731942425541656576 \
  --request-id 848951654078865410 \
  --reject-type 1 \
  --remark "资料不全,请补充"

认证流程

1. 调用 /oauth2/authorize 获取 code(10 分钟有效)
2. 调用 /oauth2/access_token 用 code 换 token(2 小时有效)
3. token 过期后自动用 refresh_token 刷新(24 小时有效)
4. refresh_token 过期后重新授权

错误码

错误码说明
0成功
40001token 无效或过期
40002权限不足
40003参数错误
50000系统错误

注意事项

  1. Token 管理:token 自动缓存到 ~/.weaver-e10/token.json
  2. 自动刷新:token 过期前 5 分钟自动刷新
  3. 表单数据:formData 必须是合法 JSON
  4. 人员 ID:userid 必须是泛微系统中的用户 ID

文件结构

weaver-e10-api/
├── SKILL.md              # 本文档
├── _meta.json            # 元数据
├── scripts/
│   ├── weaver-e10.py     # 主程序
│   └── auth.py           # 认证模块
└── examples/
    ├── create_request.json
    └── approve_request.json

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Leads

Leads - command-line tool for everyday use

Registry SourceRecently Updated
General

Bmi Calculator

BMI计算器。BMI计算、理想体重、健康计划、体重追踪、儿童BMI、结果解读。BMI calculator with ideal weight, health plan. BMI、体重、健康。

Registry SourceRecently Updated
General

Blood

Blood — a fast health & wellness tool. Log anything, find it later, export when needed.

Registry SourceRecently Updated
General

Better Genshin Impact

📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 - UI A better genshin impact, c#, auto-play-game, automatic, g...

Registry SourceRecently Updated