Collabin icon

Collabin

Read and manage leave requests, users, teams and the workday calendar in Collabin

Actions11

User → Get Leaves

AI-generated

Summary

Fetch a user's leave requests, optionally filtered and limited.

Inputs

  • userId (required) — Numeric ID of the user whose leaves to retrieve.
  • returnAll — Whether to return all matching leaves; if false, the limit parameter controls the number of results returned.
  • limit — Maximum number of leave records to return; only applicable when returnAll is false; defaults to 50.
  • filters — Collection of filter criteria such as status (PENDING, APPROVED, REJECTED) to narrow the result set.

Output shape

A collection of leaf objects representing the user's leave requests.

If returnAll is true, all matching leaves are returned regardless of limit; otherwise up to limit items are returned; pagination is handled internally by the node.

Examples

Example 1: Retrieve pending leaves for user 101, returning up to 5 results.

resource=user, operation=getLeaves, userId=101, returnAll=false, limit=5, filters={"status":"PENDING"}

Example 2: Fetch all approved leaves for a user, no limit.

resource=user, operation=getLeaves, userId=200, returnAll=true, filters={"status":"APPROVED"}

Example 3: Get user's leave history with status REJECTED limited to 10 entries.

resource=user, operation=getLeaves, userId=150, returnAll=false, limit=10, filters={"status":"REJECTED"}

Links

Discussion