REST APIを使用したアプリケーションの開発

Oracle Blockchain Platformに用意されているREST APIは、柔軟性を最大限に考慮して作成されており、トランザクションの呼出し、問合せの呼出し、トランザクションのステータスの表示が可能です。ただし、オブジェクトレベルの制御を実現するために、既存のAPIエンドポイントをアプリケーション内にラップする必要が生じる可能性が高くなります。アプリケーションに、精緻な操作を含めることができます。

REST APIを使用するアプリケーションには、次のものが必要です:

  • チェーンコードの名前およびバージョン。
  • RESTサーバーのURLおよびポートと、RESTノードのユーザーIDおよびパスワード。
  • 台帳に対するトランザクションを呼び出す、または台帳に問い合せる関数。

例および使用構文など、既存の操作に関する情報は、『Oracle Blockchain Platform REST API』を参照してください。

アプリケーションの構造化

REST APIアプリケーションは、次のような構造にする必要があります:

/Application
  /artifacts
    /cypto
      /orderer
        Contains the certificates required for the application to act on the orderer node
        In participant instances only contains TLS certificates
      /peer
        Contains the certificates required for the application to act on the peer node
    /src
  /REST
    Application script containing REST API calls