Create Repository
POST/api/v5/orgs/:org/repos
Request
Path Parameters
Organization's path (path/login)
Query Parameters
User authorization code
- application/json
Body
Repository name
Repository description
home page
Allow issues to be raised. Default: Allowed (true)
Provide Wiki or not. Default: Provide (true)
Allows users to comment on the repository. Default: Allowed (true)
Private repository type. 0(Private), 1(Public)
When the value is true, the repository will be initialized with a README. Default: not initialized (false).
Git Ignore Template
License template
Repository path
Default branch name when initializing the project. Default: main
The git address of the imported project, import_url and project_template parameters can only be passed in one.
The path, import_url, and project_template parameters for the template project can only be passed in one at a time.
Repository type. code: code repository, model: model repository, dataset: dataset repository, space: space, default: code
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
namespace object
{
"id": 0,
"full_name": "string",
"human_name": "string",
"url": "string",
"path": "string",
"name": "string",
"description": "string",
"private": 0,
"public": 0,
"namespace": {
"id": 0,
"name": "string",
"path": "string",
"develop_mode": "string",
"cell": "string",
"kind": "string",
"full_path": "string",
"full_name": "string",
"visibility_level": 0,
"enable_file_control": 0
},
"visibility": "string",
"homepage": "string"
}
{
"id": 34171993,
"full_name": "daming_1/test_create_project_2",
"human_name": "daming/test_create_project_2",
"url": "https://gitcode.com/api/v5/repos/daming_1/test_create_project_2",
"path": "test_create_project_2",
"name": "test_create_project_2",
"description": "description",
"private": false,
"public": true,
"namespace": {
"id": 74962,
"name": "group1111",
"path": "group11111",
"develop_mode": "normal",
"region": null,
"cell": "default",
"kind": "group",
"full_path": "group11111",
"full_name": "group1111",
"parent_id": null,
"visibility_level": 20,
"enable_file_control": false,
"owner_id": null
},
"empty_repo": null,
"starred": null,
"visibility": "public",
"owner": null,
"creator": null,
"forked_from_project": null,
"item_type": null,
"main_repository_language": null,
"homepage": "http://www.baidi.com"
}