Search
K

DID API

This document explains how to use DID APIs. DID APIs are written in JSON-RPC and support HTTP protocol.

Endpoint

Using APIs

DID APIs support HTTP protocol. It uses /did url path.

HTTP

curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"setAttribute","params":["0xb596c495229d43f9c6c3db9b76325419d4970aa4", "did/svc/test"],"id":1}' http://hostname:6002/block{
"jsonrpc":"2.0",
"id":1,
"result":{
"resultCode":"200",
"resultMessage":"Success",
"resultData":{
"transactionId":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
}