Removing a Peer from a Channel
Function
This API is used to remove a peer in an organization from a channel. If the target peer is the last one in the channel, call the Removing Organization from a Channel API to remove it.
URI
PUT /v2/{project_id}/blockchains/{blockchain_id}/{channel_id}/peers/quit
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID obtained from IAM. Generally, a project ID contains 32 characters. |
blockchain_id |
Yes |
String |
BCS service ID. You can obtain it by calling the Querying the BCS Service List API. |
channel_id |
Yes |
String |
Blockchain channel name, which is the value of the name field in the channels returned by the Querying Service Information API. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by calling the IAM API used to obtain a user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
org_name |
Yes |
String |
Organization name. You can enter only one organization name. |
peers |
Yes |
Integer |
Number of peers to be removed. Value range: [0, total number of the organization peers]. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
operation_id |
String |
Request result. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message. Minimum: 2 Maximum: 512 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message. Minimum: 2 Maximum: 512 |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message. Minimum: 2 Maximum: 512 |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message. Minimum: 2 Maximum: 512 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message. Minimum: 2 Maximum: 512 |
Example Requests
{ "org_name" : "organization", "peers" : 1 }
Example Responses
Status code: 200
Ok
{ "operation_id" : "BCSSVC01-03-1617158790255323683" }
Status code: 400
Bad Request
{ "error_code" : "BCS.4001245", "error_msg" : "The org name is invalid..." }
Status code: 401
Unauthorized
{ "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 403
Forbidden
{ "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method" }
Status code: 404
Not Found
{ "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found" }
Status code: 500
InternalServerError
{ "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error" }
Status Codes
Status Code |
Description |
---|---|
200 |
Ok |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
InternalServerError |
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