cURL Access
The examples within this document use cURL to demonstrate how to access the Oracle Blockchain Platform REST API.
To use cURL to access the Oracle Blockchain Platform REST API:
-
Install cURL, as described in Quick Start.
-
Invoke cURL and specify one or more of the command-line options defined in the following table, as required, to direct its execution
cURL Option Description -d, --data @file.jsonIdentifies the request document, in JSON format, on the local machine. -HDefines content type of the request document. -iDisplays response header information. -u, --user username:passwordSpecifies the user name and password for the Oracle Blockchain Platform account. -XIndicates the type of request (for example, GET, POST, and so on). -vVerbose
For example:
curl -v -u <username>:<password> -X POST \
"https://<rest_server_url:port>/api/v2/channels/default/chaincode-queries" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
--data @<file.json with the request parameters>