INTEGRA API

Overview

The Integra Ledger utilizes Hyperledger Fabric and Hyperledger Composer with its block chain infrastructure. Smart Contracts execution and data access is performed  through a RESTful API. Global Legal Blockchain Consortium members run their own nodes and their identities are established through the Integra Ledger certificate authority. Integra Inc. runs a publicly accessible API Gateway allowing non consumerism participants to interact with the Ledger.

API Access

The Integra Ledger utilizes Hyperledger Fabric and Hyperledger Composer with its block chain infrastructure. Smart Contracts execution and data access is performed  through a RESTful API. Global Legal Blockchain Consortium members run their own nodes and their identities are established through the Integra Ledger certificate authority. Integra Inc. runs a publicly accessible API Gateway allowing non consumerism participants to interact with the Ledger.

API Headers

All calls to the ledger must include the following header with the token is obtained from Integra Inc.

APIKey :XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX

APISecret :XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX

 

POST Methods should also include

Content_Type : application/json

Accept : application/json

API

The first foundational service of the Integra Ledger provides the issuances of a unique legal identifier. String data can also be bound to the ID with current support for a value field and a metadata field. The API also provides methods to confirm the existence of the id and the existence of the value.

One common use case is for a user to create a SHA 256 Hash of a PDF document and register the hash on the Integra Ledger. The call returns a GUID as an identifier which the client can then store as a foreign key. NetDocuments executed this design in one of the early Integra proof of concepts.

The current API provides 5 end points

  • registerIdentity
  • identityExists
  • valueExists
  • registerKey
  • keyForOwner

For testing purposes use http://integrawalletproxy.azurewebsites.net/fwd/api/as the base endpoint address.

registerIdentity (POST)

Register a new identity on the Integra Ledger passing in

  • type – use whatever string you want as the name space
  • value (optional) – the value to be stored. In the example we are using a SHA256 Has of a document
  • metaData (optional) – pass any metadata as a string
{
  "identityType": "com.integraledger.lmat",
  "metaData": "Test MetaData",
  "value": "7F6F364B86E31BB5A02179D11F949ABCB0B29F6473DDBB275F851DA5DC9FD140"
}

returns

 {
    "$class": "com.integraledger.identityregistry.RegisterIdentity",
    "identityId": "356d8764-cf79-42fd-a4b5-b806d42eaadf",
    "identityType": "com.integraledger.lmat",
    "metadata": "Test MetaData",
    "value": "7F6F364B86E31BB5A02179D11F949ABCB0B29F6473DDBB275F851DA5DC9FD140",
    "transactionId": "769b69604ce3fb6ec712656286fbc8957c063063be8f10cd13e93c89c145072d"
}
 

 

identityExists (GET)

Check for the existence of a value on the Integra Ledger passing in

  • identityId – the identityId to check for

https://ledgergateway20181009113651.azurewebsites.net/api/identityexists?identityId=356d8764-cf79-42fd-a4b5-b806d42eaadf

returns

 {
  "exists": true,
  "data": [
    {
    "exists": true,
    "data": {
        "$class": "com.integraledger.identityregistry.IntegraIdentity",
        "identityId": "356d8764-cf79-42fd-a4b5-b806d42eaadf",
        "identityType": "com.integraledger.lmat",
        "creationDate": "2018-10-15T03:46:13.23Z",
        "value": "7F6F364B86E31BB5A02179D11F949ABCB0B29F6473DDBB275F851DA5DC9FD140",
        "metaData": "Test MetaData"
    }
}
 

valueExists (GET)

Check for the existence of a value on the Integra Ledger passing in

  • value – the value to check for

http://integrawalletproxy.azurewebsites.net/fwd/api/valueExists?value=84105b92e3907e2140e2e54117a6bc0811185f50

returns

 {
  "exists": true,
  "data": [
    {
      "$class": "com.integraledger.identityregistry.HashVal",
      "value": "84105b92e3907e2140e2e54117a6bc0811185f50",
      "creationDate": "2018-02-22T21:38:19.030Z",
      "identityId": "b3e6bdea-2305-4bc0-aec7-f1b4d114dbc3",
      "metaData": "testMetaData"
    }
  ]
}
 

registerKey (POST)

Register a PGP Public Key on the Integra Ledger passing in

  • keyOwner – the identifier of the owner of the key
  • nameSpace (optional) – the nameSpace of the key registry Has of a document
  • keyValue – the PGP Public Key value
{
  "$class": "com.integraledger.identityregistry.RegisterKey",
  "keyValue": "encoded Key Val",
  "owner": "[email protected]"
}
 

returns

 
{
  "$class": "com.integraledger.identityregistry.RegisterKey",
  "keyValue": "encoded Key Val",
  "owner": "[email protected]"
}

keyForOwner (GET)

Register a PGP Public Key on the Integra Ledger passing in

  • keyOwner – the identifier of the owner of the key
  • nameSpace (optional) – the nameSpace of the key registry Has of a document

https://edgergateway20181009113651.azurewebsites.net/api/[email protected]

returns

{
  "exists": true,
  "data": [
    {
      "$class": "com.integraledger.identityregistry.KeyReg",
      "keyOwner": " joesmith",
      "nameSpace": "com.integraledger.pgp",
      "keyValue": "testpgpkey",
      "compoundKey": "com.integraledger.pgp|joesmith"
    }
  ]
}