跳到主要内容

Create Repository

POST 

/api/v5/orgs/:org/repos

Request​

Path Parameters

    org stringrequired

    Organization's path (path/login)

Query Parameters

    access_token stringrequired

    User authorization code

Body

    namestringrequired

    Repository name

    descriptionstring

    Repository description

    homepagestring

    home page

    has_issuesboolean

    Allow issues to be raised. Default: Allowed (true)

    has_wikiboolean

    Provide Wiki or not. Default: Provide (true)

    can_commentboolean

    Allows users to comment on the repository. Default: Allowed (true)

    publicinteger

    Private repository type. 0(Private), 1(Public)

    auto_initboolean

    When the value is true, the repository will be initialized with a README. Default: not initialized (false).

    gitignore_templatestring

    Git Ignore Template

    license_templatestring

    License template

    pathstring

    Repository path

    default_branchstring

    Default branch name when initializing the project. Default: main

    import_urlstring

    The git address of the imported project, import_url and project_template parameters can only be passed in one.

    project_templatestring

    The path, import_url, and project_template parameters for the template project can only be passed in one at a time.

    repository_typestring

    Repository type. code: code repository, model: model repository, dataset: dataset repository, space: space, default: code

Responses​

Successful Response

Response Headers
    Schema
      idinteger
      full_namestring
      human_namestring
      urlstring
      pathstring
      namestring
      descriptionstring
      privateinteger
      publicinteger
      namespace object
      idinteger
      namestring
      pathstring
      develop_modestring
      regionnull
      cellstring
      kindstring
      full_pathstring
      full_namestring
      parent_idnull
      visibility_levelinteger
      enable_file_controlinteger
      owner_idnull
      empty_reponull
      starrednull
      visibilitystring
      ownernull
      creatornull
      forked_from_projectnull
      item_typenull
      main_repository_languagenull
      homepagestring