跳到主要内容

Get Repository Directory Tree

GET 

/api/v5/repos/:owner/:repo/git/trees/:sha

Request​

Path Parameters

    owner stringrequired

    Repository space address (organization or individual's address path)

    repo stringrequired

    Repository path (path)

    sha stringrequired

    It can be a branch name (e.g., master), a Commit, or a directory Tree SHA.

Query Parameters

    access_token string

    User authorization code

    page integer

    The current page number

    per_page integer

    The number of items per page, with a maximum of 100. The default is 20.

    recursive integer

    Assign 1 to recursively retrieve the directory

    file_path string

    File tree path

Responses​

Successful Response

Response Headers
    Schema
      tree object[]
    • Array [
    • shastring
      namestring
      typestring
      pathstring
      modestring
      md5string
    • ]