> For the complete documentation index, see [llms.txt](https://docs.yottalabs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yottalabs.ai/api-and-sdk/api-reference-v2/volume.md).

# Volume

## Get Volume

> Get volume detail

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Volumes v2"}],"security":[{}],"paths":{"/v2/volumes/{id}":{"get":{"summary":"Get Volume","deprecated":false,"description":"Get volume detail","operationId":"getVolume","tags":["API v2","Volumes v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVolumeV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVolumeV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/VolumeV2Response","description":"data"}}},"VolumeV2Response":{"type":"object","description":"Volume v2 response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"name":{"type":"string","description":"Volume name"},"type":{"type":"string","description":"Volume type"},"status":{"type":"string","description":"Volume status"},"sizeBytes":{"type":"string","description":"Actual used size in bytes as string"},"sizeInGb":{"type":"integer","format":"int32","description":"Actual used size in GiB, floored integer"},"cost":{"type":"string","description":"Accumulated cost as string"},"currency":{"type":"string","description":"Currency"},"mountStatus":{"type":"string","description":"Mount status","enum":["MOUNTED","UNMOUNTED"]},"mountCount":{"type":"integer","format":"int32","description":"Current mount count"},"createdAt":{"type":"string","description":"Creation time in ISO 8601 UTC"},"region":{"type":"string","description":"Region. Cloud storage can be null."},"failReason":{"type":"string","description":"Failure reason when creation/deletion fails"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## List Volumes

> List cloud storage volumes

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Volumes v2"}],"security":[{}],"paths":{"/v2/volumes":{"get":{"summary":"List Volumes","deprecated":false,"description":"List cloud storage volumes","operationId":"listVolumes","tags":["API v2","Volumes v2"],"parameters":[{"name":"page","in":"query","description":"Page number, 1-based","required":false,"schema":{"type":"integer","format":"int64","description":"Page number, 1-based"}},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int64","description":"Page size"}},{"name":"type","in":"query","description":"Volume type. First version only supports CLOUD_STORAGE.","required":false,"schema":{"type":"string","description":"Volume type. First version only supports CLOUD_STORAGE.","enum":["CLOUD_STORAGE"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultV2PageResponseVolumeV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultV2PageResponseVolumeV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/V2PageResponseVolumeV2Response","description":"data"}}},"V2PageResponseVolumeV2Response":{"type":"object","description":"Paginated Response","properties":{"items":{"type":"array","description":"List of items in the current page","items":{"$ref":"#/components/schemas/VolumeV2Response"}},"page":{"type":"integer","format":"int64","description":"Current page number (1-based)"},"size":{"type":"integer","format":"int64","description":"Number of items per page"},"total":{"type":"integer","format":"int64","description":"Total number of items across all pages"},"pages":{"type":"integer","format":"int64","description":"Total number of pages"}}},"VolumeV2Response":{"type":"object","description":"Volume v2 response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"name":{"type":"string","description":"Volume name"},"type":{"type":"string","description":"Volume type"},"status":{"type":"string","description":"Volume status"},"sizeBytes":{"type":"string","description":"Actual used size in bytes as string"},"sizeInGb":{"type":"integer","format":"int32","description":"Actual used size in GiB, floored integer"},"cost":{"type":"string","description":"Accumulated cost as string"},"currency":{"type":"string","description":"Currency"},"mountStatus":{"type":"string","description":"Mount status","enum":["MOUNTED","UNMOUNTED"]},"mountCount":{"type":"integer","format":"int32","description":"Current mount count"},"createdAt":{"type":"string","description":"Creation time in ISO 8601 UTC"},"region":{"type":"string","description":"Region. Cloud storage can be null."},"failReason":{"type":"string","description":"Failure reason when creation/deletion fails"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Create Volume

> Create a cloud storage volume

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Volumes v2"}],"security":[{}],"paths":{"/v2/volumes":{"post":{"summary":"Create Volume","deprecated":false,"description":"Create a cloud storage volume","operationId":"createVolume","tags":["API v2","Volumes v2"],"parameters":[{"name":"sizeInGb","in":"query","description":"","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeV2CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVolumeV2Response"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"VolumeV2CreateRequest":{"type":"object","description":"Volume v2 create request","properties":{"name":{"type":"string","description":"Volume name","minLength":1},"type":{"type":"string","description":"Volume type. First version only supports CLOUD_STORAGE.","enum":["CLOUD_STORAGE"]}},"required":["name"]},"ResultVolumeV2Response":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/VolumeV2Response","description":"data"}}},"VolumeV2Response":{"type":"object","description":"Volume v2 response","properties":{"id":{"type":"string","description":"Volume ID as string to avoid JavaScript int64 precision loss"},"name":{"type":"string","description":"Volume name"},"type":{"type":"string","description":"Volume type"},"status":{"type":"string","description":"Volume status"},"sizeBytes":{"type":"string","description":"Actual used size in bytes as string"},"sizeInGb":{"type":"integer","format":"int32","description":"Actual used size in GiB, floored integer"},"cost":{"type":"string","description":"Accumulated cost as string"},"currency":{"type":"string","description":"Currency"},"mountStatus":{"type":"string","description":"Mount status","enum":["MOUNTED","UNMOUNTED"]},"mountCount":{"type":"integer","format":"int32","description":"Current mount count"},"createdAt":{"type":"string","description":"Creation time in ISO 8601 UTC"},"region":{"type":"string","description":"Region. Cloud storage can be null."},"failReason":{"type":"string","description":"Failure reason when creation/deletion fails"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Delete Volume

> Delete a volume

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"API v2"},{"name":"Volumes v2"}],"security":[{}],"paths":{"/v2/volumes/{id}":{"delete":{"summary":"Delete Volume","deprecated":false,"description":"Delete a volume","operationId":"deleteVolume","tags":["API v2","Volumes v2"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"Result":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```


---

# 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.yottalabs.ai/api-and-sdk/api-reference-v2/volume.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.
