跳到主要内容

Get Contents at Specific Repository Path

GET 

/api/v5/repos/:owner/:repo/contents/:path

Request​

Path Parameters

    owner stringrequired

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

    repo stringrequired

    Repository path (path)

    path stringrequired

    The path of the file.

Query Parameters

    access_token string

    User authorization code

    ref string

    Branch, tag, or commit. Defaults to the repository's default branch (main).

Responses​

Successful Response

Response Headers
    Schema
      typestring
      encodingstring
      sizeinteger
      namestring
      pathstring
      contentstring
      shastring
      urlstring
      html_urlstring
      download_urlstring
      _links object
      selfstring
      htmlstring