Hash
: SHA256 hashUUID
: universally unique identifier formatted similar toa47178c1-3367-440d-b35e-a2a0a644a586
URL
: resource location
Used as a healthcheck.
URL : /ping/
Method : GET
Code : 200 OK
Content example
Pong
DocumentState
: enum of strings, ['pending', 'batched', 'failed']
Get an existing document.
URL : /document/{UUID:id}
- id : UUID of the document
Method : GET
Code : 200 OK
Data Format
{
"hash": Hash,
"id": UUID,
"stamp": (URL | Null),
"state": DocumentState
}
Content example
{
"hash": "f3ac645b600b5dfef586fc8f5f1fae27b9f67c90",
"id": "febc23bd-3474-4f2e-85eb-ba109ce62ed5",
"stamp": "localhost:9000/stamp/3088f26a-c1a3-4fad-8f73-9b1b3d5a0dbf",
"state": "batched"
}
Create a new document.
URL : /document
Method : POST
Data Format
{
"hash": Hash
}
Data example
{
"hash": "0d6772a577eb705cfce697b9e5da7a4034944bb3"
}
Code : 200 OK
Content example
e64fb3ad-cc2e-40ea-ad28-1b67d8b741ea
MerkleTree
:
{
"root": MerkleNode
}
MerkleNode
:
{
"hash": Hash,
"left": (MerkleNode | Null),
"right": (MerkleNode | Null)
}
StampState
: enum of strings ['pending', 'processing', 'sent', 'confirmed', 'failed']
Get an existing stamp.
URL : /stamp/{id}
- id : UUID of the document
Method : GET
Code : 200 OK
Content Format
{
"id": UUID,
"merkleTree": MerkleTree,
"state": StampState,
"txhash": (TransactionHash | Null)
}
Content example
{
"id": "a47178c1-3367-440d-b35e-a2a0a644a586",
"merkleTree": {
"root": {
"hash": "1aed2ae581e8435bc7f00c76085620509bf656953f57170b09e0c84810ba20a9",
"left": {
"hash": "1d6772a577eb705cfce697b9e5da7a4034944bb3",
"left": null,
"right": null
},
"right": null
}
},
"state": "sent",
"txhash": "0xcbb8965477ed40a316ccb101e8a01697d55b7dbb1a4f68992514144a8f9e6255"
}