Get Transaction Information

get

/restproxy/api/v2/channels/{channelId}/transactions/{transactionId}

Get the information for a transaction, whether it's submitted or not.

On Oracle Cloud Infrastructure (Gen 2), querying asynchronous invocation proposal failures is not supported.

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Operation successful
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : result
Type: object
Show Source

400 Response

Bad Request
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Nested Schema : errors
Type: array
list of errors
Show Source
Nested Schema : warnings
Type: array
list of warnings
Show Source

401 Response

Unauthorized
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Nested Schema : errors
Type: array
list of errors
Show Source
Nested Schema : warnings
Type: array
list of warnings
Show Source

403 Response

Forbidden

404 Response

Not Found
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Nested Schema : errors
Type: array
list of errors
Show Source
Nested Schema : warnings
Type: array
list of warnings
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Nested Schema : errors
Type: array
list of errors
Show Source
Nested Schema : warnings
Type: array
list of warnings
Show Source
Back to Top

Examples

This endpoint is used to get the status and other details of a transaction based on it's transaction ID.

The following example shows how to get the transaction details of your Blockchain transaction by submitting a GET request on the REST resource using cURL.

curl -v -u <username>:<password> -X GET \
  "https://<restproxy of your Blockchain instance>/api/v2/channels/default/transactions/{transactionId}" \
  -H "accept: application/json"

For example,

curl -v -k -u obpuser:<password> -X GET \
  "https://myvm.oracle.com:10001/restproxy/api/v2/channels/default/transactions/bc5221c648533646877505288fc50b6c6100394213694bf111f7a3183074a329" \
  -H "accept: application/json"

Note:

You can find the restproxy value of your Blockchain instance from the Nodes tab of your instance console.

Example of the Response Body

The following example shows the contents of the response body in JSON format:

{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "bc5221c648533646877505288fc50b6c6100394213694bf111f7a3183074a329",
        "status": "valid",
        "payload": 800,
        "encode": "JSON"
    }
}

As this transaction was invoked to query the balance of a, the value returned for payload can be interpreted as a's balance amount.

Back to Top