# Atlas

Operations related to the Atlas global namespace.

## Get attachment by hash

> 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).<br>

```json
{"openapi":"3.1.0","info":{"title":"Stacks 3.0+ RPC API","version":"1.0.0"},"tags":[{"name":"Atlas","description":"Operations related to the Atlas global namespace."}],"servers":[{"url":"http://localhost:20443","description":"Local Stacks Node"},{"url":"https://api.mainnet.hiro.so","description":"Hiro Mainnet API"},{"url":"https://api.testnet.hiro.so","description":"Hiro Testnet API"}],"security":[],"paths":{"/v2/attachments/{hash}":{"get":{"summary":"Get attachment by hash","tags":["Atlas"],"operationId":"getAttachment","description":"Get an attachment by its hash. Attachments are content stored in the Atlas network.\n\nThe attachment hash is a 40-character hex string (SHA-1 hash).\n","parameters":[{"name":"hash","in":"path","required":true,"description":"Hex-encoded SHA-1 hash of the attachment (40 characters)","schema":{"type":"string","pattern":"^[0-9a-f]{40}$"}}],"responses":{"200":{"description":"The attachment content","content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"string","format":"byte","description":"The attachment data, hex-encoded."}},"required":["attachment"]}}}},"400":{"description":"Bad request","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not found","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Get attachment inventory

> Get inventory of attachments for a given index block hash and page range.\
> This returns a bitfield indicating which attachments are available.<br>

```json
{"openapi":"3.1.0","info":{"title":"Stacks 3.0+ RPC API","version":"1.0.0"},"tags":[{"name":"Atlas","description":"Operations related to the Atlas global namespace."}],"servers":[{"url":"http://localhost:20443","description":"Local Stacks Node"},{"url":"https://api.mainnet.hiro.so","description":"Hiro Mainnet API"},{"url":"https://api.testnet.hiro.so","description":"Hiro Testnet API"}],"security":[],"paths":{"/v2/attachments/inv":{"get":{"summary":"Get attachment inventory","tags":["Atlas"],"operationId":"getAttachmentsInventory","description":"Get inventory of attachments for a given index block hash and page range.\nThis returns a bitfield indicating which attachments are available.\n","parameters":[{"name":"index_block_hash","in":"query","required":true,"description":"Hex-encoded index block hash (64 characters)","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"pages_indexes","in":"query","required":true,"description":"Comma-separated list of page indexes to query","schema":{"type":"string","pattern":"^[0-9]+(,[0-9]+){0,7}$","description":"max 8 pages per request"}}],"responses":{"200":{"description":"Attachment inventory bitfield","content":{"application/json":{"schema":{"type":"object","properties":{"block_id":{"type":"string","description":"Index block hash"},"pages":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"Page index"},"inventory":{"type":"array","description":"8-byte bitfield for the page (array of integers 0-255)","items":{"type":"integer","minimum":0,"maximum":255}}}}}}}}}},"400":{"description":"Bad request","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not found","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```
