REST API

You can access the Rest API through the Swagger UI from the App API section. Navigate to Network -> Deployed Apps -> App -> Rest API

base url: 

https://<membership_id>.spydra.app/fabric/<app_id>

Get the base URL from Network -> Deployed Apps -> App -> Rest API page.
Select your organization at the top right of this page.

Alternatively, you can from the URL by getting the <membership_id> by navigating
to Network -> Members page and getting the <app_id> by navigating to the Network -> 
Deployed Apps -> App Overview page.

post

Create a transaction on the blockchain

Authorizations
X-API-KEYstringRequired
Query parameters
asyncstringOptional

Whether to wait for the transaction to be created before returning a response or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /receipt endpoint.

Body
functionNamestringOptionalExample: CreateDocumentDefinitions
Responses
chevron-right
200

Transaction created

application/json
or
post
/ledger/transact
post

Queries/Evaluate the transaction on the blockchain

Authorizations
X-API-KEYstringRequired
Body
functionNamestringOptionalExample: CreateDocumentDefinitions
Responses
chevron-right
200

Transaction queried

application/json
IDstringOptionalExample: asset1
ColorstringOptionalExample: whte
SizenumberOptionalExample: 15
OwnerstringOptionalExample: Brad
AppraisedValuenumberOptionalExample: 200
post
/ledger/query
post

Issues the identity from the certificate authority

Authorizations
X-API-KEYstringRequired
Body
enrollmentIdstringOptionalExample: user1
typestringOptionalExample: client
maxEnrollmentsnumberOptionalExample: 10
Responses
post
/identity
patch

ReIssue the identity from the certificate authority

Authorizations
X-API-KEYstringRequired
Path parameters
enrollmentIdstringRequired
Responses
patch
/identity/{enrollmentId}
get

Get the identity from the fabric certificate authority

Authorizations
X-API-KEYstringRequired
Path parameters
enrollmentIdstringRequired
Responses
chevron-right
200

Fetched Identity

application/json
idstringOptionalExample: user1
typestringOptionalExample: client
affiliationstringOptional
max_enrollmentsnumberOptionalExample: 10
canamestringOptionalExample: ca-org1
get
/identity/{enrollmentId}
delete

Revoke the identity from the certificate authority

Authorizations
X-API-KEYstringRequired
Path parameters
enrollmentIdstringRequired
Body
reasonstringOptionalExample: keycompromise
generateCRLbooleanOptional
Responses
delete
/identity/{enrollmentId}
get

Get all identities from the certificate authority

Authorizations
X-API-KEYstringRequired
Responses
chevron-right
200

Identities

application/json
idstringOptionalExample: user1
typestringOptionalExample: client
affiliationstringOptional
max_enrollmentsnumberOptionalExample: 10
canamestringOptionalExample: ca-org1
get
/identity/all
get

Get Fabric Chain Information

Authorizations
X-API-KEYstringRequired
Responses
chevron-right
200

ChainInfo

application/json
heightstringOptionalExample: 109
currentBlockHashstringOptionalExample: lXNu1mBUNpNAUzucy/2CAsk0Hq586+8WRO
previousBlockHashstringOptionalExample: Gob0PD5UgI38BwEQT+baD+8ei92WBbY
get
/explorer/chainInfo
get

Get Blockchan Block for a Number

Authorizations
X-API-KEYstringRequired
Path parameters
blockNumbernumberRequired
Responses
chevron-right
200

Block data

application/json
get
/explorer/block/byNumber/{blockNumber}
get

Get Blockchan Block for a TransactionId

Authorizations
X-API-KEYstringRequired
Path parameters
transactionIdstringRequired
Responses
chevron-right
200

Block data

application/json
get
/explorer/block/byTxId/{transactionId}
get

Get Blockchan Transaction for a TransactionId

Authorizations
X-API-KEYstringRequired
Path parameters
transactionIdstringRequired
Responses
chevron-right
200

Transaction data

application/json
validationCodenumberOptionalExample: 0
transaction_hashstringOptionalExample: dd81d0c67b75fe16c30fa113e1b3ef020cb9e92
created_datestringOptionalExample: 2023-05-16T11:39:46.499Z
transaction_typestringOptionalExample: ENDORSER_TRANSACTION
chaincode_namestringOptionalExample: document-contract
msp_idstringOptionalExample: Org1
get
/explorer/transaction/byTxId/{transactionId}
get

Get latest Blocks

Authorizations
X-API-KEYstringRequired
Query parameters
limitstringOptional
bookmarkstringOptional
Responses
chevron-right
200

Block data

application/json
bookmarknumberOptionalExample: 8
countnumberOptionalExample: 2
get
/explorer/block/latest
get

Get latest Transactions

Authorizations
X-API-KEYstringRequired
Query parameters
limitstringOptional
bookmarkstringOptional
block_numberstringOptional
Responses
chevron-right
200

Transaction data

application/json
bookmarkstringOptionalExample: 99_dd81d0c67b75fe16c30fa113e1b3ef020cb9e
countnumberOptionalExample: 2
nextTransactionsExistbooleanOptionalExample: false
get
/explorer/transaction/latest
get

Get the status of an already submitted transaction using the returned receipt id.

Authorizations
X-API-KEYstringRequired
Query parameters
receiptIdstringRequired

The receipt id returned while submitting the transaction.

Responses
chevron-right
200

Transaction found.

application/json
transactionIdstringOptional

The ledger transaction Id corresponding to the receipt id.

Example: 6c94ff55155722c28611630e7d6795145e0282e9fabf10bf3460f396e2a6218b
statusstring · enumOptional

The status of the submitted transaction.

Possible values:
messagestringOptional

Error message when the transaction status is FAILED.

Example: Success
get
/receipt

Last updated