> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/reference/api/stacks-node-rpc/atlas.md).

# 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"}],"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":{"$ref":"#/components/schemas/AttachmentData"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"schemas":{"AttachmentData":{"type":"object","properties":{"attachment":{"type":"string","format":"byte","description":"The attachment data, hex-encoded."}},"required":["attachment"]}},"responses":{"BadRequest":{"description":"Bad request","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"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"}],"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.\n- Maximum 8 pages per request\n- Each index must be 0-4294967295 (u32 range)\n- Values outside u32 range return 400 Bad Request\n","schema":{"type":"string","pattern":"^[0-9]{1,10}(,[0-9]{1,10}){0,7}$"}}],"responses":{"200":{"description":"Attachment inventory bitfield","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInventory"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"schemas":{"AttachmentInventory":{"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}}}}}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Not found","content":{"text/plain":{"schema":{"type":"string"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stacks.co/reference/api/stacks-node-rpc/atlas.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
