Back to Redis

Upgrade

content/operate/rs/7.8/references/rest-api/requests/modules/upgrade.md

latest3.4 KB
Original Source
MethodPathDescription
POST/v1/modules/upgrade/bdb/{uid}Upgrade module

Upgrade module {#post-modules-upgrade-bdb}

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

Upgrades the module version on a specific database. Deprecated as of Redis Enterprise Software v7.8.2. Use [POST /v1/bdbs/<uid>/upgrade]({{<relref "/operate/rs/7.8/references/rest-api/requests/bdbs/upgrade#post-bdbs-upgrade">}}) instead.

Required permissions

Permission name
[edit_bdb_module]({{< relref "/operate/rs/7.8/references/rest-api/permissions#edit_bdb_module" >}})

Request {#post-request}

Example HTTP request

POST /v1/modules/upgrade/bdb/1

Example JSON body

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

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Request body

FieldTypeDescription
moduleslistList of dicts representing the modules that will be upgraded. Each dict must include:
</br>current_module: UID of a module to upgrade
</br>new_module: UID of the module we want to upgrade to
</br>new_module_args: args list for the new module
preserve_rolesbooleanPreserve shards’ master/replica roles (optional)
may_discard_databooleanDiscard data in a non-replicated non-persistent database (optional)

Response {#post-response}

Returns the upgraded [module object]({{< relref "/operate/rs/7.8/references/rest-api/objects/module" >}}).

Example JSON body

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

Error codes {#post-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:

CodeDescription
missing_moduleModule is not present in cluster.
module_downgrade_unsupportedModule downgrade is not allowed.
redis_incompatible_versionModule min_redis_version is bigger than the current Redis version.
redis_pack_incompatible_versionModule min_redis_pack_version is bigger than the current Redis Enterprise version.
unsupported_module_capabilitiesNew version of module does support all the capabilities needed for the database configuration

Status codes {#post-status-codes}

CodeDescription
200 OKSuccess, module updated on bdb.
404 Not Foundbdb or node not found.
400 Bad RequestBad or missing configuration parameters.
406 Not AcceptableThe requested configuration is invalid.