SuperAPI AI Directory

zentao-department

General & other

View repository

Updated 10-15 22:37

About this skill

department (v1)

CRITICAL — Before starting, you MUST first use the Read tool to read ../zentao-shared/SKILL.md, which contains authentication, environment variable configuration, error handling, and general options descriptions.

Commands

Core Concepts

  • Department: An organizational structure unit in ZenTao, used to manage the department to which a user belongs.
  • Parent: Departments can have hierarchical relationships; the parent field indicates the parent department ID.
  • Path: The full path of the department, such as /1/2/3/ indicates the full path from the root department to the current department.

Department Fields

Field Type Description
id u64 Department ID
name string Department name
parent u64 Parent department ID (0 indicates root department)
order u64 Sort order
path string Department path, such as /1/2/

Common Use Cases

1. View all departments

# 列出所有部门
zentao-cli department list

2. View details of a specific department

# 获取部门详情
zentao-cli department get 1

Examples

# 列出所有部门
zentao-cli department list

# 获取部门详情
zentao-cli department get 1

Gotchas

  1. Department hierarchy: Departments have hierarchical relationships; you can use the path field to understand the department's full hierarchical position.

  2. parent=0: When parent is 0, it indicates that the department is a root department.

  3. Association with users: A user's dept field is associated with the department ID.