Skip to content

Commit 4712f0e

Browse files
committed
DOC-5680 Removed previously deprecated module requests from RS 8 REST API reference
1 parent e1e9789 commit 4712f0e

File tree

3 files changed

+1
-411
lines changed

3 files changed

+1
-411
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description: Database upgrade requests
99
headerRange: '[1-2]'
1010
linkTitle: upgrade
1111
weight: $weight
12+
aliases: /operate/rs/references/rest-api/requests/modules/upgrade/
1213
---
1314

1415
| Method | Path | Description |

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

Lines changed: 0 additions & 308 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ weight: $weight
1616
|--------|------|-------------|
1717
| [GET](#list-modules) | `/v1/modules` | List available modules |
1818
| [GET](#get-module) | `/v1/modules/{uid}` | Get a specific module |
19-
| [POST](#post-module) | `/v1/modules` | Upload a new module (deprecated) |
20-
| [POST](#post-module-v2) | `/v2/modules` | Upload a new module |
21-
| [DELETE](#delete-module) | `/v1/modules/{uid}` | Delete a module (deprecated) |
22-
| [DELETE](#delete-module-v2) | `/v2/modules/{uid}` | Delete a module |
2319

2420
## List modules {#list-modules}
2521

@@ -105,307 +101,3 @@ Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/mo
105101
|------|-------------|
106102
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |
107103
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Module does not exist. |
108-
109-
## Upload module v1 {#post-module}
110-
111-
```sh
112-
POST /v1/modules
113-
```
114-
115-
{{<note>}}
116-
`POST /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`POST /v2/modules`](#post-module-v2) instead.
117-
{{</note>}}
118-
119-
Uploads a new module to the cluster.
120-
121-
The request must contain a Redis module, bundled using [RedisModule
122-
Packer](https://github.com/RedisLabs/RAMP). For modules in Redis Stack, download the module from the [download center](https://redis.io/downloads/).
123-
124-
See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information.
125-
126-
#### Permissions
127-
128-
| Permission name | Roles |
129-
|-----------------|-------|
130-
| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin |
131-
132-
### Request {#post-request}
133-
134-
#### Example HTTP request
135-
136-
```sh
137-
POST /v1/modules
138-
```
139-
140-
#### Headers
141-
142-
| Key | Value | Description |
143-
|-----|-------|-------------|
144-
| Host | string | Domain name |
145-
| Accept | \*/\* | Accepted media type |
146-
| Content-Length | integer | Length of the request body in octets |
147-
| Expect | 100-continue | Requires particular server behaviors |
148-
| Content-Type | multipart/form-data | Media type of request/response body |
149-
150-
### Response {#post-response}
151-
152-
Returns a status code. If an error occurs, the response body may include an error code and message with more details.
153-
154-
#### Error codes {#post-error-codes}
155-
156-
The server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values:
157-
158-
| Code | Description |
159-
|------|-------------|
160-
| no_module | Module wasn't provided or could not be found |
161-
| invalid_module | Module either corrupted or packaged files are wrong |
162-
| module_exists | Module already in system |
163-
| min_redis_pack_version | Module isn't supported yet in this Redis pack |
164-
| unsupported_module_capabilities | The module does not support required capabilities|
165-
| os_not_supported | This module is not supported for this operating system |
166-
| dependencies_not_supported | This endpoint does not support dependencies, see v2 |
167-
168-
#### Status codes {#post-status-codes}
169-
170-
| Code | Description |
171-
|------|-------------|
172-
| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Either missing module file or an invalid module file. |
173-
174-
### Examples
175-
176-
#### cURL
177-
178-
```sh
179-
$ curl -k -u "[username]:[password]" -X POST
180-
-F "module=@/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip"
181-
https://[host][:port]/v1/modules
182-
```
183-
184-
#### Python
185-
186-
```python
187-
import requests
188-
189-
url = "https://[host][:port]/v1/modules"
190-
191-
files=[
192-
('module',
193-
('rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip',
194-
open('/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip','rb'),
195-
'application/zip')
196-
)
197-
]
198-
auth=("[username]", "[password]")
199-
200-
response = requests.request("POST", url,
201-
auth=auth, files=files, verify=False)
202-
203-
print(response.text)
204-
```
205-
206-
## Upload module v2 {#post-module-v2}
207-
208-
```sh
209-
POST /v2/modules
210-
```
211-
212-
Asynchronously uploads a new module to the cluster.
213-
214-
The request must contain a Redis module bundled using [RedisModule Packer](https://github.com/RedisLabs/RAMP).
215-
216-
For modules in Redis Stack, download the module from the [download center](https://redis.io/downloads/). See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information.
217-
218-
#### Permissions
219-
220-
| Permission name | Roles |
221-
|-----------------|-------|
222-
| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin |
223-
224-
### Request {#post-request-v2}
225-
226-
#### Example HTTP request
227-
228-
```sh
229-
POST /v2/modules
230-
```
231-
232-
#### Headers
233-
234-
| Key | Value | Description |
235-
|-----|-------|-------------|
236-
| Host | string| Domain name |
237-
| Accept | \*/\* | Accepted media type |
238-
| Content-Length | integer | Length of the request body in octets |
239-
| Expect | 100-continue | Requires particular server behaviors |
240-
| Content-Type | multipart/form-data; | Media type of request/response body |
241-
242-
### Response {#post-response-v2}
243-
244-
Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}) with an additional `action_uid` field.
245-
246-
You can use the `action_uid` to track the progress of the module upload.
247-
248-
#### Example JSON body
249-
250-
```json
251-
{
252-
"action_uid":"dfc0152c-8449-4b1c-9184-480ea7cb526c",
253-
"author":"RedisLabs",
254-
"capabilities":[
255-
"types",
256-
"crdb",
257-
"failover_migrate",
258-
"persistence_aof",
259-
"persistence_rdb",
260-
"clustering",
261-
"backup_restore"
262-
],
263-
"command_line_args":"Plugin gears_python CreateVenv 1",
264-
"config_command":"RG.CONFIGSET",
265-
"dependencies":{
266-
"gears_jvm":{
267-
"sha256":"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
268-
"url":"http://example.com/redisgears_plugins/jvm_plugin/gears-jvm.linux-centos7-x64.0.1.0.tgz"
269-
},
270-
"gears_python":{
271-
"sha256":"22dca9cd75484cb15b8130db37f5284e22e3759002154361f72f6d2db46ee682",
272-
"url":"http://example.com/redisgears-python.linux-centos7-x64.1.2.1.tgz"
273-
}
274-
},
275-
"description":"Dynamic execution framework for your Redis data",
276-
"display_name":"RedisGears",
277-
"email":"[email protected]",
278-
"homepage":"http://redisgears.io",
279-
"is_bundled":false,
280-
"license":"Redis Source Available License Agreement",
281-
"min_redis_pack_version":"6.0.0",
282-
"min_redis_version":"6.0.0",
283-
"module_name":"rg",
284-
"semantic_version":"1.2.1",
285-
"sha256":"2935ea53611803c8acf0015253c5ae1cd81391bbacb23e14598841e1edd8d28b",
286-
"uid":"98f255d5d33704c8e4e97897fd92e32d",
287-
"version":10201
288-
}
289-
```
290-
291-
### Error codes {#post-error-codes-v2}
292-
293-
The server may return a JSON object with `error_code` and `message` fields that provide additional information.
294-
295-
Possible `error_code` values include [`/v1/modules` error codes](#post-error-codes) and the following:
296-
297-
| Code | Description |
298-
|------|-------------|
299-
| invalid_dependency_data | Provided dependencies have an unexpected format |
300-
301-
### Status codes {#post-status-codes-v2}
302-
303-
| Code | Description |
304-
|------|-------------|
305-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module upload. |
306-
| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Module name or version does not exist. |
307-
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Dependency not found. |
308-
| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get dependency. |
309-
310-
## Delete module v1 {#delete-module}
311-
312-
```sh
313-
DELETE /v1/modules/{string: uid}
314-
```
315-
316-
{{<note>}}
317-
`DELETE /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`DELETE /v2/modules`](#delete-module-v2) instead.
318-
{{</note>}}
319-
320-
Delete a module.
321-
322-
#### Permissions
323-
324-
| Permission name | Roles |
325-
|-----------------|-------|
326-
| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin |
327-
328-
### Request {#delete-request}
329-
330-
#### Example HTTP request
331-
332-
```sh
333-
DELETE /v1/modules/1
334-
```
335-
336-
#### Headers
337-
338-
| Key | Value | Description |
339-
|-----|-------|-------------|
340-
| Host | cnm.cluster.fqdn | Domain name |
341-
| Accept | application/json | Accepted media type |
342-
343-
#### URL parameters
344-
345-
| Field | Type | Description |
346-
|-------|------|-------------|
347-
| uid | integer | The module's unique ID. |
348-
349-
### Response {#delete-response}
350-
351-
Returns a status code to indicate module deletion success or failure.
352-
353-
#### Error codes {#delete-error-codes}
354-
355-
| Code | Description |
356-
|------|-------------|
357-
| dependencies_not_supported | You can use the following API endpoint to delete this module with its dependencies: [`/v2/modules/<uid>`](#delete-module-v2) |
358-
359-
#### Status codes {#delete-status-codes}
360-
361-
| Code | Description |
362-
|------|-------------|
363-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the module is deleted. |
364-
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. |
365-
| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. |
366-
367-
## Delete module v2 {#delete-module-v2}
368-
369-
```sh
370-
DELETE /v2/modules/{string: uid}
371-
```
372-
373-
Delete a module.
374-
375-
#### Permissions
376-
377-
| Permission name | Roles |
378-
|-----------------|-------|
379-
| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin |
380-
381-
### Request {#delete-request-v2}
382-
383-
#### Example HTTP request
384-
385-
```sh
386-
DELETE /v2/modules/1
387-
```
388-
389-
#### Headers
390-
391-
| Key | Value | Description |
392-
|-----|-------|-------------|
393-
| Host | cnm.cluster.fqdn | Domain name |
394-
| Accept | application/json | Accepted media type |
395-
396-
#### URL parameters
397-
398-
| Field | Type | Description |
399-
|-------|------|-------------|
400-
| uid | integer | The module's unique ID. |
401-
402-
### Response {#delete-response-v2}
403-
404-
Returns a JSON object with an `action_uid` that allows you to track the progress of module deletion.
405-
406-
#### Status codes {#delete-status-codes-v2}
407-
408-
| Code | Description |
409-
|------|-------------|
410-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module deletion. |
411-
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. |

0 commit comments

Comments
 (0)