4. 创建AuthorityIssuer

调用接口:

标题描述
接口名weid/api/invoke
MethodPOST
Content-Typeapplication/json

接口入参:

KeyValueRequired
functionNameregisterAuthorityIssuerY
functionArg Y
functionArg.weIdWeIdentity DID,与 SDK直接调用的方式入参 一致,下同Y
functionArg.name机构名Y
transactionArg Y
transactionArg.invokerWeId用于索引私钥的WeIdentity DID,服务器端会凭此找到所托管的私钥。注意:如果在这里填入了预先定义在application.properties里的暗语,则可确保有足够的权限。Y
v版本号Y

接口调用示例:

  1. {
  2. "functionArg": {
  3. "weid": "did:weid:0x1Ae5b88d37327830307ab8da0ec5D8E8692A35D3",
  4. "name": "Sample College"
  5. },
  6. "transactionArg": {
  7. "invokerWeId": "did:weid:0x12025448644151248e5c1115b23a3fe55f4158e4153"
  8. },
  9. "functionName": "registerAuthorityIssuer",
  10. "v": "1.0.0"
  11. }

接口返回: application/json

KeyValue
ErrorCode错误码,0表示成功
ErrorMessage错误信息
respBodyTrue/False

返回示例:

  1. {
  2. "ErrorCode": 0,
  3. "ErrorMessage": "success",
  4. "respBody": True
  5. }