Create projects and repositories.
Function
After a project is created, the parameters for creating a warehouse group are generated in the background. The parameters include the warehouse name, template ID, whether to import project members, and home project.
URI
POST /v2/projects/repositories
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
import_members |
No |
Integer |
Indicates whether to import project members. The options are as follows: 0->Do not import project members; 1->Import project members |
project_name |
Yes |
String |
Project name. The options are as follows: The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_), and must start with a letter. |
repo_name |
Yes |
String |
Repository name. The options are as follows: The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_), and must start with a letter. Minimum: 2 Maximum: 128 |
type |
No |
String |
Project type. The options are normal and scrum. |
visibility_level |
No |
Integer |
Whether the warehouse is a public warehouse |
external_project_info |
No |
ExternalKeyMessage object |
Third-party service information |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
ProjectRepository object |
Result |
status |
String |
Status code in a response |
Example Requests
POST https://{endpoint}/v2/projects/repositories { "project_name" : "testworld", "repo_name" : "demotest1", "import_members" : "0", "visibility_level" : "20", "type" : "normal" }
Example Responses
Status code: 200
OK
{ "result" : { "repositoryUuid" : "02637c34ba954ab5bd37ff9537fe05b4", "projectUuid" : "1aeda7a6070d4119b7d8b45e5641599b" }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot