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.
Field | Type | Required | Description |
---|---|---|---|
pager | object | Yes | Pagination configuration |
Pager Configuration
The pager
object contains:
Field | Type | Required | Description |
---|---|---|---|
currentPage | number | Yes | Current page number (starts from 1) |
pageSize | number | Yes | Number 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
Field | Type | Description |
---|---|---|
volumeList | array | Array of volume objects |
Volume Object
Each object in the volumeList
array contains the following fields:
Field | Type | Description |
---|---|---|
id | string | Unique volume ID |
volumeName | string | Volume name |
region | string | Region ID where the volume is located |
volumeType | string | Volume type (filesystem, highspeedstorage) |
sizeGB | number | Total size of the volume in GB |
usageGB | number | Used space in GB |
status | string | Volume status (Bound, Pending, etc.) |
username | string | Username 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"
}