Skip to main content

create mass operation

POST 

https://api.mtrust.io/api/gemini/v1/mass-operations

start a mass operation process to create or update Digital Twins

Request

Body arrayrequired

  • Array [
  • operationType stringrequired

    Possible values: [createDigitalTwin, addService]

    objectId stringrequired
    objectType stringrequired
    services object[]
  • Array [
  • key stringrequired
    uri stringrequired
    description string
  • ]
  • keys object[]
  • Array [
  • kid stringrequired

    identifier of the Key, acts like an alias for the key

    Example: 043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da
    kms stringrequired

    the key management system of the key

    Example: local
    type string

    Key algorithm

    Example: Secp256k1
    publicKeyHex stringrequired

    public part of the key as a string in hex format

    Example: 043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da
    privateKeyHex stringdeprecated

    the private part of the key, based on the security reasons will not be returned

    meta object

    Key metadata. This should be used to determine which algorithms are supported

    algorithms string[]

    a lis tof supported key algorithm

    Example: ["ES256K","ES256K-R","eth_signTransaction","eth_signTypedData","eth_signMessage","eth_rawSign"]
  • ]
  • ]

Responses

Schema
    massOperationId stringrequired
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.mtrust.io/api/gemini/v1/mass-operations");
var content = new StringContent("[\n {\n \"operationType\": \"createDigitalTwin\",\n \"objectId\": \"string\",\n \"objectType\": \"string\",\n \"services\": [\n {\n \"key\": \"string\",\n \"uri\": \"string\",\n \"description\": \"string\"\n }\n ],\n \"keys\": [\n {\n \"kid\": \"043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da\",\n \"kms\": \"local\",\n \"type\": \"Secp256k1\",\n \"publicKeyHex\": \"043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da\",\n \"meta\": {\n \"algorithms\": [\n \"ES256K\",\n \"ES256K-R\",\n \"eth_signTransaction\",\n \"eth_signTypedData\",\n \"eth_signMessage\",\n \"eth_rawSign\"\n ]\n }\n }\n ]\n }\n]", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.mtrust.io
Body required
[
{
"operationType": "createDigitalTwin",
"objectId": "string",
"objectType": "string",
"services": [
{
"key": "string",
"uri": "string",
"description": "string"
}
],
"keys": [
{
"kid": "043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da",
"kms": "local",
"type": "Secp256k1",
"publicKeyHex": "043b1de7d53ebe9d97015514f44610702d889528fa0f00ffab8893c89426129462a4266843f80b98fdc76077c066d89fae807a8d314e4c3947976fd64f726ee6da",
"meta": {
"algorithms": [
"ES256K",
"ES256K-R",
"eth_signTransaction",
"eth_signTypedData",
"eth_signMessage",
"eth_rawSign"
]
}
}
]
}
]
ResponseClear

Click the Send API Request button above and see the response here!