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

All calls to the ledger must include the following header with the token is obtained from the API screen of the Wallet.

Content_Type : application/x-www-form-urlencoded

Authorization : Bearer token_from_wallet

Please contact [email protected] to obtain a development token.

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
  • regKeyReg
  • keyRegForOwner

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

registerIdentity (GET/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

http://integrawalletproxy.azurewebsites.net/fwd/api/registerIdentity?type=com.integraledger.document&value=84105b92e3907e2140e2e54117a6bc0811185f50&metadata=testMetaData

returns

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

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"
    }
  ]
}

registerKeyReg (GET/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

http://integrawalletproxy.azurewebsites.net/fwd/api/registerKeyReg?keyOwner=joesmith&namespace=com.integraledger.pgp&keyValue=testpgpkey

{
  "keyOwner": "joesmith",
  "nameSpace": "com.integraledger.pgp",
  "keyValue": " testpgpkey "
}

keyRegForOwner (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

http://integrawalletproxy.azurewebsites.net/fwd/api/keyRegForWwner?keyOwner=joesmith&nameSpace=com.integraledger.pgp

returns

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