General parameter description
All interfaces contain three parameters: appId
, workspaceId
and tenantId
. The meanings of these three parameters are as follows. The three parameters will be omitted in subsequent interface descriptions of this document.
Parameter | Type | Description |
appId | String | App ID. |
workspaceId | String | Workspace ID. |
tenantId | String | Tenant ID. |
General response description
Parameter | Type | Description |
resultCode | String | Normally, the code returned is |
requestId | String | Request ID. |
resultMessage | String | Returned value after query failure. |
Result | Object | The objects returned. The actual meaning varies with the value returned. |
The objects returned include the following fields:
Name | Type | Description |
resultMsg | String | Returned value after query failure. |
success | Boolean | Whether the query is successful. |
Create virtual domain
Request - CreateMcubeVhostRequest
Parameter | Type | Description |
vhost | String | Virtual domain name. |
Response - CreateMcubeVhostResponse
{
"createVhostResult":{
"data":"success",
"resultMsg":"",
"success":true
},
"requestId":"F9C681F2-6377-488D-865B-1144E0CE69D2",
"resultCode":"OK"
}
Response description
Name | Type | Description |
createVhostResult | Object | The objects returned, includes general response only. See General response description for details. |
Query virtual domain
Request - QueryMcubeVhostRequest
Includes general parameters only. See General parameter description for details.
Response - QueryMcubeVhostResponse
{
"queryVhostResult":{
"data":"test.com",
"resultMsg":"",
"success":true
},
"requestId":"637D5BE0-0111-4C53-BCEE-473CFFA0DBAD",
"resultCode":"OK"
}
Response description
Response name | Type | Description |
queryVhostResult | Object | The objects returned. See the table below for meanings. |
The objects returned include the following fields:
Name | Type | Description |
data | String | The virtual domain name queried. |
Query if key file exists
Request - ExistMcubeRsaKeyRequest
Includes general parameters only. See General parameter description for details.
Response - ExistMcubeRsaKeyResponse
{
"checkRsaKeyResult":{
"data":"fail",
"resultMsg":"",
"success":false
},
"requestId":"8F76783A-8070-4182-895D-14E5D66F8BA3",
"resultCode":"OK"
}
Response description
Response name | Type | Description |
checkRsaKeyResult | Object | The objects returned. See the table below for meanings. |
The objects returned include the following fields:
Name | Type | Description |
data | String | Query result: |
Obtain upload file token
Request - GetMcubeFileTokenRequest
Parameter | Type | Description |
onexFlag | Boolean | The fixed value is |
Response - GetMcubeFileTokenResponse
{
"getFileTokenResult":{
"fileToken":{
"accessid":"LTAI7z7XPfKU****",
"dir":"mds/tempFileForOnex/ONEXE9B092D/test/PUQYHL/8b574cb7-3596-403f-a0e9-208660fc2081/",
"expire":"1584327372",
"host":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com",
"policy":"QwM2YtYTBlOS0yMDg2NjBmYzIwODEvIl1dfQ==",
"signature":"kisfP5YhbPtmES8+w="
},
"resultMsg":"",
"success":true
},
"requestId":"8BAA3288-662E-422C-9960-2EEBFC08369F",
"resultCode":"OK"
}
Response description
Response name | Type | Description |
getFileTokenResult | Object | The objects returned, includes general response only. See General response description for details. |
Upload key file
Request - UploadMcubeRsaKeyRequest
Parameter | Type | Description |
onexFlag | Boolean | The fixed value is |
fileUrl | String | The save address of the key file in OSS. |
Response Value - UploadMcubeRsaKeyResponse
{
"requestId":"519E35CF-CC60-4890-8C8E-89A98CEA6BB0",
"resultCode":"OK",
"uploadRsaResult":{
"data":"processed successfully",
"resultMsg":"",
"success":true
}
}
Response value description
Response name | Type | Description |
data | String | If the creation is successful, return processing success. If the creation fails, the success field value is fasle. |
uploadRsaResult | Object | The objects returned. |
Obtain offline package app list
Request - ListMcubeNebulaAppsRequest
Includes general parameters only. See General parameter description for details.
Response - ListMcubeNebulaAppsResponse
{
"listMcubeNebulaAppsResult":{
"nebulaAppInfos":[
{
"h5Id":"12345678",
"h5Name":"12345678"
},
{
"h5Id":"12345679",
"h5Name":"openapiTest"
}
],
"resultMsg":"",
"success":true
},
"requestId":"BE728F09-6EBD-4688-9329-896813EAD075",
"resultCode":"OK"
}
Create offline package app
Request - CreateMcubeNebulaAppRequest
Parameter | Type | Description |
h5Name | String | Offline package name. |
h5Id | String | Offline package ID. 8 digits. |
Response - CreateMcubeNebulaAppResponse
{
"createNebulaAppResult":{
"resultMsg":"",
"success":true
},
"requestId":"5B588AFE-8D58-4460-B0AA-6A48A9FD0852",
"resultCode":"OK"
}
Delete offline package app
Request - DeleteMcubeNebulaAppRequest
Parameter | Type | Description |
h5Id | String | Offline package ID. 8 digits. |
Response - DeleteMcubeNebulaAppResponse
{
"deleteMcubeNebulaAppResult":{
"resultMsg":"",
"success":true
},
"requestId":"E24C760E-4849-4341-91C6-6DA97F5B6B76",
"resultCode":"OK"
}
Upload offline package
Request - CreateMcubeNebulaResourceRequest
Name | Type | Description |
h5Id | String | ID of the HTML5 app. |
h5Name | String | Name of the HTML5 app. |
h5Version | String | Version of the offline package. Must be unique in an HTML5 app. |
mainUrl | String | Main URL of the offline package. Should satisfy the regular expression pattern: |
vhost | String | Virtual domain name of the HTML5 app. |
extendInfo | String | Extended fields in JSON format. |
autoInstall | Integer | Specify the network in which downloads are allowed. 0: Wi-Fi only (Without Wi-Fi connection, download starts only when users use the app). 1: All networks (Consumes cellular data. Do not choose this mode unless in special situations.) |
resourceType | Integer | Resource type. One HTML5 app can have only one resource type. 0: Global resource. 1: Private resource. |
installType | Integer | Specify whether to preload the offline package before installing it. 0: Not preload (install only when the user enters the offline package page) 1: Preload (automatically install after the offline package is downloaded) |
platform | String | Platform. Includes all, Android and iOS. |
clientVersionMin | String | Minimum client version. Minimum version is required when platform is chosen. The format is |
clientVersionMax | String | Maximum client version. Can be empty. If the value of platform is |
fileUrl | String | The OSS URL of the offline package file. The package must be a ZIP file. |
repeatNebula | Integer | Whether to reuse the global package. Required when the resource package is global resource. 0: No, 1: Yes. |
onexFlag | Boolean | The fixed value is |
Response - CreateMcubeNebulaResourceResponse
{
"createMcubeNebulaResourceReslult":{
"nebulaResourceId":"4154",
"resultMsg":"",
"success":true
},
"requestId":"DFCA28DF-0F97-4C41-B3D4-351D284B51E7",
"resultCode":"OK"
}
nebulaResourceId
is the ID of the offline package uploaded.
Obtain resource package list
Request - ListMcubeNebulaResourcesRequest
Parameter | Type | Description |
h5Id | String | HTML5 app ID. |
Response - ListMcubeNebulaResourcesResponse
Response description
Response name | Type | Description |
appCode | String | appId+"-"+workspaceId |
autoInstall | Integer | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
clientVersionMax | String | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
clientVersionMin | String | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
creator | String | Creator. Currently not in use. |
debugUrl | String | Has no meaning in current response. |
downloadUrl | String | Download address of offline package ARM file. |
extendInfo | String | The extended fields passed in the offline package upload request. |
extraData | String | Extended parameters. |
fallbackBaseUrl | String | Offline package fallback address, delimited by semicolon ( |
fileSize | String | File size |
gmtCreate | Date | Time of creation |
gmtModified | Date | Time of update |
h5Id | String | ID of the HTML5 app. |
h5Name | String | Name of the HTML5 app. |
h5Version | String | Version of the current offline package package |
id | Long | Primary key. |
installType | Integer | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
lazyLoad | Integer | Lazy loading. Currently the value is 0. |
mainUrl | String | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
md5 | String | md 5 of the offline package file. |
memo | String | Download address of the offline package |
metaId | Long | Has no meaning in current response. |
modifier | String | Modifier. Currently not in use. |
platform | String | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
publishPeriod | Integer | Release status. 0: Initialization 1: Internal gray release 2: External gray release 3: Formal release 4: Rollback release 5: Release task ends |
releaseVersion | String | Release version. |
resourceType | Integer | The meaning is the same as the parameter in the offline package upload request. See Upload offline package for details. |
status | Integer | Status |
Create Offline package release task
Request - CreateMcubeNebulaTaskRequest
Parameter | Type | Required | Description |
publishType | Integer | Yes | Release type.
|
publishMode | Integer | Yes | Release mode. If publishType is
|
memo | String | No | Release note. |
id | Long | Yes | Only |
greyEndtimeData | String | No | End time of time window grey release. Required when |
greyEndTime | Date | No | Date type. The value is same as that of |
greyNum | Integer | No | Number of users in time window grey release. Required when |
whitelistIds | String | No | Primary key ID of whitelist. Required when |
packageId | Long | Yes | Primary key ID of the resource package. |
greyConfigInfo | String | No | Advanced rule, JSON string. See the table below for meanings. Example: [{“ruleElement”:”city”,”operation”:1,”value”:”Shanghai,Beijing,Tianjin”},{“ruleElement”:”mobileModel”,”operation”:2,”value”:”REDMI NOTE 3,VIVO X5M”},{“ruleElement”:”osVersion”,”operation”:3,”value2”:”9.2.1”,”value1”:”9.2.1”,”value”:”9.2.1-9.2.1”}] |
Advanced rule description
Name | Type | Description |
ruleElement | String | Rule type:
|
value | String | Rule value. Separate multiple values with comma ( |
operation | Integer | Operation:
If |
Response - CreateMcubeNebulaTaskResponse
{
"createMcubeNebulaTaskResult":{
"nebulaTaskId":"6664",
"resultMsg":"",
"success":true
},
"requestId":"BBDF54E1-2783-4E5A-AE19-F7BC3A1BB3C2",
"resultCode":"OK"
}
nebulaTaskId
is the created release task ID.
Obtain release task list
Request - ListMcubeNebulaTasksRequest
Parameter | Type | Description |
id | Long | ID of the offline package corresponding to the release task. |
Response - ListMcubeNebulaTasksResponse
{
"listMcubeNebulaTaskResult":{
"nebulaTaskInfos":[
{
"appCode":"ONEX97C5D29290957-default",
"bizType":"nebula",
"creator":"",
"gmtCreate":"2021-02-01 14:16:58",
"gmtModified":"2021-02-01 14:16:58",
"gmtModifiedStr":"2021-02-01 14:16:58",
"greyConfigInfo":"",
"greyEndtimeData":"",
"greyNum":0,
"greyUrl":"",
"id":6664,
"memo":"test",
"modifier":"",
"packageId":4154,
"percent":0,
"platform":"all",
"productId":"ONEX97C5D29290957-default-12345678",
"productVersion":"1.0.0.1",
"publishMode":4,
"publishType":3,
"releaseVersion":"20210201141121",
"status":1,
"syncResult":"",
"taskName":"12345678",
"taskStatus":1,
"taskType":0,
"taskVersion":1612160218556,
"upgradeNoticeNum":0,
"upgradeProgress":"",
"whitelistIds":""
}
],
"resultMsg":"",
"success":true
},
"requestId":"B9A07543-4B8B-43D0-AB33-7F2ACB954909",
"resultCode":"OK"
}
Response description
Name | Type | Description |
appCode | String | appId+workspaceId |
bizType | String | The value for offline package is |
bundles | Array | Currently not in use. |
creator | String | Currently not in use. |
gmtCreate | Date | Time of creation. |
gmtModified | Date | Time of update. |
gmtModifiedStr | String | Update time string. |
greyConfigInfo | String | Advanced rule string, different from that in the upload request. See greyConfigInfo explanation for details. |
greyEndtime | Date | End time of time window grey release. |
greyEndtimeData | String | End time string of time window grey release. |
greyNum | Integer | Number of users in time window grey release. |
id | Long | Primary key ID of current release task. |
memo | String | Release note. |
modifier | String | Modifier. Currently not in use. |
packageId | Long | ID of the offline package corresponding to the current task. |
percent | Integer | Grey percent. Currently the value is 0. |
platform | String | Platform of the release task. Includes all, Android and iOS. |
productId | String | Product ID. The format is |
productVersion | String | ID of the offline package. |
publishMode | Integer | Release mode:
|
publishType | Integer | Release type:
|
releaseVersion | String | Internal release version. |
resIds | String | ID of the corresponding offline package. |
status | Integer | Status:
|
syncResult | String | Currently not in use |
taskName | String | Task name, same as the HTML5 app name. |
taskStatus | Integer | Task status:
|
taskType | Integer | Task type:
|
taskVersion | Long | Task version, uses the time of task creation. |
upgradeNoticeNum | Integer | Currently not in use |
upgradeProgress | String | Currently not in use |
whitelistIds | String | Primary key ID of whitelist, delimited by comma ( |
greyConfigInfo explanation
Name | Type | Description |
operator | String | Relationship of the rules. |
defaultResult | boolean | The default returned result. |
subRules | Rule list. | |
operator | String | Rule name:
|
left | List<String>/Object |
|
right | String | Rule type name. |
defaultResult | Boolean | Default result. |
Obtain release task details by ID
Request - GetMcubeNebulaTaskDetailRequest
Parameter | Type | Description |
taskId | Long | Primary key ID of the release task. |
Response - GetMcubeNebulaTaskDetailResponse
{
"getMcubeNebulaTaskDetailResult":{
"nebulaTaskDetail":{
"appCode":"ONEX97C5D29290957-default",
"appId":"",
"atomic":0,
"baseInfoId":0,
"bizType":"nebula",
"creator":"",
"cronexpress":0,
"downloadUrl":"https://pre-mpaas.cn-hangzhou.oss.aliyuncs.com/ONEX97C5D29290957-default/12345678/1.0.0.1_all/nebula/12345678_1.0.0.1.amr;https://pre-mpaas.cn-hangzhou.oss.aliyuncs.com/ONEX97C5D29290957-default/12345678/1.0.0.1_all/nebula/12345678_1.0.0.1.amr",
"extraData":"{"resourceType":"1"}",
"fileSize":"0",
"fullRepair":0,
"gmtCreate":"2021-02-01 14:16:58",
"gmtModified":"2021-02-01 14:16:58",
"gmtModifiedStr":"2021-02-01 14:16:58",
"greyConfigInfo":"",
"greyEndtimeData":"",
"greyNum":0,
"greyUrl":"",
"id":6664,
"issueDesc":"",
"memo":"test",
"modifier":"",
"ossPath":"",
"packageId":4154,
"percent":0,
"platform":"all",
"productId":"ONEX97C5D29290957-default-12345678",
"productVersion":"1.0.0.1",
"publishMode":4,
"publishPeriod":3,
"publishType":3,
"quickRollback":0,
"releaseVersion":"20210201141121",
"ruleJsonList":[
],
"sourceId":"",
"sourceName":"",
"sourceType":"",
"status":1,
"syncResult":"",
"syncType":0,
"taskName":"12345678",
"taskStatus":1,
"taskType":0,
"taskVersion":1612160218556,
"upgradeNoticeNum":0,
"upgradeProgress":"",
"whitelistIds":"",
"workspaceId":""
},
"resultMsg":"",
"success":true
},
"requestId":"072AE251-B9F8-4A44-A621-9F0325EECC1E",
"resultCode":"OK"
}
Response description
Response name | Type | Description |
appCode | String | appId+workspaceId |
appId | String | Currently not in use. |
atomic | Integer | Whether is package is atomic or not. Currently can be ignored. 1: Yes. 0: No. |
baseInfoId | Long | The primary key ID of basic information. Currently can be ignored. |
bizType | String | The value is |
bundles | List | Currently not in use. |
creator | String | Currently not in use. |
cronexpress | Integer | 0: Execute once. 1: Execute multiple times. The value is |
downloadUrl | String | Offline package download address. The address before |
extraData | String | Extended data in JSON format. |
fileSize | String | File size |
gmtCreate | Date | Time of creation |
gmtModified | Date | Time of update |
greyConfigInfo | String | Advanced rule string. |
greyEndTime | Date | End time of time window grey release. |
greyEndtimeData | String | End time string of time window grey release. |
id | Long | Primary key ID |
issueDesc | String | Issue description. Currently not in use. |
mds | String | md 5 of the offline package file. |
memo | String | Release note. |
modifier | String | Modifier. Currently not in use. |
ossPath | String | Currently not in use. |
packageId | Long | Offline package ID. |
percent | Integer | Gray percent. Currently not in use. |
platform | String | Platform, all, iOS, Android. |
product_id | String | appId+workspaceId + H5Appid |
productVersion | String | Offline package version. |
resIds | String | Offline package ID. |
ruleJsonList | List | Release advanced rules. See the sample above for details. |
sourceId | String | Source ID. Currently not in use for offline package. |
sourceName | String | Currently not in use for offline package. |
sourceType | String | Source type. Currently not in use for offline package. |
status | Integer | Status. 0: Invalid, 1: Valid. |
syncResult | String | Currently not in use for offline package. |
syncType | String | Currently not in use for offline package. |
taskName | String | Task name |
taskStatus | Integer | Task status:
|
taskType | Integer | Task type:
|
taskVersion | Long | Task version, uses the time of task creation. |
upgradeNoticeNum | Integer | Currently not in use |
upgradeProgress | String | Currently not in use |
vmType | String | Android emulator type, separated by comma. 1: art 2: dalvik 3: lemur 4: aoc |
whitelist | List | Whitelist information of the offline package release task. Refer to Manage whitelists for detalis. |
Change offline package task status
Request - ChangeMcubeNebulaTaskStatusRequest
Parameter | Type | Description |
bizType | String | Pass |
packageId | Long | Offline package ID. |
taskId | Long | Release task ID. |
taskStatus | Integer | The status to change to. 0: To be released 1: Release in progress 2: Finished 3: Paused |
Response - ChangeMcubeNebulaTaskStatusResponse
{
"changeMcubeNebulaTaskStatusResult":{
"resultMsg":"",
"success":true
},
"requestId":"595F4CB4-ACFE-4A5B-AF5B-4ED837CAEF95",
"resultCode":"OK"
}