Skip to content

Conversation

@alanlvle
Copy link

@alanlvle alanlvle commented Nov 9, 2025

Parameters of the /repository/tree interface

  1. Required parameters
    ID (string or integer)
    Description: The ID or URL encoding path of the project (such as namespace/project name).
    Example: id=42 or id=mygroup% 2Fmyproject.
  2. Optional parameters
    Path (string)
    Description: Specify the subdirectories path within the repository (default is the root directory).
    Example: path=src/components means to view the contents of the src/components directory.
    Ref (string)
    Description: Branch name, label, or commit hash (defaults to the default branch of the project, usually main or master).
    Example: ref=develop or ref=abc123f (submit hash).
    Recursive (Boolean value)
    Explanation: Recursively return all subdirectories' contents (default is false, only direct sub items are returned).
    Example: Recursive=true can obtain the complete directory tree.
    Per_rage (integer)
    Description: The number of items returned per page (used for pagination, in conjunction with the page parameter).
    Example: per_mage=20 means a maximum of 20 files/folders per page.
    Page (integer)
    Description: Specify the page number of the returned result (in conjunction with per_mage to implement pagination).
    Example: Page=2 returns data from the second page.

@zereight
Copy link
Owner

Can you plz give gitlab docs?
I dont understand why pagination is removed.
https://docs.gitlab.com/api/repositories/#list-repository-tree

Copy link
Owner

@zereight zereight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants