Leave a consortium
Members in a Quorum Blockchain Service (QBS) consortium that have the OWNER role can remove other members from the consortium.
If a member in the network chooses to leave the consortium and has the MEMBER role, they must contact another member in the consortium that also has the OWNER role to remove them from the consortium.
To remove a member from a consortium, use the DELETE
method on the ConsortiumManagement
endpoint of QBS management API.
The URI endpoint has the following format:
- Syntax
- Example
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ConsenSys.Blockchain/blockchainMembers/{blockchainMemberName}/consortiumMembers/{memberNameToRemove}
/subscriptions/ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/consortiumMembers/QbsFabrikhamApp
This endpoint requires the following parameters:
{inviterSubscriptionId}
- Subscription ID.{inviterResourceGroupName}
- Resource group name.{inviterBlockchainMemberName}
- Managed app name of the owner of the consortium.{memberNameToRemove}
- Name of the QBS managed app of the member to remove from the consortium.
note
The leaving member will no longer be part of the consortium, but retains all their data unless they choose to delete their managed app.
- cURL
- JavaScript
- C#
- Java
- Python
curl -X DELETE https://management.onquorum.net/subscriptions/{azureSubscriptionId}/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/consortiumMembers/QbsFabrikhamApp
const subscriptionId = '{azureSubscriptionId}';
const resourceGroup = 'QbsContosoGroup';
const appName = 'QbsContosoApp';
const memberName = 'QbsFabrikhamApp';
async function removeMember(memberName) {
const response = await fetch(
`https://management.onquorum.net/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/ConsenSys.Blockchain/blockchainMembers/${appName}/consortiumMembers/${memberName}`
{
method: 'DELETE'
}
);
return response.json();
}
HttpClient httpClient = new();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", bearerToken);
// https://www.nuget.org/packages/ConsenSys.QBS.Client
ConsenSys.QBS.QbsClient qbs = new(httpClient);
readonly Guid subscriptionId = Guid.Parse("{azureSubscriptionId}");
readonly string resourceGroup = "QbsContosoGroup";
readonly string appName = "QbsContosoApp";
readonly string memberName = "QbsFabrikhamApp";
await qbs.RemoveMemberAsync(subscriptionId, resourceGroup, appName, memberNameToRemove: memberName);
String subscriptionId = "ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3";
String resourceGroup = "QbsContosoGroup";
String appName = "QbsContosoApp";
String memberName = "QbsFabrikhamApp";
String endpoint = MessageFormat.format(
"https://management.onquorum.net/subscriptions/{0}/resourceGroups/{1}/providers/ConsenSys.Blockchain/blockchainMembers/{2}/consortiumMembers/${3}",
subscriptionId, resourceGroup, appName, memberName);
URL url = new URL(endpoint);
HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestMethod("DELETE");
http.setRequestProperty("Bearer", bearerToken);
import requests
subscriptionId = "ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3"
resourceGroup = "QbsContosoGroup"
appName = "QbsContosoApp"
memberName = "QbsFabrikhamApp"
endpoint = "https://management.onquorum.net/subscriptions/{}/resourceGroups/{}/providers/ConsenSys.Blockchain/blockchainMembers/{}/consortiumMembers/{}"
message = requests.delete(endpoint.format(subscriptionId, resourceGroup, appName, memberName))