> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/reference/servers-api/disk/listdisks.md).

# Use Cases

* **Inventory All Disks in a Subscription** Call this endpoint to get a complete view of every disk — root disks, data disks, and unattached volumes — within a subscription. Use the `type` and `status` fields in the response to categorize and audit your storage resources.
* **Find Unattached Disks Available for Reuse** Filter the response by checking for disks where `serverId` is `null`. These are disks not currently attached to any server and can be attached to a new or existing server using the [Attach Disk to Server](https://gitlab.com/plenit-group/plenit-docs-es-es/-/blob/v1.0/reference/diskattachtoserver/README.md) endpoint, avoiding unnecessary disk creation.
* **Monitor Disk Status and Capacity** Periodically poll this endpoint to track disk states (e.g., `Ready`, provisioning) and sizes across your infrastructure. Build alerts or dashboards that flag disks nearing capacity limits or stuck in unexpected states.
* **Retrieve Disk IDs for Downstream Operations** Before calling endpoints like [Attach Disk to Server](https://gitlab.com/plenit-group/plenit-docs-es-es/-/blob/v1.0/reference/diskattachtoserver/README.md) or [Delete a Disk](https://gitlab.com/plenit-group/plenit-docs-es-es/-/blob/v1.0/reference/deletedisk/README.md), use this endpoint to look up the target `diskId`. Filter by `name` or `publicName` to locate the specific disk programmatically instead of hardcoding IDs.
* **Reconcile Disk-to-Server Mappings** Use the `serverId` field in each disk response to build a map of which disks belong to which servers. This is useful for infrastructure audits, billing reconciliation, and verifying that multi-disk server configurations match your expected architecture.

## Getting Required Parameters

* **subscriptionId** (query): Retrieve available subscription IDs using the [List all Subscriptions](https://gitlab.com/plenit-group/plenit-docs-es-es/-/blob/v1.0/reference/listallsubscriptions/README.md) endpoint. Pass your `organizationId` as a query parameter to get all subscriptions for your organization, then use the `id` field from the response.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.plenit.com/reference/servers-api/disk/listdisks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
