飞书 icon

飞书

飞书 API 集成,支持多种飞书功能

Actions105

组织架构 → 批量获取员工列表

AI-generated

Summary

Retrieve a list of employees in bulk from the organizational directory in Feishu, with support for filtering, specifying employee and department ID types, selecting fields to return, and controlling pagination and batching options.

Inputs

  • 凭证类型 (required) — Selects the credential type: user-level or application-level credentials.
  • 筛选条件 — Define up to 10 filter conditions combined with AND logic; department ID and employment status must be used together.
  • 员工 ID 类型 (required) — Specifies the type of employee ID to use for the query, e.g., Open ID, Union ID, or Employee ID.
  • 部门 ID 类型 (required) — Defines the type of department ID used in the call, e.g., Open Department ID or Department ID.
  • 查询字段 (required) — Multi-select list of employee data fields to retrieve; controls which fields are returned in the response.
  • Return All (required) — Whether to return all matching employees or limit the number of results.
  • Limit — Maximum number of employee records to return if Return All is false.
  • Options — Additional options such as batching parameters (items per batch and batch interval in milliseconds) and request timeout.

Output shape

a list of employee records matching the filters and options specified

The returned data includes only the fields specified in the selected fields input, and respects pagination or the Return All setting. When batching is enabled, requests are made concurrently in specified batch sizes with optional intervals.

Examples

Example 1: Fetch 50 employees from department with ID 'dept_123' who are currently employed, returning their employee IDs and names.

Set filter to department ID = 'dept_123' and employment status = 1, select employee_id and name for query fields, set Return All to false and Limit to 50.

Links

Discussion