Deleting a Chaincode
Function
This API is used to delete a chaincode from blockchain nodes.
URI
DELETE /v2/agent/apis/chaincode/uninstall
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
chaincode_name |
Yes |
String |
Chaincode name, which can contain 6 to 25 lowercase letters and digits and must start with a letter. Minimum: 6 Maximum: 25 |
chaincode_version |
Yes |
String |
Chaincode version. Only digits, periods (.), and hyphens (-) are allowed. The value must start and end with a digit, and the periods (.) and hyphens (-) cannot be adjacent. |
target_peers |
Yes |
Array of TargetPeer objects |
Details of peers where the chaincode is uninstalled. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_peer_num |
Integer |
Total number of peers where the chaincode is installed. |
success_peer_num |
Integer |
Number of peers where the chaincode is installed successfully. |
fail_peer_num |
Integer |
Number of peers where the chaincode fails to be installed. |
fail_peers |
Array of strings |
Details of peers where the chaincode fails to be installed. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error description. |
error_msg |
String |
Error description. |
Example Requests
DELETE https://192.168.0.90:30603/v2/agent/apis/chaincode/uninstall { "chaincode_name" : "chaincode1", "chaincode_version" : "1.0", "target_peers" : [ { "org_id" : "9802af57cfab764dc12b860c44b01969575e83c9", "peer_id" : "peer-9802af57cfab764dc12b860c44b01969575e83c9-1.peer-9802af57cfab764dc12b860c44b01969575e83c9.default.svc.cluster.local" } ] }
Example Responses
Status code: 200
Success
{ "total_peer_num" : 4, "success_peer_num" : 4, "fail_peer_num" : 0, "fail_peers" : [ ] }
Status code: 400
Bad Request
{ "error_code" : "BCS.4000013", "error_message" : "request body is too large" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Bad Request |
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