Storing hashes: submitting a GET Request to our rest API

GET REQUEST

Storing hashes can be done by submitting a GET Request to our rest API.

cURL command:


curl "https://stellarapi.io/storehash/{64char-hash}".


Important:
  1. The provided hash must have the length of 64 characters. If not, an error message will be returned
  2. The average transactiontime is 5,5 seconds


Examples:
https://stellarapi.io/storehash/28c56f852... (successful)
https://stellarapi.io/storehash/wronghash (failure)








JSON RESPONSE

In case of success:

{
   "status":"success",
   "code":200,
   "message":"storing hash succesfull",
   "executiontime":"5.1433",
   "transactionid":"GB4YU5VB..."
   "stellar-link":"https://stellarchain.io/tx/GB4YU5VB..."
   "request-hash-link":"https://stellarapi.io/gethash/GB4YU5VB..."
}

Extra information on returned JSON:
  1. stellar-link: url pointing to transaction on stellar blockchain
  2. request-hash-link: url pointing to stellarapi.io endpoint for getting the hash of the transaction

In case of failure:

{
   "status":"Bad Request",
   "code":400,
   "message":"Bad request: --error message--",
   "executiontime":"5.1433"
}