Skip to content

9.Cloud disk

1. cloud disk paginated list

API address: /v1/cloud/drive/mgr/page/list

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v2.2.0

API description:

cloud disk paginated list

Request parameters:

Parameter name Parameter description Location Whether required Data type Description
projectId Project Id body false string Defaults to the current user's default project
nodeUuid Node uuid body true string
status Status list body false list 0:in use, 1:creating, 2:creation failed, 3:pending mount,
4:mounting, 5:unmounting, 6:expanding, 7:shrinking,
8:deleting, 9:delete failed, 11:error
names cloud disk name list body false list
uuids cloud disk uuid list body false list
resUuids Mounted resource uuid list body false list
pageNum Current page number body false integer Default 1
pageSize Amount of data on the current page body false integer Default 10

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/cloud/drive/mgr/page/list"
body:
{
    "nodeUuid": "fb31044d1031d559a7b7268f36b65a6c",
    "projectId": "7b5a664173f526309e43faf775f09d1d",
    "resUuids": [],
    "status": [3],
    "uuids": []
}

Response parameters:

Parameter name Parameter description Type Description
code Return code integer(int32)
message Return processing message string
result Returned data object IPage<Region information>
  records Data list on the current page list<object>
    uuid uuid string
    name cloud disk name string
    type Type integer 1:SSD
    mountPath Mount path string
    resUuid Mounted card uuid string
    mountType Mount target type integer 2.bare board card 3:container
    storage Capacity (unit: G) integer
    projectId Project Id string
    status Status integer 0:in use, 1:creating, 2:creation failed, 3:pending mount,
4:mounting, 5:unmounting, 6:expanding, 7:shrinking,
8:deleting, 9:delete failed, 11:error
    remark Remarks string
    createTime Creation time string
  total Total number of records integer
  current Current page number integer
  pages Total pages integer
  size Number of items displayed per page integer
timestamp Timestamp integer(int64)
traceId Request processing ID boolean

Response example:

{
  "message": "操作成功",
  "code": 200,
  "result": {
    "records": [
      {
        "createTime": "2025-05-13 19:05:46",
        "name": "mi182-2",
        "remark": "mi182",
        "storage": 8,
        "type": 1,
        "mountType": null,
        "mountPath": null,
        "resUuid": null,
        "uuid": "042490b7600b4ee9a1f84a14d1cfe872",
        "projectId": "7b5a664173f526309e43faf775f09d1d",
        "status": 3
      },
      {
        "createTime": "2025-05-13 19:05:46",
        "name": "mi182-1",
        "remark": "mi182",
        "storage": 8,
        "type": 1,
        "mountType": 2,
        "mountPath": null,
        "resUuid": null,
        "uuid": "a6e3e2248ca24f7b9fb2ad89820ba0e2",
        "projectId": "7b5a664173f526309e43faf775f09d1d",
        "status": 3
      }
    ],
    "total": 2,
    "current": 1,
    "pages": 1,
    "size": 10
  },
  "timestamp": 1747135914033,
  "traceId": "E20250513193154033052"
}

2. Create cloud disk

API address: /v1/cloud/drive/mgr/create

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v2.2.0

API description:

Create cloud disk

Request parameters:

Parameter name Parameter description Location Whether required Data type Description
projectId Project Id body false string Defaults to the current user's default project
nodeUuid Node uuid body true string
name Name body true string
type Type body true integer 1:SSD
storage Capacity body true integer
number Quantity body true integer
remark Remarks body false string
callbackUrl Notification callback address body false string POST request

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/cloud/drive/mgr/create"
body:
{
    "nodeUuid":"fb31044d1031d559a7b7268f36b65a6c",
    "projectId":"7b5a664173f526309e43faf775f09d1d",
    "name":"mi182",
    "type":1,               
    "storage":8,           
    "number":1,             
    "remark":"",
    "callbackUrl":""
}

Response parameters:

Parameter name Parameter description Type Description
code Return code integer
message Return processing message string
result Returned data object object
  jobs Task result list<object>
    jobId Task ID string
    code Task submission status code integer CorrespondingResponse status code table
    message Task submission description string
    uuid cloud disk uuid string
    projectId Project Id string
timestamp Timestamp integer
traceId Request processing ID string

Response example:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "90a7954af9014eeba21036244c2729a3",
                "code": 200,
                "message": "success",
                "uuid": "a6e3e2248ca24f7b9fb2ad89820ba0e2",
                "projectId": "7b5a664173f526309e43faf775f09d1d"
            }
        ]
    },
    "timestamp": 1747134346344,
    "traceId": "E20250513190546314350"
}

3. Delete cloud disk

API address: /v1/cloud/drive/mgr/delete

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v2.2.0

API description:

Delete cloud disk

Deletable statuses include 2:creation failed, 3:pending mount, 9:deletion failed

Request parameters:

