Atlas
Operations related to the Atlas global namespace.
Get an attachment by its hash. Attachments are content stored in the Atlas network.
The attachment hash is a 40-character hex string (SHA-1 hash).
Path parameters
hashstringRequiredPattern:
Hex-encoded SHA-1 hash of the attachment (40 characters)
^[0-9a-f]{40}$Responses
200
The attachment content
application/json
attachmentstring · byteRequired
The attachment data, hex-encoded.
400
Bad request
text/plain
404
Not found
text/plain
get/v2/attachments/{hash}
GET /v2/attachments/{hash} HTTP/1.1
Host: localhost:20443
Accept: */*
{
"attachment": "Ynl0ZXM="
}Get inventory of attachments for a given index block hash and page range. This returns a bitfield indicating which attachments are available.
Query parameters
index_block_hashstringRequiredPattern:
Hex-encoded index block hash (64 characters)
^[0-9a-f]{64}$pages_indexesstringRequiredExample:
max 8 pages per request
1,2,3Pattern: ^[0-9]+(,[0-9]+){0,7}$Responses
200
Attachment inventory bitfield
application/json
block_idstringOptional
Index block hash
400
Bad request
text/plain
404
Not found
text/plain
get/v2/attachments/inv
GET /v2/attachments/inv?index_block_hash=text&pages_indexes=1%2C2%2C3 HTTP/1.1
Host: localhost:20443
Accept: */*
{
"block_id": "0123456789abcdef0123456789abcdef0123456789abcdef",
"pages": [
{
"index": 1,
"inventory": [
255,
0,
255,
0
]
},
{
"index": 2,
"inventory": [
0,
255,
0,
255
]
}
]
}Last updated
Was this helpful?