Skip to main content

List Storage Volumes

List all storage volumes for the current user.

/storage/volume/list

Authorization

You can find the AccessToken in the Request Header, or copy it from the web page(copy Auth Token). This token is generated each time you log in and will expire after one day.

You can also request the login api to get another token. See login api.

The AccessToken should be included in the request as a cookie. In the cURL example below, you can see how the token is passed using the -b flag:

-b 'AccessToken=your_token_here'

Note: Replace your_token_here with your actual AccessToken. The token is a JWT (JSON Web Token) that contains your authentication information and permissions.

Request Body

The request body contains pagination parameters.

FieldTypeRequiredDescription
pagerobjectYesPagination configuration

Pager Configuration

The pager object contains:

FieldTypeRequiredDescription
currentPagenumberYesCurrent page number (starts from 1)
pageSizenumberYesNumber of items per page

Example Request

{
"pager": {
"currentPage": 1,
"pageSize": 10
}
}

cURL Example

curl 'https://hpc-ai.com/api/storage/volume/list' \
-H 'content-type: application/json' \
-b 'AccessToken=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGxhdGZvcm0uY29sb3NzYWxhaS5jb20iXSwiZXhwIjoxNzUxNjExOTE2LCJncm91cCI6WyJhZG1pbiJdLCJpYXQiOjE3NTE1MjU1MTYsImlzcyI6ImhwY2FpdGVjaC5jb20iLCJzdWIiOiIwOGY2ZjI2MS1hNzY2LTQ2M2UtOGJhNC04NWU2YWUzMmY0OTIifQ.hDEYrfq5zksB7ywx7scoNM-IJmyW88mYTtz435kamqoO8etsSPHy1yLe2L7WKAkUx_eJOISUauwTUX6Of8ys5gj8MP4BK6Ixh_saAWylRdF7IrFMDb16Yaxc2a91yAhK26IsiDCOoygSBYZ8tMHMUJkudkY2CqzSJvb3Z-kCqJfK8wlgY45Dgx6dTkVeYvA9bohnRQ6R4hI57HJo8fnav3VxkzEbYcs9UmLSNgfPYdC-mCURsSsPUaCTVEUxk9oJaHXmyH61uo7ZQKOHXNqsCHVgwFJPAm3YjPCx3n1jNYPGH-amnrLt0PQVpFa-PGWwjySrOVyjmjtlsMgSbxxxx' \
--data-raw '{"pager":{"currentPage":1,"pageSize":10}}'

Response Fields

FieldTypeDescription
volumeListarrayArray of volume objects

Volume Object

Each object in the volumeList array contains the following fields:

FieldTypeDescription
idstringUnique volume ID
volumeNamestringVolume name
regionstringRegion ID where the volume is located
volumeTypestringVolume type (filesystem, highspeedstorage)
sizeGBnumberTotal size of the volume in GB
usageGBnumberUsed space in GB
statusstringVolume status (Bound, Pending, etc.)
usernamestringUsername who owns the volume

Example Response

Success Response

{
"volumeList": [
{
"id": "da18c47c-xxxx-xxxx-xxxx-f5289ab0c8c3",
"volumeName": "example-volume",
"region": "fce31a0c-xxxx-xxxx-xxxx-41caa1bdd251",
"volumeType": "filesystem",
"sizeGB": 200,
"usageGB": 0,
"status": "Bound",
"username": "username"
}
]
}

Error Response

{
"code": -1,
"message": "Not logged in or login expired, please log in again"
}