Send Requests
Use the following guidelines when sending requests using the Oracle Blockchain Platform REST API.
URL Structure
https://<rest_server_url:port>/<resource-path>
-
<rest_server_url:port>
is the URL for the REST proxy which is listed in the Oracle Blockchain Platform console.In the console, open the Nodes page and look for the REST proxy node. In the Route column, a URL including port will be listed.
-
<resource-path>
: Relative path that defines the REST endpoint. For example:/restproxy/api/v2/channels/{channelId}/chaincode-queries
For a complete list of REST endpoints, see All REST Endpoints.
Supported Methods
You can perform basic transaction-related operations on Oracle Blockchain Platform using standard HTTP method requests, as summarized in the following table.
HTTP Method | Description |
GET |
Retrieve information about a resource on the Blockchain Platform. |
POST |
Invoke a transaction on the Blockchain Platform, or create a new Blockchain Platform object. |
PATCH |
Update the Blockchain Platform. The PATCH method supplies a set of instructions to modify the resource.
|
PUT |
Replace a resource on the Blockchain Platform. The PUT method uses the request URI to supply a modified version of the requested resource which replaces the original version of the resource.
|
DELETE |
Delete a resource on the Blockchain Platform. |
Media Types
The following media types are supported by the Oracle Blockchain Platform REST API:
-
application/json
Supported Headers
The Oracle Blockchain Platform REST API supports the following headers that may be passed in the header section of the HTTP request or response.
Header | Description | Example |
Content-Type |
Media type of the body of the request. Required for POST and PUT requests.
|
Content-Type: application/json |