The Akachain Admin Tool provides RESTful API for an administrator to interact with a Hyperledger Fabric network. The list of supported functions are:
curl --location --request POST 'http://localhost:4001/api/msp/enrollUser' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "admin",
"enrollSecret": "adminpw",
"orgName": "Org1"
}'
curl --location --request POST 'http://localhost:4001/api/msp/registerUser' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"affiliation": "Org1.affiliation1",
"userName": "appUser",
"type": "client",
"attrs": [{ "name": "role", "value": "SuperAdmin", "ecert": true }, {...}]
}'
curl --location --request POST 'http://localhost:4001/api/msp/revokeUser' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"userName": "appUser",
}'
curl --location --request POST 'http://localhost:4001/api/channel/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"channelName": "mychannel",
"channelConfig": "mychannel.tx"
}'
curl --location --request POST 'http://localhost:4001/api/channel/join' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"channelName": "mychannel",
"peer": "peer0.example.com"
}'
curl --location --request POST 'http://localhost:4001/api/channel/list' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"peer": "peer0.example.com"
}'
curl --location --request POST 'http://localhost:4001/api/chaincode/install' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"chaincodeId": "abstore",
"chaincodeVersion": "v1.0.0.0",
"chaincodeType": "golang",
"chaincodePath": "chaincodes/abstore/go"
}'
curl --location --request POST 'http://localhost:4001/api/chaincode/approve' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Org1",
"chaincodeId": "abstore",
"chaincodeVersion": "2",
"packageId": "abstore:36d51e930bee55f6ca59e825263f7b7ff279de1dc6a3884f3d3876c658c114e9",
"sequence": "1",
"initRequired": false
}'
curl --location --request POST 'http://localhost:4001/api/chaincode/commit' \
--header 'Content-Type: application/json' \
--data-raw '{
"chaincodeId": "abstore",
"chaincodeVersion": "2",
"sequence": "2",
"initRequired": false,
"orgs": ["Org1", "Org2"]
}'