Last update: July 4, 2022
List members of a consortium¶
Members in a Quorum Blockchain Service (QBS) consortium that have the OWNER role can list all current members using the GET
method on the ConsortiumManagement
endpoint of the QBS management API.
The URI endpoint has the following format:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ConsenSys.Blockchain/blockchainMembers/{blockchainMemberName}/consortiumMembers
/subscriptions/ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/consortiumMembers
This endpoint requires the following parameters:
{inviterSubscriptionId}
- Subscription ID.{inviterResourceGroupName}
- Resource group name.{inviterBlockchainMemberName}
- Managed app name of the owner of the consortium.
Optionally, you can specify two query parameters:
includeRemoved
- Set totrue
to see members that have left the consortium. The default isfalse
.includeDeleted
- Set totrue
to see members that have had their Azure resources deleted. The default isfalse
.
Code examples
curl -X GET https://management.onquorum.net/subscriptions/ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/consortiumMembers
const subscriptionId = 'ffd08efa-1f25-41b8-b4a1-0b7a5ec6fcd3';
const resourceGroup = 'QbsContosoGroup';
const appName = 'QbsContosoApp';
async function listMembers(includeDeleted, includeRemoved) {
const response = await fetch(
`https://management.onquorum.net/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/ConsenSys.Blockchain/blockchainMembers/${appName}/consortiumMembers?includeDeleted=${includeDeleted}&includeRemoved=${includeRemoved}`
{
method: 'GET'
}
);
return response.json();
}
readonly Guid subscriptionId = Guid.Parse("{azureSubscriptionId}");
readonly string resourceGroup = "QbsContosoGroup";
readonly string appName = "QbsContosoApp";
var members = await qbs.ListMembersAsync(subscriptionId, resourceGroup, appName, includeDeleted: false, includeRemoved: false);
foreach (var m in members.Value)
{
Console.WriteLine($"{m.Name}, role: {m.Role}, region: {m.Region}, created on: {m.CreatedDate}");
}