Parameter name Parameter description Location Whether required Data type Description
nodeUuid Node uuid body true string
uuids cloud disk uuid list body true list
projectId Project Id body false string Defaults to the current user's default project
callbackUrl Notification callback address body false string POST request

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/cloud/drive/mgr/delete"
body:
{
    "nodeUuid":"fb31044d1031d559a7b7268f36b65a6c",
    "uuids":["ed8f0fe711a249f69123745615aaa5bd"],
    "projectId":"7b5a664173f526309e43faf775f09d1d"
} 

Response parameters:

Parameter name Parameter description Type Description
code Return code integer
message Return processing message string
result Returned data object object
  jobs Task result list<object>
    jobId Task ID string
    code Task submission status code integer CorrespondingResponse status code table
    message Task submission description string
    uuid cloud disk uuid string
    projectId Project Id string
timestamp Timestamp integer
traceId Request processing ID string

Response example:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "a158c440b37840afbd26976151ff771c",
                "code": 200,
                "message": "success",
                "uuid": "5a2065cef44c458fb4942c588e2d4622",
                "projectId": "7b5a664173f526309e43faf775f09d1d"
            }
        ]
    },
    "timestamp": 1747137063895,
    "traceId": "E20250513195103748091"
}

4. Mount cloud disk

API address: /v1/cloud/drive/mgr/mount

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v2.2.0

API description:

Mount cloud disk

A cloud disk can only be mounted to one device; multiple cloud disks can be mounted to different directories on one device; subdirectories of a directory where a cloud disk is already mounted on the same device are not allowed to be mounted

Request parameters:

Parameter name Parameter description Location Whether required Data type Description
nodeUuid Node uuid body true string
list Mount list body true list
resourceUuid Resource uuid true string Card uuid or container uuid
cloudDriveUuid cloud disk uuid true string
  mountPath Absolute path of mount directory false string When selecting the container type, the mount directory field does not need to be passed. The container root directory is mounted by default
mountType Mounted resource type true string Mounted resource type. 2: bare card; 3: container
instanceStart Whether the container is started false boolean Default: Yes (that is, start)
callbackUrl Notification callback address body false string POST request

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/cloud/drive/mgr/mount"
body:
{
    "nodeUuid":"fb31044d1031d559a7b7268f36b65a6c",
    "list":[
        {
            "resourceUuid":"cade41c164b2e87848a365d7fa3e118d",
            "cloudDriveUuid":"3e25ec2f7103483b8abc8e3cde49ebca",
            "mountPath":"/data/mount/mi802"
        }
    ]
}

Response parameters:

Parameter name Parameter description Type Description
code Return code integer
message Return processing message string
result Returned data object object
  jobs Task result list<object>
    jobId Task ID string
    code Task submission status code integer CorrespondingResponse status code table
    message Task submission description string
    uuid Resource uuid string
    projectId Project Id string
timestamp Timestamp integer
traceId Request processing ID string

Response example:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "d9a3bcbc36e54b0fb0e7f9260bcf816a",
                "code": 200,
                "message": "success",
                "uuid": "cade41c164b2e87848a365d7fa3e118d",
                "projectId": "7b5a664173f526309e43faf775f09d1d"
            }
        ]
    },
    "timestamp": 1747104430892,
    "traceId": "E20250513104710862038"
}

5. Unmount cloud disk

API address: /v1/cloud/drive/mgr/unmount

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v2.2.0

API description:

Unmount cloud disk

Unmountable statuses include 0:in use

Request parameters:

Parameter name Parameter description Location Whether required Data type Description
nodeUuid Node uuid body true string
list Unmount list body true list
resourceUuid Resource uuid true string Card uuid or container uuid
cloudDriveUuid cloud disk uuid true string
mountType Mounted resource type true string Mounted resource type. 2: bare card; 3: container
callbackUrl Notification callback address body false string POST request

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/cloud/drive/mgr/unmount"
body:
{
    "nodeUuid":"fb31044d1031d559a7b7268f36b65a6c",
    "list":[
        {
            "resourceUuid":"cade41c164b2e87848a365d7fa3e118d",
            "cloudDriveUuid":"3e25ec2f7103483b8abc8e3cde49ebca"
        }
    ]
} 

Response parameters:

Parameter name Parameter description Type Description
code Return code integer
message Return processing message string
result Returned data object object
  jobs Task result list<object>
    jobId Task ID string
    code Task submission status code integer CorrespondingResponse status code table
    message Task submission description string
    uuid Resource uuid string
    projectId Project Id string
timestamp Timestamp integer
traceId Request processing ID string

Response example:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "d9a3bcbc36e54b0fb0e7f9260bcf816a",
                "code": 200,
                "message": "success",
                "uuid": "cade41c164b2e87848a365d7fa3e118d",
                "projectId": "7b5a664173f526309e43faf775f09d1d"
            }
        ]
    },
    "timestamp": 1747104430892,
    "traceId": "E20250513104710862038"
}