使用 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