get Digital Twin
GEThttps://api.mtrust.io/api/gemini/v1/digital-twin/object/:objectId
get Digital Twin for the Id of the physical Object, resolve the DID document of the Digital Twin by handing over the Object Id
Request
Path Parameters
objectId stringrequired
the physical object identifier
Responses
- 200
DID identifier base don the M-Trust agent
- application/json
- Schema
- Example (auto)
Schema
did stringrequired
the decentralized identifier of the physical object. see https://www.w3.org/TR/did-core/
Example:
did:ethr:polygon:mumbai:0x023b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462
alias string
the alias used for identifying the did. This could be a human readable identifier for did:web or the public address of a ledger based did
Example:
0b6fe947a3add76d66ab697a46c1268e399366f98b44baf172cbb73762bbb01a
provider stringrequired
the protocol, method and optional the ledger identifier of the did.
Protocol is did
method for example ethr
and ledger identifier polygon:mumbai
Example:
did:ethr:polygon:mumbai
controllerKeyId string
the public ledger address of the controller / owner of a Digital Twin / DID
Example:
043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da
keys object[]required
services object[]required
{
"did": "did:ethr:polygon:mumbai:0x023b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462",
"alias": "0b6fe947a3add76d66ab697a46c1268e399366f98b44baf172cbb73762bbb01a",
"provider": "did:ethr:polygon:mumbai",
"controllerKeyId": "043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da",
"keys": [
{
"type": "Secp256k1",
"kid": "043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da",
"publicKeyHex": "043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da",
"meta": {
"algorithms": [
"ES256K",
"ES256K-R",
"eth_signTransaction",
"eth_signTypedData",
"eth_signMessage",
"eth_rawSign"
]
},
"kms": "local"
}
],
"services": [
{
"id": "did:ethr:polygon:mumbai:0x03b383ce5ae3b7ec5d91f13cbe2088eb05890f217f4028505379a73404dc1ff2b5#service-1",
"type": "LinkedDomains",
"serviceEndpoint": "http://foo.bar"
}
]
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.mtrust.io/api/gemini/v1/digital-twin/object/:objectId");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear