gitlab api pro icon

gitlab api pro

Extended GitLab node

File → List

AI-generated

Summary

Lists files within a GitLab project repository, optionally filtered by a specific path and branch.

Inputs

  • Authentication — Select whether to use saved credentials or custom fields (default: credential).
  • server — Base URL of your GitLab instance, for example "https://gitlab.com" (used when authentication is Custom).
  • accessToken — Personal access token with API permissions (used when authentication is Custom).
  • Project Locator — Choose how to identify the project (ID or Path).
  • projectOwner — Namespace or owner of the project (used when Project Locator is Path).
  • projectName — Project slug or name (used when Project Locator is Path).
  • projectId — Numeric project ID (used when Project Locator is ID).
  • returnAll — Whether to return all results or only up to a given limit (default: false).
  • limit — Max number of results to return (default: 50).
  • path (required) — Path to the file or directory to list (e.g., 'src/index.ts').
  • fileRef — Reference such as a branch or commit SHA (e.g., 'main').

Output shape

a list of items, each representing a file object with details like name, path, mode, and size

If 'returnAll' is false, the node returns up to the specified limit (default 50).

Examples

Example 1: List all files in the root of the repository on the main branch

Project Locator: ID; Project ID: 123; Path: ''; File Ref: main; Return All: false; Limit: 50

Example 2: List files in a specific subdirectory

Project Locator: Path; Project Owner: mygroup; Project Name: myproject; Path: src/components; File Ref: develop

Links

Discussion