All Products
Search
Document Center

Interface description

Last Updated: Apr 06, 2021

Obtain upload file token

Request – GetMcubeFileTokenRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
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
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
getFileTokenResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Query virtual domain

Request - QueryMcubeVhostRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.

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
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
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.
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Create virtual domain

Request - CreateMcubeVhostRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
vhost Boolean 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

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
createVhostResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Query if key file exists

Request - ExistMcubeRsaKeyRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.

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
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
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.
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Upload key file

Request - UploadMcubeRsaKeyRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
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
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
uploadRsaResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Obtain Mini Program list

Request - ListMcubeMiniAppsRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.

Response - ListMcubeMiniAppsResponse

  1. {
  2. "listMiniResult":{
  3. "miniProgramList":[
  4. {
  5. "appCode":"ONEXE9B092D052019-test",
  6. "gmtCreate":"2019-12-05T21:30:23+08:00",
  7. "gmtModified":"2019-12-05T21:30:23+08:00",
  8. "h5Id":"1111111111111111",
  9. "h5Name":"111111111111111111"
  10. },
  11. {
  12. "appCode":"ONEXE9B092D052019-test",
  13. "gmtCreate":"2020-03-13T20:04:53+08:00",
  14. "gmtModified":"2020-03-13T20:04:53+08:00",
  15. "h5Id":"2222222222222222",
  16. "h5Name":"test1"
  17. }
  18. ],
  19. "resultMsg":"",
  20. "success":true
  21. },
  22. "requestId":"BE9BF836-72E5-4ACE-A48D-389BA27F8D95",
  23. "resultCode":"OK"
  24. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
listMiniResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
appCode String appId+”-“+workspaceId
gmtCreate Date Time of creation.
gmtModified Date Time of update.
h5Id String ID of Mini Program App.
h5Name String Name of Mini Program App.
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Create Mini Program

Request - CreateMcubeMiniAppRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
h5Id String ID of HTML5 App. 16 digits.
h5Name String Name of HTML5 App.

Response - CreateMcubeMiniAppResponse

  1. {
  2. "createMiniResult":{
  3. "data":"processed successfully",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"8A593C1D-9688-4409-BB01-8DB8AD897DD4",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
createMiniResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Delete Mini Program

Request - DeleteMcubeMiniAppRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
h5Id String ID of Mini Program App.

Response - DeleteMcubeMiniAppResponse

  1. {
  2. "deleteMiniResult":{
  3. "data":"processed successfully",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"3DA95CA4-2579-4A2E-9A44-0A4215AEE431",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
deleteMiniResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Upload Mini Program resource package

Request - UploadMcubeMiniPackageRequest

Name Type Required Description
appId String - App ID.
workspaceId String - Workspace ID.
tenantId String - Tenant ID.
h5Id String Yes ID of HTML5 App.
h5Name String Yes Name of HTML5 App.
h5Version String Yes Version of Mini Program package. Must be unique in a Mini Program App.
mainUrl String Yes Main URL of Mini Program.
vhost String Yes Virtual domain name of the Mini Program App. The format is Mini Program ID + the virtual domain name previously set.
extendInfo String No Extended field in json format.
autoInstall Long Yes Download time:
  • 0-Wi-Fi only (Without Wi-Fi connection, download starts only when users use the App)
  • 1-All networks (uses cellular data. Do not choose this mode unless in special situations)
resourceType Long Yes Resource type. The fixed value is 4.
installType Long Yes Install time:
  • 0-Not preload (install only when the user enters the Mini Program page)
  • 1-Preload (automatically install after downloading the Mini Program)
platform String Yes Platform. Includes all, Android and iOS.
clientVersionMin String Yes 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 No 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.
resourceFileUrl String Yes Address of Mini Program resource package.
iconFileUrl String Yes OSS address of the Mini Program icon.
enableTabBar Long Yes Display bottom navigation bar:
  • 0-No
  • 1-Yes
enableOptionMenu String Yes Display function menu in the upper right corner:
  • 0-No
  • 1-Yes
enableKeepAlive String Yes Whether to keep alive in the background.
packageType Long No Mini Program package type:
  • 1-Function package
  • 2-Plugin package
  • 3-Real device test package
  • 4-Real device preview package
If left empty, the value uses 1 as the default value. Currently, the packages are categorized into two categories, official package and test package. 1 and 2 are official packages, and 3 and 4 are test packages.
userId String No If packageType is not 1 or 2, ID of the uploading user is required for uploading and releasing resource package.
uuid String No When packageType is 3 (real device test package), the release and remote debugging of real-device test package can be realized by specifying the value of uuid.

Response - UploadMcubeMiniPackageResponse

packageType ≠ 3 or 4

When packageType is not 3 or 4, the response to a resource package uploading request is as follows:

  1. {
  2. "requestId":"768E2C47-130B-4947-A0BD-2DE81C9090BE",
  3. "resultCode":"OK",
  4. "uploadMiniPackageResult":{
  5. "resultMsg":"",
  6. "returnPackageResult":{
  7. "packageId":"3209"
  8. },
  9. "success":true
  10. }
  11. }
Response description
Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
uploadMiniPackageResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
packageId String Primary key ID of created resource package.

packageType = 3 or 4

When packageType is not 3 or 4, a release task is created automatically, and the response to a resource package uploading request is as follows:

  1. {
  2. "requestId":"768E2C47-130B-4947-A0BD-2DE81C9090BE",
  3. "resultCode":"OK",
  4. "uploadMiniPackageResult":{
  5. "resultMsg":"",
  6. "returnPackageResult":{
  7. "packageId":"3209",
  8. "debugUrl": "mpaas://platformapi/startapp?appId=20001101&token=ide_qr&scheme=mpaas%3A%2F%2Fplatformapi%2Fstartapp%3FappId%3D9970212150000000&nbsv%3D1.0.1.7&nbsource%3Ddebug&nbprefer%3DYES&nbsn%3DDEBUG&nbof",
  9. "userId":"user_id"
  10. },
  11. "success":true
  12. }
  13. }
Response description
Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
uploadMiniPackageResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
debugUrl String Schema for code scanning.
userId String ID of the uploading user.

Obtain Mini Program resource package list

Request - ListMcubeMiniPackagesRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
h5Id String ID of Mini Program App.
packageTypes String Package type, separate with comma (,).

Response - ListMcubeMiniPackagesResponse

  1. {
  2. "listMiniPackageResult":{
  3. "miniPackageList":[
  4. {
  5. "appCode":"ONEXE9B092D052019-test",
  6. "autoInstall":0,
  7. "clientVersionMax":"",
  8. "clientVersionMin":"1.1;1.1",
  9. "downloadUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.1_all/nebula/1111111111111111_1.1.1.1.amr",
  10. "extendInfo":"",
  11. "extraData":"{"enableKeepAlive":"1","enableOptionMenu":"1","enableTabBar":"0","iconUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.1_all/icon/1111111111111111_1.1.1.1_2.jpg","resourceType":"4"}",
  12. "fallbackBaseUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.1_all/nebula/fallback/;https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.1_all/nebula/fallback/",
  13. "gmtCreate":"2019-12-05T21:31:03+08:00",
  14. "gmtModified":"2019-12-17T14:35:50+08:00",
  15. "h5Id":"1111111111111111",
  16. "h5Name":"111111111111111111",
  17. "h5Version":"1.1.1.1",
  18. "id":3127,
  19. "installType":0,
  20. "mainUrl":"",
  21. "memo":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.1_all/nebula/nebula_json/h5_json.json",
  22. "packageType":1,
  23. "platform":"all",
  24. "publishPeriod":5,
  25. "resourceType":4,
  26. "status":1
  27. }
  28. ],
  29. "resultMsg":"",
  30. "success":true
  31. },
  32. "requestId":"96151643-8F75-49B9-A5AA-6F57C6B647BD",
  33. "resultCode":"OK"
  34. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
listMiniPackageResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
appCode String appId+“-”+workspaceId
autoInstall Integer Download time:
  • 0-Wi-Fi only (Without Wi-Fi connection, download starts only when users use the App)
  • 1-All networks (uses cellular data. Do not choose this mode unless in special situations)
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.
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.
creator String Creator, currently not used.
debugUrl String Has no meaning in current response.
downloadUrl String Download address of Mini Program arm file.
extendInfo String Extended information sent when uploading.
extraData String Extended parameters, include the configurations and icon address set when uploading.
fallbackBaseUrl String Mini Program fallback address. Separate with 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 Mini Program App.
h5Name String Name of Mini Program App.
h5Version String Version of current Mini Program package.
id Long Primary key.
installType Integer Install time:
  • 0-Not preload (install only when the user enters the Mini Program page)
  • 1-Preload (automatically install after downloading the Mini Program)
lazyLoad Integer Lazy loading. Currently the value is 0.
mainUrl String Main URL of Mini Program package.
md5 String md 5 of Mini Program package file.
memo String Download address of Mini Program package h5.json file.
metaId Long Has no meaning.
modifier String Modifier. Currently not used.
platform String Platform. Includes all, Android and iOS.
publishPeriod Integer Release status:
  • 1-Internal gray release
  • 2-External gray release
  • 3-Official release
  • 4-Rollback release
  • 5-Release task ends
releaseVersion String Release version.
resourceType Integer Resource type. The fixed value is 4.
status Integer Status.
packageType Integer Mini Program package type:
  • 1-Function package
  • 2-Plugin package
  • 3-Real device test package
  • 4-Real device preview package
If left empty, the value uses 1 as the default value. Currently, the packages are categorized into two categories, official package and test package. 1 and 2 are official packages, and 3 and 4 are test packages.

Obtain Mini Program resource package info by ID

Request - QueryMcubeMiniPackageRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
id String Primary key ID of the resource package.

Response - QueryMcubeMiniPackageResponse

  1. {
  2. "queryMiniPackageResult":{
  3. "miniPackageInfo":{
  4. "appCode":"ONEXE9B092D052019-test",
  5. "autoInstall":0,
  6. "clientVersionMax":"10;10",
  7. "clientVersionMin":"1;1",
  8. "downloadUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.2_all/nebula/1111111111111111_1.1.1.2.amr",
  9. "extendInfo":"{"key":"value"}",
  10. "extraData":"{"enableKeepAlive":"1","enableOptionMenu":"1","enableTabBar":"1","iconUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.2_all/icon/1111111111111111_1.1.1.2_2.jpg","resourceType":"4"}",
  11. "fallbackBaseUrl":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.2_all/nebula/fallback/;https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.2_all/nebula/fallback/",
  12. "gmtCreate":"2020-03-16T10:55:00+08:00",
  13. "gmtModified":"2020-03-16T11:22:10+08:00",
  14. "h5Id":"1111111111111111",
  15. "h5Name":"111111111111111111",
  16. "h5Version":"1.1.1.2",
  17. "id":3209,
  18. "installType":1,
  19. "mainUrl":"index",
  20. "memo":"https://mcube-test.oss-cn-hangzhou.aliyuncs.com/ONEXE9B092D052019-test/1111111111111111/1.1.1.2_all/nebula/nebula_json/h5_json.json",
  21. "packageType":1,
  22. "platform":"all",
  23. "publishPeriod":3,
  24. "resourceType":4,
  25. "status":1
  26. },
  27. "resultMsg":"",
  28. "success":true
  29. },
  30. "requestId":"1DAFB8E6-F812-48CF-B7F7-1F5FEF57908F",
  31. "resultCode":"OK"
  32. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
queryMiniPackageResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
appCode String appId+“-”+workspaceId
autoInstall Integer Download time:
  • 0-Wi-Fi only (Without Wi-Fi connection, download starts only when users use the App)
  • 1-All networks (uses cellular data. Do not choose this mode unless in special situations)
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.
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.
creator String Creator, currently not used.
debugUrl String Has no meaning in current response.
downloadUrl String Download address of Mini Program arm file.
extendInfo String Extended information sent when uploading.
extraData String Extended parameters, include the configurations and icon address set when uploading.
fallbackBaseUrl String Mini Program fallback address. Separate with 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 Mini Program App.
h5Name String Name of Mini Program App.
h5Version String Version of current Mini Program package.
id Long Primary key.
installType Integer Install time:
  • 0-Not preload (install only when the user enters the Mini Program page)
  • 1-Preload (automatically install after downloading the Mini Program)
lazyLoad Integer Lazy loading. Currently the value is 0.
mainUrl String Main URL of Mini Program package.
md5 String md 5 of Mini Program package file.
memo String Download address of Mini Program package h5.json file.
metaId Long Has no meaning.
modifier String Modifier. Currently not used.
platform String Platform. Includes all, Android and iOS.
publishPeriod Integer Release status:
  • 1-Internal gray release
  • 2-External gray release
  • 3-Official release
  • 4-Rollback release
  • 5-Release task ends
releaseVersion String Release version.
resourceType Integer Resource type. The fixed value is 4.
status Integer Status.
packageType Integer Mini Program package type:
  • 1-Function package
  • 2-Plugin package
  • 3-Real device test package
  • 4-Real device preview package
If left empty, the value uses 1 as the default value. Currently, the packages are categorized into two categories, official package and test package. 1 and 2 are official packages, and 3 and 4 are test packages.

Create Mini Program release task

Request - CreateMcubeMiniTaskRequest

Name Type Required Description
appId String - App ID.
workspaceId String - App ID.
tenantId String - Tenant ID.
publishType Integer Yes Release type:
  • 2-Gray release
  • 3-Official release
publishMode Integer Yes Release mode:
  • 1-Whitelist
  • 2-Time window
If publishType is 3, this field should be 0.
memo String No Release note.
id Long Yes Only 0 is allowed. The ID indicates creation, and cannot be modified.
greyEndtimeData String No. Required when publishMode is 2. End time of time window grey release. Format: YYYY-MM-dd HH:mm:ss. The time must be greater than current time and less than 7 days from current time.
greyNum Integer No. Required when publishMode is 2. Number of users in time window grey release.
whitelistIds String No. Required when publishMode is 1. Primary key ID of whitelist. Separate 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.

Advanced rule

Example:

  1. {"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"}

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 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-Include
  • 2-Exclude
If ruleElement is osVersion, the value of operation can be one of the four value.

Response - CreateMcubeMiniTaskResponse

  1. {
  2. "createMiniTaskResult":{
  3. "miniTaskId":"5244",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"53103033-5018-4090-9FAC-1E1B556DA14F",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
createMiniTaskResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
miniTaskId String ID of created task.

Obtain Mini Program release task list

Request - ListMcubeMiniTasksRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
id String ID of mini program package corresponding to the release task.

Response - ListMcubeMiniTasksResponse

  1. {
  2. "listMiniTaskResult":{
  3. "miniTaskList":[
  4. {
  5. "appCode":"10EE034211053-default",
  6. "bizType":"nebula",
  7. "bundles":[ ],
  8. "creator":"",
  9. "gmtCreate":"2019-04-24 17:43:54",
  10. "gmtModified":"2019-04-24 17:43:54",
  11. "gmtModifiedStr":"2019-04-24 17:43:54",
  12. "greyConfigInfo":"{"operator":"and","subRules":[{"operator":"contains","left":["Shanghai","Beijing","Tianjin"],"right":"city","defaultResult":false},{"operator":"excludes","left":["REDMI NOTE 3","VIVO X5M"],"right":"mobileModel","defaultResult":false},{"operator":"vLimitIn","exclusive":false,"left":{"lower":"9.2.1","upper":"9.2.1"},"right":"osVersion","defaultResult":false}],"defaultResult":false}",
  13. "greyEndtime":null,
  14. "greyEndtimeData":"",
  15. "greyNum":0,
  16. "id":212,
  17. "memo":"h5 package release",
  18. "modifier":"",
  19. "packageId":572,
  20. "percent":0,
  21. "platform":"iOS",
  22. "productId":"10EE034211053-default-1234567812345678",
  23. "productVersion":"1.1.1.4",
  24. "publishMode":1,
  25. "publishType":2,
  26. "releaseVersion":"20190424103618",
  27. "resIds":"572",
  28. "status":1,
  29. "syncResult":"",
  30. "taskName":"1234",
  31. "taskStatus":1,
  32. "taskType":0,
  33. "taskVersion":1556099034158,
  34. "upgradeNoticeNum":0,
  35. "upgradeProgress":"",
  36. "whitelistIds":"931"
  37. }
  38. ],
  39. "resultMsg":"",
  40. "success":true
  41. },
  42. "requestId":"4A0C156E-0B8F-4007-9B3C-4EE267723361",
  43. "resultCode":"OK"
  44. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
listMiniTaskResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
appCode String appId+”-“+workspaceId
bizType String For Mini Program package, the value is nebula.
bundles Array Currently not used.
creator String Currently not used.
gmtCreate Date Time of creation.
gmtModified Date Time of update.
gmtModifiedStr String Update time string.
greyConfigInfo String Advanced rule string, different from that when uploading. 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 Release note.
packageId Long ID of mini program package corresponding to current task.
percent Integer Grey percent. Currently the value is 0.
platform String Platform of current task. Includes all, Android and iOS.
productId String Product ID. The format is appId + workspaceId + h5id .
productVersion String ID of mini program resource 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 corresponding Mini Program resource package.
status Integer Status:
  • 0-Invalid
  • 1-Valid
syncResult String Currently not used.
taskName String Task name, same as the Mini Program 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 used.
upgradeProgress String Currently not used.
whitelistIds String Primary key ID of whitelist. Separate with comma (,).

greyConfigInfo explanation

Name Type Description
operator String Rule relationship. 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.

Query release task by ID

Request - QueryMcubeMiniTaskRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
id String Primary key ID of the release task.

Response - QueryMcubeMiniTaskResponse

  1. {
  2. "queryMiniTaskResult":{
  3. "miniTaskInfo":{
  4. "appCode":"ONEXE9B092D052019-test",
  5. "gmtCreate":"2020-03-16T11:22:10+08:00",
  6. "gmtModified":"2020-03-16T11:22:10+08:00",
  7. "greyConfigInfo":"",
  8. "greyEndtimeData":"",
  9. "greyNum":0,
  10. "id":5244,
  11. "memo":"memo",
  12. "packageId":3209,
  13. "platform":"all",
  14. "productVersion":"1.1.1.2",
  15. "publishMode":0,
  16. "publishType":3,
  17. "status":"1",
  18. "taskStatus":1,
  19. "whitelistIds":""
  20. },
  21. "resultMsg":"",
  22. "success":true
  23. },
  24. "requestId":"C02CC6F5-9CDB-42C0-8967-9F728A48C7F6",
  25. "resultCode":"OK"
  26. }

Response description

The response is same as that of obtain Mini Program release task list.

Change task status

Request - ChangeMcubeMiniTaskStatusRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
bizType String The value is nebula.
packageId Long ID of corresponding Mini Program resource package.
taskId Long Current release task ID.
taskStatus Long Status to change into:
  • 0-To be released.
  • 1-Release in progress.
  • 2-Finished.
  • 3-Paused.

Response - ChangeMcubeMiniTaskStatusResponse

  1. {
  2. "changeMiniTaskStatusResult":{
  3. "data":"processed successfully",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"8F2A9BC1-3FDF-4578-A164-B305D6FB59B0",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
changeMiniTaskStatusResult Object The objects returned. See the table below for meanings.

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 whitelist

Request - CreateMcubeWhitelistRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
whiteListName String Whitelist name. 2 to 10 characters.
whitelistType String Whitelist type:
  • normal-Ordinary whitelist
  • regular-Regular expression whitelist

Response - CreateMcubeWhitelistResponse

  1. {
  2. "createWhitelistResult":{
  3. "resultMsg":"",
  4. "success":true,
  5. "whitelistId":"2733"
  6. },
  7. "requestId":"72224B8A-351D-4FFD-8F0E-C1D21F0C22C8",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
createWhitelistResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
whitelistId String ID of created whitelist.

Obtain whitelists

Request - ListMcubeWhitelistRequest

Parameter Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.

Response - ListMcubeWhitelistResponse

  1. {
  2. "listWhitelistResult":{
  3. "resultMsg":"",
  4. "success":true,
  5. "whitelists":[
  6. {
  7. "appCode":"ONEXE9B092D052019-test",
  8. "gmtCreate":"2020-03-16T12:38:14+08:00",
  9. "gmtModified":"2020-03-16T12:38:14+08:00",
  10. "id":2733,
  11. "whiteListCount":0,
  12. "whiteListName":"testWhite",
  13. "whitelistType":"normal"
  14. },
  15. {
  16. "appCode":"ONEXE9B092D052019-test",
  17. "gmtCreate":"2019-12-05T21:46:15+08:00",
  18. "gmtModified":"2019-12-05T21:46:15+08:00",
  19. "id":2701,
  20. "whiteListCount":0,
  21. "whiteListName":"23",
  22. "whitelistType":"normal"
  23. }
  24. ]
  25. },
  26. "requestId":"C33D3132-5E33-4744-B146-9BDF36D99A5E",
  27. "resultCode":"OK"
  28. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
listWhitelistResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
appCode String appId+”-“+workspaceId
gmtCreate Date Time of creation.
gmtModified Date Time of update.
id Long Primary key ID of whitelist.
whiteListCount Integer User ID count in a whitelist.
whiteListName String Whitelist name.
whitelistType String Whitelist type:
  • normal-Ordinary whitelist
  • regular-Regular expression whitelist

Add whitelist content

Request - UpdateMcubeWhitelistRequest

Name Type Required Description
appId String - App ID.
workspaceId String - Workspace ID.
tenantId String - Tenant ID.
keyIds String No. Only one of keyIds and keyIdsFile is required. Whitelist user. Separate multiple user IDs with comma (,).
ossUrl String No. Only one of keyIds and keyIdsFile is required. Whitelist file address. One user ID is allowed in one line in the file, and the file size should be less than 5 MB.
onexFlag Boolean Yes The fixed value is true.
id String Yes Whitelist ID.

Response - UpdateMcubeWhitelistResponse

  1. {
  2. "addWhitelistResult":{
  3. "addWhitelistInfo":{
  4. "failNum":0,
  5. "failUserIds":"",
  6. "successNum":2
  7. },
  8. "resultMsg":"",
  9. "success":true
  10. },
  11. "requestId":"A0462D16-824B-40E1-A000-66E0D2376B5B",
  12. "resultCode":"OK"
  13. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
addWhitelistResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
failNum Integer The number of whitelists failed to add.
failUserIds String The content of whitelists failed to add.
successNum Integer The number of whitelists successfully uploaded.

Delete whitelist

Request - DeleteMcubeWhitelistRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
id Integer Primary key ID of whitelist.

Response - DeleteMcubeWhitelistResponse

  1. {
  2. "deleteWhitelistResult":{
  3. "data":"1",
  4. "resultMsg":"",
  5. "success":true
  6. },
  7. "requestId":"26B80D2D-D62C-428D-8124-D0DC4968350B",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
deleteWhitelistResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
data String The number of whitelists deleted.
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.

Whitelist creation used for Mini Program preview and debug in IDE

Request - CreateMcubeWhitelistForIdeRequest

Name Type Description
appId String App ID.
workspaceId String Workspace ID.
tenantId String Tenant ID.
userId Integer ID of user that needs to be used.
whitelistValue String Whitelist content.

Response - CreateMcubeWhitelistForIdeResponse

  1. {
  2. "createWhitelistForIdeResult":{
  3. "resultMsg":"",
  4. "success":true,
  5. "whitelistId":"2734"
  6. },
  7. "requestId":"E59980F5-3AF1-4972-8830-F0A4848C4CA4",
  8. "resultCode":"OK"
  9. }

Response description

Response name Type Description
requestId String Request ID.
resultCode String Normally, the code returned is OK. Other values indicate that the API request is abnormal.
createWhitelistForIdeResult Object The objects returned. See the table below for meanings.

The objects returned include the following fields:

Name Type Description
resultMsg String Returned value after query failure.
success Boolean Whether the query is successful.
whitelistId String ID of created whitelist.