# Mini Program version rollback

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

revertCodeRelease

# Functional description

Calling this interface can rollback the online version of the Mini Program. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.

# Note

  • If you don't have a previous online version, you won't be able to rollback
  • You can specify a version for rollback, but save up to 5 most recently released or rolled back versions
  • The current version fallback cannot be called again

# Calling mode

# HTTPS call


GET https://api.weixin.qq.com/wxa/revertcoderelease?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

  • The permission set id to which this interface belongs is: 18

  • After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant

# Request parameters

attribute type Required Introductions
access_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token
action string no Fill in the get._history_version。 Means to get a fallback version of the Mini Program. This parameter is URL Parameters, non Body Parameters.
app_version string no The default is to roll back to the previous versionCan also be rolled back to the specified version of the Mini Program, which can be accessed by getting_history_Version Get app_version。 This parameter is URL Parameters, non Body Parameters.

# Return parameters

attribute typeIntroductions
errcode number Error code
errmsg string Error message
version_list object List of template information. When action = get_history_Version will return.
attribute type Introductions
app_version number Mini Program version
user_version string Template version number, developer custom field
user_desc string Template Description, Developer Custom Fields
commit_time number Update time, timestamp

# Call Example

Example Dxplaination: Mini Program version rollback

# Sample Request Data


GET https://api.weixin.qq.com/wxa/revertcoderelease?app_version=123&access_token=ACCESS_TOKEN 

# Return Data Example


{
  "errcode": 0,
  "errmsg": "ok"
} 

Example Dxplaination: Get the reverseable Mini Program version

# Sample Request Data


GET https://api.weixin.qq.com/wxa/revertcoderelease?action=get_history_version&access_token=ACCESS_TOKEN 

# Return Data Example


{
  "errcode": 0,
  "errmsg": "ok",
  "version_list": [
    {
      "commit_time": 1488965944,
      "user_version": "VVV",
      "user_Desc": "AAS",
      "app_version": 111
    },
    {
      "commit_time": 1504790906,
      "user_version": "11",
      "user_Desc": "111111",
      "app_version": 222
    }
  ]
} 

# Error code

Error code Error code Solutions
-1 system error The system is busy, please wait for the developer to try again
40001 invalid credential  access_Token isinvalid or not latest Obtain access_Token time AppSecret Error, or access_Token Invalid. Please take the developer more seriously. AppSecret Of the correctness, or to see if you are working for the appropriate Official Account message template Call interface