Create a Change
Function
Creating a change.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{cloudProjectId}/change-request/create
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
component_id |
Yes |
String |
Microservice ID. |
title |
Yes |
String |
Change title. |
type |
No |
String |
Change type. The default value is code. |
workitem_ids |
Yes |
Array of strings |
Work item ID. |
repos |
Yes |
Array of repos objects |
Information of the change code repository. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repo_id |
Yes |
String |
Repo code repository ID. |
http_url |
Yes |
String |
HTTP address of the code repository. |
git_url |
Yes |
String |
Git address of the code repository. |
feature_branch |
Yes |
String |
Feature branch. |
main_branch |
Yes |
String |
Default branch. |
delete_branch_after_released |
Yes |
Boolean |
Whether to delete the feature branch after release. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Change ID. |
component_id |
String |
Microservice ID. |
status |
String |
Status. |
title |
String |
Title. |
repos |
Array of repos objects |
Information of the change code repository. |
workitem_ids |
Array of strings |
Work item ID. |
release_time |
String |
Release time. |
creator_id |
String |
Creator ID. |
creator_name |
String |
Creator name. |
create_time |
String |
Creation time. |
updater_id |
String |
Updater ID. |
updater_name |
String |
Updater name. |
update_time |
String |
Update time. |
Parameter |
Type |
Description |
---|---|---|
repo_id |
String |
Repo code repository ID. |
http_url |
String |
HTTP address of the code repository. |
git_url |
String |
Git address of the code repository. |
feature_branch |
String |
Feature branch. |
main_branch |
String |
Default branch. |
delete_branch_after_released |
Boolean |
Whether to delete the feature branch after release. |
Example Requests
POST https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/change-request/create { "component_id" : "f7ced2341b204d2b82c607c6f0de5b4a", "title" : "aaaaa", "type" : "code", "workitem_ids" : [ "2332711" ], "repos" : [ { "http_url" : "https://example.com/test00001/maven.git", "git_url" : "git@example.com:test00001/maven.git", "feature_branch" : "aaaaaa", "main_branch" : "master", "delete_branch_after_released" : false, "repo_id" : "804934" } ] }
Example Responses
Status code: 200
ok
{ "id" : "495d94a305d4456f9a8a1efaaf2d34e0", "component_id" : "f7ced2341b204d2b82c607c6f0de5b4a", "status" : "developing", "title" : "aaaa", "repos" : [ { "repo_id" : "804934", "http_url" : "https://example.com/test00001/maven.git", "git_url" : "git@example.com/test00001/maven.git", "feature_branch" : "aaa", "main_branch" : "master", "delete_branch_after_released" : false } ], "workitem_ids" : [ "2332711" ], "release_time" : null, "creator_id" : "05d8ca972f114765a8984795a8aa4d41", "creator_name" : "p_test5", "create_time" : "1719217063", "updater_id" : "05d8ca972f114765a8984795a8aa4d41", "updater_name" : "p_test5", "update_time" : "1719217063" }
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