Updating the Microservice Code Repository
Function
This API is used to update the microservice code repository.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{cloudProjectId}/component/{componentId}/repo/update
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Project ID. |
componentId |
Yes |
String |
Microservice ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
[items] |
Yes |
Array of ComponentRepoVO objects |
Microservice code repository. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Type. |
repo_id |
Yes |
String |
Repo repository ID. |
http_url |
Yes |
String |
Repository HTTP address. |
git_url |
Yes |
String |
Repository Git address. |
branch |
Yes |
String |
Branch. |
language |
Yes |
String |
Language. |
endpoint_id |
No |
String |
Endpoint ID. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Microservice ID. |
name |
String |
Microservice name. |
type |
String |
Type. |
description |
String |
Description. |
status |
String |
Status. |
parent_id |
String |
Parent ID. |
cloud_project_id |
String |
Project ID. |
repos |
Array of ComponentRepoVO objects |
Microservice code repository. |
is_followed |
Boolean |
Whether the component is added to favorites. |
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. |
Example Requests
PUT https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/component/f7ced2341b204d2b82c607c6f0de5b4a/repo/update [ { "type" : "codehub", "repo_id" : "804934", "http_url" : "https://example.com/test00001/maven.git", "git_url" : "git@example.com:test00001/maven.git", "branch" : "master", "language" : "python", "endpoint_id" : "" } ]
Example Responses
Status code: 200
Response body for updating the microservice code repository.
{ "id" : "f7ced2341b204d2b82c607c6f0de5b4a", "name" : "11", "type" : "microservice", "description" : "112", "status" : "active", "parent_id" : null, "cloud_project_id" : "2d09f712e9504b61b034cc8f40e475a8", "repos" : [ { "type" : "codehub", "repo_id" : "804934", "http_url" : "https://example.com/test00001/maven.git", "git_url" : "git@example.com:test00001/maven.git", "branch" : "master", "language" : "python", "endpoint_id" : "" } ], "is_followed" : null, "creator_id" : "05d8ca972f114765a8984795a8aa4d41", "creator_name" : "p_test5", "create_time" : "1709260209", "updater_id" : "05d8ca972f114765a8984795a8aa4d41", "updater_name" : "p_test5", "update_time" : "1719318495" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for updating the microservice code repository. |
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