API EndPoints

User communicates with the node thats running in the background via REST APIs. Below listed are the REST API Endpoints with which user can able to view information, transfer tokens and so on.

FieldEndpointDescriptionSample Request
DID Creation/createDIDCreates a unique Decentralized IDentitycurl --location --request POST 'http://localhost:1898/create' --form 'data="Rubik"' --form 'image=@"imagepath"'
Initial Setup/startDoes the initial setup of IPFS and syncing the network nodes.curl --header "Content-Type: application/json" --request GET 'http://localhost:1898/start'
Generate key for Transaction/generateEcDSAKeysECDSA key for txn of token from one node to nextcurl --header "Content-Type: application/json" --request POST 'http://localhost:1898/generateEcDSAKeys' --data '{ "pvtKeyPass" : "<password>" , "returnKey" : 0}'
Generate key for Quorum/generateQuorumKeysECDSA key for node to act as quorumcurl --header "Content-Type: application/json" --request POST 'http://localhost:1898/generateQuorumKeys' --data '{ "pvtKeyPass" : "<password>" , "returnKey" : 0}'
Start Quorum/startQuorumServiceStart Quorum service of the nodecurl --header "Content-Type: application/json" --request POST 'http://localhost:1898/startQuorumService' --data '{ "pvtKeyPass" : "<password>"}'
Synchronise Network Nodes/syncTo synchronize the DIDs of the systems, so that the node will have an updated list of all the DIDs in the network.curl --header "Content-Type: application/json" --request GET http://localhost:1898/sync
View bootstraps/bootstrapReturn the list of bootstraps connected to the nodecurl --header "Content-Type: application/json" --request GET http://localhost:1898/bootstrap
Add bootstrap/bootstrapAdd a bootstrap id to the boostrap listccurl --header "Content-Type: application/json" --request POST http://localhost:1898/bootstrap?id=<bootstrap-id>
Remove bootstrap/bootstrapRemove boostrap id from the boostrap listcurl --header "Content-Type: application/json" --request DELETE http://localhost:1898/bootstrap?id=<bootstrap-id>
FieldEndpointDescriptionSample Request
Transfer Tokens/initiateTransactionTransfers token(s) from one wallet address to anothercurl --header "Content-Type: application/json" --request POST http://localhost:1898/initiateTransaction --data '{ "receiver": "<receiver DID here>", "tokenCount":1, "comment":"transaction comments", "type":1, "pvtKeyPass" : "<password>"}'
Unpledge Tokens/unpledgeTokenUnpledge the pledged tokenscurl --location --request POST 'http://localhost:1898/unpledgeToken' --header 'Content-Type: application/json' --data-raw '{"tokenList": "<hash of token to be unpledged. >"}'
FieldEndpointDescriptionSample Request
Account Information/getAccountInfoRetrieves the user account detailscurl --header "Content-Type: application/json" --request GET http://localhost:1898/getAccountInfo
Get Transaction Details with Transaction ID/getTxnDetailsDetails of a particular transaction like Quorum involved, token transferred, receiver details, time and morecurl --header "Content-Type: application/json" --request POST http://localhost:1898/getTxnDetails --data '{"transactionID": "<transaction ID here>"}'
Get Transaction Details with Date/getTxnByDateRetrieves the details of all the transactions committed during the specified periodcurl --header "Content-Type: application/json" --request POST <http://localhost:1898/getTxnByDate> --data-raw '{"sDate":"Wed Jun 09 12:56:04 AST 2021","eDate":"Wed Jun 09 12:57:58 AST 2021"}'
Get Transaction Details with Comment/getTxnByCommentRetrieves the details of all the transactions committed with the specified comment.curl --header "Content-Type: application/json" --request POST http://localhost:1898/getTxnByComment --data '{"comment":"First"}'
Get Transaction Details with Count/getTxnByCountRetrieves the last specified count of transactions committedcurl --header "Content-Type: application/json" --request POST http://localhost:1898/getTxnByCount --data '{"txnCount" : 3}'
Get Transaction Details with User’s DID/getTxnByDIDRetrieves all the transactions made with the input DIDcurl --header "Content-Type: application/json" --request POST <http://localhost:1898/getTxnByDID> --data '{"did" : "QmdkrLpyoGFrhsbeuZrXpcvr2QRsLuQnrbXVfJTe1yXqzy"}'
Get Transaction Details by Range/getTxnByRangeRetrieves all the transactions made with the input DIDcurl --header "Content-Type: application/json" --request POST http://localhost:1898/getTxnByRange --data-raw '{"startRange":1, "endRange":4}'
FieldEndpointDescriptionSample Request
Data Commit/commitBlockCommits Data to Rubix Blockscurl --header "Content-Type: application/json" --request POST http://localhost:1898/commitBlock --data '{ "blockHash": "<hash>", "comment":"transaction comments", "type":2, "pvtKeyPass":<password>}'