跳到主要内容

List All Repositories For Authorized Users

GET 

/api/v5/user/repos

Request​

Query Parameters

    access_token stringrequired

    User authorization code

    visibility string

    public, private, or all; default: all

    affiliation string

    owner (repository owner), collaborator (authorized user as a member of the repository), organization_member (authorized user as a member of the organization that owns the repository and has access to the repository), enterprise_member (authorized user as a member of the enterprise that owns the repository and has access to the repository), admin (all authorized users including all repositories in managed organizations and all repositories in managed enterprises). These can be combined with commas. For example: owner, organization_member or owner, collaborator, organization_member.

    type string

    Filter user repositories: created(owner), personal, member, public, private. Cannot be used with the affiliation parameter, otherwise a 422 error will occur. Should be used with the visibility parameter, which has higher priority.

    sort string

    Sort by: created, updated, pushed, full_name. Default: full_name

    direction string

    If the sort parameter is full_name, use ascending (asc). Otherwise, use descending (desc).

    q string

    Search keyword

    page integer

    The current page number

    per_page integer

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

    repo_type string

    Filter repository type, which can be code: code repository, model: model repository, dataset: dataset repository, space: space, all: all repository types. Default: code

Responses​

Successful Response

Response Headers
    Schema
    • Array [
    • idinteger
      full_namestring
      human_namestring
      urlstring
      namespace object
      idinteger
      typestring
      namestring
      pathstring
      html_urlstring
      pathstring
      namestring
      descriptionstring
      statusWarehouse status, 0: Start (indicating the warehouse is not archived), 2: Closed (indicating the warehouse is archived) (string)
      ssh_url_to_repostring
      http_url_to_repostring
      web_urlstring
      homepagestring
      membersstring[]
      assignee object[]
    • Array [
    • idstring
      loginstring
      namestring
      avatar_urlstring
      html_urlstring
      typestring
    • ]
    • forks_countinteger
      stargazers_countinteger
      project_labels object[]
    • Array [
    • object
    • ]
    • relationstring
      permission object
      pullinteger
      pushinteger
      admininteger
      internalinteger
      open_issues_countinteger
      has_issueinteger
      watchedinteger
      watchers_countinteger
      assignees_numberinteger
      enterprise object
      idinteger
      pathstring
      html_urlstring
      typestring
      default_branchstring
      forkinteger
      owner object
      idstring
      loginstring
      namestring
      typestring
      assigner object
      idstring
      loginstring
      namestring
      typestring
      privateinteger
      publicinteger
      repo_typestring
    • ]