Updated on 2023-10-09 GMT+08:00

Querying Transaction Details

Function

Querying Transaction Details

URI

GET /v2/agent/apis/channel/{channel_name}/transactions/{transaction_id}/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

channel_name

Yes

String

Channel name.

transaction_id

Yes

String

Transaction ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

read_set

Map<String,Array<KVRead>>

Read set "map[string][]*kvrwset.KVRead key:chaincode value".

write_set

Map<String,Array<KVWrite>>

Write set "map[string][]KVWrite key:chaincode value".

validation_code

String

Validation code.

endorser_organizations

Array of strings

Endorsing organizations.

proposal_hash

String

Request data hash.

transaction_summary

Object

Transaction details.

Table 4 KVRead

Parameter

Type

Description

key

String

Read key.

version

version object

Version of the key in the read set.

Table 5 version

Parameter

Type

Description

block_num

Integer

Block quantity.

tx_num

Integer

Transaction quantity.

Table 6 KVWrite

Parameter

Type

Description

key

String

Write key.

is_delete

Boolean

Indication of whether to delete.

value

String

Write value.

Table 7 TransactionSummary

Parameter

Type

Description

organization_name

String

Creator organization.

type

String

Transaction type.

transaction_id

String

Transaction ID.

chaincode_name

String

Chaincode name.

timestamp

String

Timestamp.

channel_name

String

Channel name.

creator_msp

String

Identity information.

chaincode_version

String

Chaincode version.

block_number

Integer

Block ID.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

error_msg

String

Error description.

Example Requests

GET  https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions/1111111/detail

Example Responses

Status code: 200

Success

{
  "transaction_summary" : {
    "block_number" : 29,
    "transaction_id" : "6d704b217e17e16de71029b70f17a1ced35c055279f655dfd096bebf978a0546",
    "channelName" : "channel",
    "creator_msp" : "282f3c713ea1cec646aa7c640defca9c4f64bd88MSP",
    "type" : "ENDORSER_TRANSACTION",
    "chaincode_name" : "kvtest",
    "chaincode_version" : "1.0",
    "timestamp" : "2021-01-20T19:30:28+08:00",
    "organization_name" : "organization"
  },
  "validation_code" : "VALID",
  "endorser_organizations" : [ "282f3c713ea1cec646aa7c640defca9c4f64bd88MSP" ],
  "proposal_hash" : "k1h2ewweWGrWNmmcu7UvzJ8Aw2G190SQzV+lBAAl4gw=",
  "read_set" : {
    "kvtest" : null,
    "lscc" : [ {
      "key" : "kvtest",
      "version" : {
        "block_num" : 2
      }
    } ]
  },
  "write_set" : {
    "kvtest" : [ {
      "key" : "a1",
      "is_delete" : false,
      "value" : "1"
    } ],
    "lscc" : [ ]
  }
}

Status code: 400

Bad Request

{
  "error_code" : "BCS.4000013",
  "error_message" : "request body is too large"
}

Status Codes

Status Code

Description

200

Success

400

Bad Request

Error Codes

See Error Codes.