All Products
Search
Document Center

API description

Last Updated: Sep 29, 2021

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 OK. Other values indicate that the API request is abnormal.
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

  1. {
  2. "createVhostResult":{
  3. "data":"success",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"F9C681F2-6377-488D-865B-1144E0CE69D2",
  8. "resultCode":"OK"
  9. }

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

  1. {
  2. "queryVhostResult":{
  3. "data":"test.com",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"637D5BE0-0111-4C53-BCEE-473CFFA0DBAD",
  8. "resultCode":"OK"
  9. }

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

  1. {
  2. "checkRsaKeyResult":{
  3. "data":"fail",
  4. "resultMsg":"",
  5. "success":false
  6. },
  7. "requestId":"8F76783A-8070-4182-895D-14E5D66F8BA3",
  8. "resultCode":"OK"
  9. }

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: fail indicates the key does not exist, and success indicates the key exists.

Obtain upload file token

Request - GetMcubeFileTokenRequest

Parameter Type Description
onexFlag Boolean The fixed value is true.

Response - GetMcubeFileTokenResponse

  1. {
  2. "getFileTokenResult":{
  3. "fileToken":{
  4. "accessid":"LTAI7z7XPfKU8gs5",
  5. "dir":"mds/tempFileForOnex/ONEXE9B092D/test/PUQYHL/8b574cb7-3596-403f-a0e9-208660fc2081/",
  6. "expire":"1584327372",
  7. "host":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com",
  8. "policy":"QwM2YtYTBlOS0yMDg2NjBmYzIwODEvIl1dfQ==",
  9. "signature":"kisfP5YhbPtmES8+w="
  10. },
  11. "resultMsg":"",
  12. "success":true
  13. },
  14. "requestId":"8BAA3288-662E-422C-9960-2EEBFC08369F",
  15. "resultCode":"OK"
  16. }

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 true.
fileUrl String The save address of the key file in OSS.

Response - UploadMcubeRsaKeyResponse

  1. {
  2. "requestId":"519E35CF-CC60-4890-8C8E-89A98CEA6BB0",
  3. "resultCode":"OK",
  4. "uploadRsaResult":{
  5. "data":"processed successfully",
  6. "resultMsg":"",
  7. "success":true
  8. }
  9. }

Response description

Response name Type Description
uploadRsaResult Object The objects returned, includes general response only. See General response description for details.

Obtain offline package app list

Request - ListMcubeNebulaAppsRequest

Includes general parameters only. See General parameter description for details.

Response - ListMcubeNebulaAppsResponse

  1. {
  2. "listMcubeNebulaAppsResult":{
  3. "nebulaAppInfos":[
  4. {
  5. "h5Id":"12345678",
  6. "h5Name":"12345678"
  7. },
  8. {
  9. "h5Id":"12345679",
  10. "h5Name":"openapiTest"
  11. }
  12. ],
  13. "resultMsg":"",
  14. "success":true
  15. },
  16. "requestId":"BE728F09-6EBD-4688-9329-896813EAD075",
  17. "resultCode":"OK"
  18. }

Create offline package app

Request - CreateMcubeNebulaAppRequest

Parameter Type Description
h5Name String Offline package name.
h5Id String Offline package ID. 8 digits.

Response - CreateMcubeNebulaAppResponse

  1. {
  2. "createNebulaAppResult":{
  3. "resultMsg":"",
  4. "success":true
  5. },
  6. "requestId":"5B588AFE-8D58-4460-B0AA-6A48A9FD0852",
  7. "resultCode":"OK"
  8. }

Delete offline package app

Request - DeleteMcubeNebulaAppRequest

Parameter Type Description
h5Id String Offline package ID. 8 digits.

Response - DeleteMcubeNebulaAppResponse

  1. {
  2. "deleteMcubeNebulaAppResult":{
  3. "resultMsg":"",
  4. "success":true
  5. },
  6. "requestId":"E24C760E-4849-4341-91C6-6DA97F5B6B76",
  7. "resultCode":"OK"
  8. }

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 a HTML5 app.
mainUrl String Main URL of the offline package. Should satisfy the regular expression pattern: ^/[\w|/]+\.html$.
vhost String Virtual domain name of the HTML5 app.
extendInfo String Extended fields in JSON format.
autoInstall Integer Download time.
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 Install time.
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 aaa;bbb. aaa indicates iOS client version, and bbb indicates Android client version. The semicolon ; cannot be omitted. If Android is chosen as the platform, then the value is ;bbb.
clientVersionMax String Maximum client version. Can be empty. If the value of platform is all, then this value must appear in pairs. That is, iOS and Android version must both be included, or neither of them is included.
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 true.

Response - CreateMcubeNebulaResourceResponse

  1. {
  2. "createMcubeNebulaResourceReslult":{
  3. "nebulaResourceId":"4154",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"DFCA28DF-0F97-4C41-B3D4-351D284B51E7",
  8. "resultCode":"OK"
  9. }

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 (;). The address before ; is intranet address, and the address after ; is internet address.
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 h5.json file.
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.
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.
  • 2: Gray release
  • 3: Official release
publishMode Integer Yes Release mode. If publishType is 3, this field should be empty.
  • 1: Whitelist
  • 2: Time window
memo String No Release note.
id Long Yes Only 0 is allowed. The ID indicates creation, and cannot be modified.
greyEndtimeData String No. End time of time window grey release. Required when publishMode is 2. Format: YYYY-MM-dd HH:mm:ss. The time must be greater than the current time and less than 7 days from the current time.
greyEndTime Date Date type. The value is same as that of greyEndTimeData.
greyNum Integer No Number of users in time window grey release. Required when publishMode is 2.
whitelistIds String No Primary key ID of whitelist. Required when publishMode is 1. Separate multiple IDs with comma ,.
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:
  • city: City
  • mobileModel: Mobile phone model
  • netType: Network
  • osVersion: Device OS version
value String Rule value. Separate multiple values with comma (,). When operation is 3 or 4, the value is in aa-bb format, in which aa is the smaller value, and bb is the greater value.
operation Integer Operation:
  • 1: Include
  • 2: Exclude
  • 3: Within range
  • 4: Out of range
If ruleElement is city, mobileModel and netType, operation value can only be 1 or 2If ruleElement is osVersion, the value of operation can be any one of the four value.

Response - CreateMcubeNebulaTaskResponse

  1. {
  2. "createMcubeNebulaTaskResult":{
  3. "nebulaTaskId":"6664",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"BBDF54E1-2783-4E5A-AE19-F7BC3A1BB3C2",
  8. "resultCode":"OK"
  9. }

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

  1. {
  2. "listMcubeNebulaTaskResult":{
  3. "nebulaTaskInfos":[
  4. {
  5. "appCode":"ONEX97C5D29290957-default",
  6. "bizType":"nebula",
  7. "creator":"",
  8. "gmtCreate":"2021-02-01 14:16:58",
  9. "gmtModified":"2021-02-01 14:16:58",
  10. "gmtModifiedStr":"2021-02-01 14:16:58",
  11. "greyConfigInfo":"",
  12. "greyEndtimeData":"",
  13. "greyNum":0,
  14. "greyUrl":"",
  15. "id":6664,
  16. "memo":"test",
  17. "modifier":"",
  18. "packageId":4154,
  19. "percent":0,
  20. "platform":"all",
  21. "productId":"ONEX97C5D29290957-default-12345678",
  22. "productVersion":"1.0.0.1",
  23. "publishMode":4,
  24. "publishType":3,
  25. "releaseVersion":"20210201141121",
  26. "status":1,
  27. "syncResult":"",
  28. "taskName":"12345678",
  29. "taskStatus":1,
  30. "taskType":0,
  31. "taskVersion":1612160218556,
  32. "upgradeNoticeNum":0,
  33. "upgradeProgress":"",
  34. "whitelistIds":""
  35. }
  36. ],
  37. "resultMsg":"",
  38. "success":true
  39. },
  40. "requestId":"B9A07543-4B8B-43D0-AB33-7F2ACB954909",
  41. "resultCode":"OK"
  42. }

Response description

Name Type Description
appCode String appId+workspaceId
bizType String The value for offline package is nebula.
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 appId + workspaceId + h5id.
productVersion String ID of the offline package.
publishMode Integer Release mode:
  • 0: Default
  • 1: Whitelist
  • 2: Time window
publishType Integer Release type:
  • 2: Gray release
  • 3: Official release
releaseVersion String Internal release version.
resIds String ID of the corresponding offline package.
status Integer Status:
  • 0: Invalid
  • 1: Valid
syncResult String Currently not in use
taskName String Task name, same as the HTML5 app name.
taskStatus Integer Task status:
  • 0: To be released
  • 1: Release in progress
  • 2: Finished
  • 3: Paused
taskType Integer Task type:
  • 0: Ordinary task.
  • 1: Rollback task.
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. and means all the rules in subRules must be met at the same time.
defaultResult boolean The default returned result.
subRules List Rule list.
operator String Rule name:
  • contains: Include
  • excludes: Exclude
  • vLimitIn: Within range
  • vLimitOut: Out of range
left List<String>/Object
  • When operator value is contains or excludes, the value is a list of elements, and each element represents a rule value.
  • When operator value is vLimitIn or vLimitOut, it is an object, and lower represents the smaller value, and upper represents the greater value.
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

  1. {
  2. "getMcubeNebulaTaskDetailResult":{
  3. "nebulaTaskDetail":{
  4. "appCode":"ONEX97C5D29290957-default",
  5. "appId":"",
  6. "atomic":0,
  7. "baseInfoId":0,
  8. "bizType":"nebula",
  9. "creator":"",
  10. "cronexpress":0,
  11. "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",
  12. "extraData":"{"resourceType":"1"}",
  13. "fileSize":"0",
  14. "fullRepair":0,
  15. "gmtCreate":"2021-02-01 14:16:58",
  16. "gmtModified":"2021-02-01 14:16:58",
  17. "gmtModifiedStr":"2021-02-01 14:16:58",
  18. "greyConfigInfo":"",
  19. "greyEndtimeData":"",
  20. "greyNum":0,
  21. "greyUrl":"",
  22. "id":6664,
  23. "issueDesc":"",
  24. "memo":"test",
  25. "modifier":"",
  26. "ossPath":"",
  27. "packageId":4154,
  28. "percent":0,
  29. "platform":"all",
  30. "productId":"ONEX97C5D29290957-default-12345678",
  31. "productVersion":"1.0.0.1",
  32. "publishMode":4,
  33. "publishPeriod":3,
  34. "publishType":3,
  35. "quickRollback":0,
  36. "releaseVersion":"20210201141121",
  37. "ruleJsonList":[
  38. ],
  39. "sourceId":"",
  40. "sourceName":"",
  41. "sourceType":"",
  42. "status":1,
  43. "syncResult":"",
  44. "syncType":0,
  45. "taskName":"12345678",
  46. "taskStatus":1,
  47. "taskType":0,
  48. "taskVersion":1612160218556,
  49. "upgradeNoticeNum":0,
  50. "upgradeProgress":"",
  51. "whitelistIds":"",
  52. "workspaceId":""
  53. },
  54. "resultMsg":"",
  55. "success":true
  56. },
  57. "requestId":"072AE251-B9F8-4A44-A621-9F0325EECC1E",
  58. "resultCode":"OK"
  59. }

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 nebula for offline package.
bundles List Currently not in use.
creator String Currently not in use.
cronexpress Integer 0: Execute once.
1: Execute multiple times.
The value is 0 for iOS.
downloadUrl String Offline package download address. The address before ; is intranet address, and the address after ; is internet address.
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 Stirng 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 Sting 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:
  • 0: To be released
  • 1: Release in progress
  • 2: Finished
  • 3: Paused
taskType Integer Task type:
  • 0: Ordinary task.
  • 1: Rollback task.
taskVersion Long Task version, uses the time of task creation.
upgradeNoticeNum Integer Currently not in use
upgradeProgress String Currently not in use
vmType Stirng 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 nebula for offline package.
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

  1. {
  2. "changeMcubeNebulaTaskStatusResult":{
  3. "resultMsg":"",
  4. "success":true
  5. },
  6. "requestId":"595F4CB4-ACFE-4A5B-AF5B-4ED837CAEF95",
  7. "resultCode":"OK"
  8. }