New, Changed and Deprecated APIs

Review the following notice about the resource paths and endpoints that are new, changed or deprecated.

Which Resource Paths and Endpoints Were Added or Modified

These resource paths and endpoints were modified from earlier Oracle Blockchain Platform releases or may have slightly different functionality in this release.

Endpoints Resource Paths Functional Changes
Hyperledger Fabric v2 Support The existing Applications Operations, Network Administrative Operations, and Statistics APIs are still supported for networks running on Hyperledger Fabric v1.4. New APIs have been added to support networks running on Hyperledger Fabric v2.2.
  • Blockchain Network Administrative Operations: The existing /console/admin/api/v1.1 APIs have new equivalents at /console/admin/api/v2
  • Application Operations: The existing restproxy/api/v2 APIs have new equivalents at /restproxy/api/v2/
  • Statistics: The existing /console/admin/api/v1.1/dashboard/statistics APIs have new equivalents at /console/admin/api/v2/dashboard/statistics

Although most of the existing APIs have a new Hyperledger Fabric v2 equivalent, there is not a 1:1 match. Some APIs are unique to each version of Hyperledger Fabric, and some have different parameters for each release.

This document is specific to Hyperledger Fabric v1.4 REST APIs. If you are using Hyperledger Fabric v2.X, refer to REST API for Oracle Blockchain Platform on Oracle Cloud Infrastructure (Hyperledger Fabric v2.X).

Custom Enrollments
There are several new endpoints for working with custom enrollments:
  • /console/admin/api/v1.1/nodes/restproxies/{restProxyId}/enrollments
  • /console/admin/api/v1.1/nodes/restproxies/{restProxyId}/enrollments/{enrollmentId}
  • /console/admin/api/v1.1/nodes/restproxies/{restProxyId}/enrollments/{enrollmentId}/users
  • /console/admin/api/v1.1/nodes/restproxies/{restProxyId}/enrollments/{enrollmentId}/users/{userName}

These endpoints allow you to create and delete custom enrollments, as well as associate users with them.

Get the Node Usage Related Metrics /console/admin/api/v1.1/dashboard/statistics/nodeRes

This API was re-introduced in v21.1.2 after initially being deprecated on Oracle Cloud Infrastructure (Gen 2). It allows you to get the node usage related metrics (CPU, memory, disk usage).

Time range parameters are not currently supported for this API.

Verify Blocks /console/admin/api/v1.1/nodes/peers/{peerId}/blockaudit/{channelName} This endpoint is used to validate ledger blocks against a channel owned by the given peer.
Get Audit Log Information /console/admin/api/v1.1/dashboard/statistics/auditlog This endpoint is used to get the instance audit log, which records administrative console activity including actions related to channels, organizations, nodes, and chaincode.

Update REST Proxy Node Configuration

/console/admin/api/v1.1/nodes/restproxies/{restProxyId}

In earlier versions, this API can be used to configure a channel and chaincode on the specified REST proxy node. On Oracle Cloud Infrastructure (Gen 2), this API can be used to specify wait times and log level, however the channel, chaincode, and endorsers parameters are no longer valid due to the updated Blockchain Platform architecture.

Blockchain Platform Orderer Operations

There are several new endpoints for working with ordering service nodes (OSNs) and network configuration blocks:

  • /console/admin/api/v1.1/nodes/orderers/{ordererId}/exportOSN
  • /console/admin/api/v1.1/nodes/orderers/{ordererId}/importNCB
  • /console/admin/api/v1.1/channels/{channelName}/orderers/joinOSN
  • /console/admin/api/v1.1/channels/{channelName}/orderers/removeOSN
  • /console/admin/api/v1.1/channels/syschannel/configblock
  • /console/admin/api/v1.1/channels/syschannel/addOSN

These endpoints have been added to support the new Raft ordering service. They allow you to add and remove ordering service nodes, and export or import a network configuration block.

Multiple Nodes Endpoints

  • /console/admin/api/v1.1/nodes/peers/{peerID}/start|stop
  • /console/admin/api/v1.1/nodes/orderers/{ordererID}/start|stop
  • /console/admin/api/v1.1/nodes/fabricCAs/{caId}/start|stop
  • /console/admin/api/v1.1/nodes/restproxies/{restProxyId}/start|stop

These APIs have no payload. Previously you didn't need to specify the content length in the header. On Oracle Cloud Infrastructure (Gen 2) you must specify the content length using the -H "content-length: 0" parameter.

Billable Transactions /console/admin/api/v1.1/dashboard/statistics/billableTrans

On Oracle Cloud Infrastructure (Gen 2), the pricing model is no longer based on transaction number. See Blockchain Platform Pricing for information on current pricing.

This API is still functional for backwards compatibility reasons, and can be used to track the number of transactions if needed.

