升级模块请求

升级模块请求

Redis 企业软件
方法 路径 描述
发布 /v1/modules/upgrade/bdb/{uid} 升级模块

升级模块

POST /v1/modules/upgrade/bdb/{string: uid}

升级特定数据库的模块版本。自 Redis Enterprise Software v7.8.2 起已弃用。用POST /v1/bdbs/<uid>/upgrade相反。

所需权限

权限名称
edit_bdb_module

请求

HTTP 请求示例

POST /v1/modules/upgrade/bdb/1

示例 JSON 正文

{
     "modules": [
         {"module_name": "ReJson",
         "current_semantic_version": "2.2.1",
         "new_module": "aa3648d79bd4082d414587c42ea0b234"}
     ],
     "// Optional fields to fine-tune restart and failover behavior:",
     "preserve_roles": true,
     "may_discard_data": false
}

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

Request body

Field Type Description
modules list List of dicts representing the modules that will be upgraded. Each dict must include:

current_module: UID of a module to upgrade

new_module: UID of the module we want to upgrade to

new_module_args: args list for the new module
preserve_roles boolean Preserve shards’ master/replica roles (optional)
may_discard_data boolean Discard data in a non-replicated non-persistent database (optional)

Response

Returns the upgraded module object.

Example JSON body

{
    "uid": 1,
    "name": "name of database #1",
    "module_id": "aa3648d79bd4082d414587c42ea0b234",
    "module_name": "ReJson",
    "semantic_version": "2.2.2"
    "// additional fields..."
}

Error codes

When errors are reported, the server may return a JSON object with error_code and message field that provide additional information. The following are possible error_code values:

Code Description
missing_module Module is not present in cluster.
module_downgrade_unsupported Module downgrade is not allowed.
redis_incompatible_version Module min_redis_version is bigger than the current Redis version.
redis_pack_incompatible_version Module min_redis_pack_version is bigger than the current Redis Enterprise version.
unsupported_module_capabilities New version of module does support all the capabilities needed for the database configuration

Status codes

Code Description
200 OK Success, module updated on bdb.
404 Not Found bdb or node not found.
400 Bad Request Bad or missing configuration parameters.
406 Not Acceptable The requested configuration is invalid.
RATE THIS PAGE
Back to top ↑