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
200

Transaction created

application/json
Responseone of
or
post
/ledger/transact
post

Queries/Evaluate the transaction on the blockchain

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

Transaction queried

application/json
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
200

Fetched Identity

application/json
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
200

Identities

application/json
get
/identity/all
get

Get Fabric Chain Information

Authorizations
X-API-KEYstringRequired
Responses
200

ChainInfo

application/json
get
/explorer/chainInfo
get

Get Blockchan Block for a Number

Authorizations
X-API-KEYstringRequired
Path parameters
blockNumbernumberRequired
Responses
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
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
200

Transaction data

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

Get latest Blocks

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

Block data

application/json
get
/explorer/block/latest
get

Get latest Transactions

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

Transaction data

application/json
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
200

Transaction found.

application/json
get
/receipt

Last updated

Was this helpful?