Get Version of REST Proxy API The existing REST API :
  • /{restproxy}/bcsgw/rest/version
is still supported this release, but has been superseded with an Oracle Cloud Infrastructure (Gen 2) REST API with similar but different functionality:
  • /restproxy/api/v2/version
 

Query a Chaincode

/restproxy/api/v2/channels/{channelId}/chaincode-queries

On Oracle Cloud Infrastructure (Gen 2), for CouchDB array operators, range query and pagination aren't supported.

Get Transaction Information

/restproxy/api/v2/channels/{channelId}/transactions/{transactionId} On Oracle Cloud Infrastructure (Gen 2), querying asynchronous invocation proposal failures is not supported.

View the Status of a Specified Transaction

The existing REST API :
  • /{restproxy}/bcsgw/rest/v1/transaction
is still supported this release, but has been superseded with an Oracle Cloud Infrastructure (Gen 2) REST API with similar but different functionality:
  • /restproxy/api/v2/channels/{channelId}/transactions/{transactionId}

In previous Blockchain Platform versions, {restproxy} is a variable which can be set to different rest proxy nodes. On Oracle Cloud Infrastructure (Gen 2) , {restproxy} is fixed as a string "restproxy" in the path.

Transaction Invocation

The existing REST APIs :
  • /{restproxy}/bcsgw/rest/v1/transaction/asyncInvocation
  • /{restproxy}/bcsgw/rest/v1/transaction/invocation
are still supported, but have been superseded with an Oracle Cloud Infrastructure (Gen 2) REST API with similar but different functionality:
  • /restproxy/api/v2/channels/{channelId}/transactions

In previous Blockchain Platform versions, {restproxy} is a variable which can be set to different rest proxy nodes. On Oracle Cloud Infrastructure (Gen 2) , {restproxy} is fixed as a string "restproxy" in the path.

On Oracle Cloud Infrastructure (Gen 2), callback support when sending a transaction has been deprecated. Alternatively, you can manually query the transaction status using the Get Transaction Information API or create a callback to transaction events using the Subscribe to an Event API.

In previous Blockchain Platform versions, transaction invocation was synchronous by default. In v2 it is asynchronous by default. To invoke the transaction synchronously, you can set "sync"= true in the JSON body of your request.

Event Subscriptions

The existing REST APIs :
  • /{restproxy}/bcsgw/rest/v1/event/subscribe
  • /{restproxy}/bcsgw/rest/v1/event/unsubscribe
  • /{restproxy}/bcsgw/rest/v1/event/querySub
are still supported this release, but have been superseded with an Oracle Cloud Infrastructure (Gen 2) REST API with similar but different functionality:
  • /restproxy/api/v2/channels/{channelId}/event-subscriptions

In previous Blockchain Platform versions, {restproxy} is a variable which can be set to different rest proxy nodes. On Oracle Cloud Infrastructure (Gen 2) , {restproxy} is fixed as a string "restproxy" in the path.

In new releases of Hyperledger Fabric, events are channel-scoped. Subscribing to the following event types is not yet supported on Oracle Cloud Infrastructure (Gen 2):
  • txOnChannel
  • txOnNetwork
  • blockOnNetwork
  • chaincodeEvent
Blockchain Platform Administrative Operations All existing REST APIs under:
  • /api/v1/configuration/...
  • /api/v1/blockchainPlatforms/...
have been replaced with Oracle Cloud Infrastructure (Gen 2) REST APIs:
  • /20191010/blockchainPlatforms/...
  • /20191010/workRequests/...
 

Which Resource Paths and Endpoints are Deprecated

These resource paths and endpoints are deprecated.

Endpoints Deprecated in Release Version Resource Path

Get the List of Configured Chaincodes

20.3.1 /console/admin/api/v1.1/dashboard/statistics/proxyConfiguredCC

Add a Peer Node

20.3.1 /console/admin/api/v1.1/nodes/peers

Export Nodes

20.3.1 /console/admin/api/v1.1/nodes/export

Import Nodes

20.3.1 /console/admin/api/v1.1/nodes/import

Remove a Peer Node

20.3.1 /console/admin/api/v1.1/nodes/peers/{peerId}

Update Capabilities for Channel

20.3.1 /console/admin/api/v1.1/channels/{channelName}/capabilities

Update Channel Configuration

19.1.3 /console/admin/api/v1.1/channels/{channelName}

Note:

  • The deprecated resource path and endpoints will become obsolete in the release listed. This means when you create a founder instance using that version or upgrade an existing instance, you will no longer be able to use these endpoints.
  • It is recommended that you migrate your applications to use the new paths and endpoints at your earliest convenience. This will minimize any disruption in the future when the deprecated URL structures are no longer supported.