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

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

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

  • チェーンコードの名前およびバージョン。
  • RESTサーバーのURLおよびポートと、RESTノードのユーザーIDおよびパスワード。
  • 元帳に対してトランザクションをコールするか、または元帳を問い合せる機能。

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

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

次の例のように、REST APIアプリケーションを構造化します。

/Application
  /artifacts
    /crypto
      /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