6.Image
1. Upload image
API address: /v1/image
Request method:POST
Request data type:application/json
Response data type:*/*,application/json
Supported version:v1.2.0
API description:
Upload container image (asynchronous task; after submitting the request, the image will be uploaded to the image repository. After the upload succeeds, the data will be returned in the image list, and the execution result can be queried in task-related interfaces based on the returned traceId)
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 |
| imageUrl | Image download address | body | true | string | |
| socType | Compute specification model | body | true | string | Supports Orion865, Cruise10, and Orion8G2 models |
| name | Image name | body | false | string | Image name; if not specified, it remains consistent with the generated imageId |
| tags | Image business Tags information (system version, GS version, and other information) | body | false | Map<String, String> | For example: {"GsVersion":"V2.0.1","Firmware":"567"} |
| imageMd5 | Image MD5 information | body | false | string | Used for upload image verification, optional |
| syncNodeUuids | Image synchronization node list | body | false | List<String> | if not passed, all nodes are synced by default; an empty array means no sync |
| callbackUrl | Notification callback address | body | false | string | POST request |
Request example:
POST "/openapi/v1/image"
body:
{
"imageUrl": "http://www.cheersucloud.com/images/qsandroid10_1.0.2.tar",
"socType": "Orion865",
"name": "Orion865-android10_1.0.1",
"projectId":"project_admin",
"syncNodeUuids": [
"1ddf1365dac9137cf77d6d0142ff7251"
]
}
Response parameters:
| Parameter name | Parameter description | Type | Description |
|---|---|---|---|
| code | Return code | integer(int32) | |
| message | Return processing message | string | |
| result | Result | object | |
| jobId | Task ID | string | |
| syncNodeJobs | Synchronize image task | list<object> | |
| jobId | Task id | String | |
| command | Operation | String | |
| code | Return code | integer | |
| message | Return processing message | String | |
| nodeUuid | Node uuid | String | |
| timestamp | Timestamp | integer(int64) | |
| traceId | Request processing ID | string | Request ID; this traceId can be used to query task results under this request in batches |
Response example:
{
"message": "成功",
"code": 200,
"timestamp": 1703655847574,
"result": {
"jobId": "4dab5a486599491ea98b702969d7044d",
"syncNodeJobs":[
{
"jobId": "02c0182b3e3446ed8022e0cefa91e9db",
"command": "distributeImage",
"code": 200,
"message": "SUCCESS",
"nodeUuid": "1ddf1365dac9137cf77d6d0142ff7251"
}
]
},
"traceId": "C20231227134407574007"
}
2. Image paginated list
API address: /v1/image/page/list
Request method:POST
Request data type:application/json
Response data type:*/*,application/json
Supported version:v1.2.0
API description:
Query image 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 |
| type | Query type | body | false | string | Default ALL (query both public and private images), public (query public images), private (query private images, projectId must be specified) |
| pageNum | Current page number | body | false | integer | Default 1 |
| pageSize | Amount of data on the current page | body | false | integer | Default 10 |
Request example:
Response parameters:
| Parameter name | Parameter description | Type | Description |
|---|---|---|---|
| code | Return code | integer(int32) | |
| message | Return processing message | string | |
| result | Returned data object | IPage<object> | |
| records | Data list on the current page | list<object> | |
| uuid | Image UUID | string | |
| imageId | Image identifier | string | For example: img-1749452445158 |
| name | Image name | string | |
| digest | Image digest | string | |
| os | Operating system | string | For example: Android 10, Android 13 |
| type | Image type | string | public public image, private private image |
| status | Status | integer | 0:disabled 1:enabled |
| socType | Compute specification model | string | |
| size | Image size | long | Unit is B |
| sizeStr | Capacity conversion | string | Adaptive size field (unit: B) uses M or G as the unit and takes an integer |
| projectId | Project ID | string | |
| syncNodeUuids | Image synchronization node list | List<string> | |
| tags | Image business Tags information (system version, GS version, and other information) | Map<String,String> | |
| remark | Remarks | string | |
| createTime | Creation time | string | |
| updateTime | Modification 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 | string |
Response example:
{
"message": "操作成功!",
"code": 200,
"result": {
"records": [
{
"imageId": "img-1755521097901",
"os": "Android 10",
"remark": "",
"updateTime": "2025-08-18 20:46:20",
"type": "private",
"uuid": "a855bed61a5a49d5a21446d0295f3bc9",
"sizeStr": "824.0 MB",
"socType": "Orion865",
"syncNodeUuids": [
"6aa62c31370175ee1bbe20356c5bd083",
"beb95a81559b894a92c9f1bb13c7aeba"
],
"size": 864070140,
"createTime": "2025-08-18 20:46:20",
"name": "hf20280818",
"digest": "sha256:225caa95edcb8f873f480fce47547fefea30062ee16427143ead83b8ff36c3ee",
"projectId": "f93afddd503d1fc6ada3174160852180",
"status": 1,
"tags":{
"key":"value"
}
}
],
"total": 1,
"current": 1,
"pages": 1,
"size": 10
},
"timestamp": 1703657528870,
"traceId": "C20231227141208870307"
}
3. Delete image
API address: /v1/image/delete
Request method:DELETE
Request data type:application/json
Response data type:*/*,application/json
Supported version:v2.2.0
API description:
Delete container image, parameter is a key-value pair of image uuid and name
Request parameters:
| Parameter name | Parameter description | Location | Whether required | Data type | Description |
|---|---|---|---|---|---|
| {uuid} | Image UUID | body | true | string | value is image name |
Request example:
Response parameters:
| Parameter name | Parameter description | Type | Description |
|---|---|---|---|
| code | Return code | integer(int32) | |
| message | Return processing message | string | |
| result | Result | object | |
| timestamp | Timestamp | integer(int64) | |
| traceId | Request processing ID | string | Request ID |
Response example:
{
"message": "成功",
"code": 200,
"result": null,
"timestamp": 1703655847574,
"traceId": "C20231227134407574007"
}
4. Synchronize image
API address: /v1/image/distribute
Request method:POST
Request data type:application/json
Response data type:*/*,application/json
Supported version:v2.6.0
API description:
Synchronize image
Request parameters:
| Parameter name | Parameter description | Location | Whether required | Data type | Description |
|---|---|---|---|---|---|
| uuid | Image UUID | body | true | string | |
| syncNodeUuids | Synchronization node uuid | body | true | List<String> |
Request example:
POST "/openapi/v1/image/distribute"
body:
{
"syncNodeUuids": [
"1ddf1365dac9137cf77d6d0142ff7251"
],
"uuid": "bcfcef2741254267aa7f06174536cf87"
}
Response parameters:
| Parameter name | Parameter description | Type | Description |
|---|---|---|---|
| code | Return code | integer(int32) | |
| message | Return processing message | string | |
| result | Result | list<object> | |
| jobId | Task id | String | |
| command | Operation | String | |
| code | Return code | integer | |
| message | Return processing message | String | |
| nodeUuid | Node uuid | String | |
| timestamp | Timestamp | integer(int64) | |
| traceId | Request processing ID | string | Request ID |
Response example: