更新时间:2023-07-13 GMT+08:00
分享

示例2:发布凭证模板

场景描述

本章以发布凭证模板为例。

涉及其他云服务接口

发布凭证模板

  • 接口相关信息

    URI格式: POST /v1/{project_id}/tdis/credential-schema

  • 请求示例

    POST https://{tdis_endpoint}/v1/{project_id}/tdis/credential-schema

    {tdis_endpoint}信息请从表1 地区和终端节点获取。

    Body:

    {
      "title": "string",
      "identifier": "string",
      "attributes": [
        {
          "name": "name",
          "type": "someType",
          "description": "Identity number"
        }
      ],
      "issuer": "did:hwid:ebfeb1f712ebc6f1c276e12ec21"
    }
  • 响应示例

    {
      "schema_index": "string",
      "credential_schema": {
        "creator": "string",
        "title": "string",
        "identifier": "string",
        "attributes": [
          {
            "name": "name",
            "type": "someType",
            "description": "Identity number"
          }
        ],
        "version": 0
      }
    }

相关文档