Skip to content

DEV: move RESP information from data to each page #1663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions content/commands/acl-cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,21 @@ Then we may want to know what commands are part of a given category:
30) "psync"
31) "sort"
```

## Return information

{{< multitabs id="acl-cat-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.

-tab-sep-

One of the following:
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/acl-deluser.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,17 @@ exist, in such case no operation is performed for the non existing users.
> ACL DELUSER antirez
1
```

## Return information

{{< multitabs id="acl-deluser-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist.

-tab-sep-

[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/acl-dryrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,21 @@ This command can be used to test the permissions of a given user without having
> ACL DRYRUN VIRGINIA GET foo
"User VIRGINIA has no permissions to run the 'get' command"
```

## Return information

{{< multitabs id="acl-dryrun-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Any of the following:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command.

-tab-sep-

Any of the following:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/acl-genpass.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ hex character.
> ACL GENPASS 5
"90"
```

## Return information

{{< multitabs id="acl-genpass-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4.

-tab-sep-

[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/acl-getuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,21 @@ Here's an example configuration for a user
9) "channels"
10) "&*"
```

## Return information

{{< multitabs id="acl-getuser-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Array reply](../../develop/reference/protocol-spec#arrays): a list of ACL rule definitions for the user.
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if user does not exist.

-tab-sep-

One of the following:
* [Map reply](../../develop/reference/protocol-spec#maps): a set of ACL rule definitions for the user
* [Null reply](../../develop/reference/protocol-spec#nulls): if user does not exist.

{{< /multitabs >}}
13 changes: 13 additions & 0 deletions content/commands/acl-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ title: ACL HELP
---
The `ACL HELP` command returns a helpful text describing the different subcommands.

## Return information

{{< multitabs id="acl-help-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions.

-tab-sep-

[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/acl-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,17 @@ configuration file if you wish (but make sure to check [`ACL SAVE`]({{< relref "
1) "user antirez on #9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 ~objects:* &* +@all -@admin -@dangerous"
2) "user default on nopass ~* &* +@all"
```

## Return information

{{< multitabs id="acl-list-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements.

-tab-sep-

[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/acl-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,21 @@ sure to have an *all or nothing* behavior, that is:
> ACL LOAD
-ERR /tmp/foo:1: Unknown command or category name in ACL...
```

## Return information

{{< multitabs id="acl-load-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.
Finally, the command will fail if the server is not configured to use an external ACL file.

-tab-sep-

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.
Finally, the command will fail if the server is not configured to use an external ACL file.

{{< /multitabs >}}
22 changes: 21 additions & 1 deletion content/commands/acl-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,24 @@ Each log entry is composed of the following fields:
7. `client-info`: Displays the client info of a client which caused one of the security events.
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were “lost”, if they fell between periods.
9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created.
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.

## Return information

{{< multitabs id="acl-log-return-info"
tab1="RESP2"
tab2="RESP3" >}}

When called to show security events:
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.
When called with `RESET`:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared.

-tab-sep-

When called to show security events:
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.
When called with `RESET`:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared.

{{< /multitabs >}}
16 changes: 16 additions & 0 deletions content/commands/acl-save.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@ option), this command will save the currently defined ACLs from the server memor
> ACL SAVE
-ERR There was an error trying to save the ACLs. Please check the server logs for more information
```

## Return information

{{< multitabs id="acl-save-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file.

-tab-sep-

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file.

{{< /multitabs >}}
16 changes: 16 additions & 0 deletions content/commands/acl-setuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,19 @@ This is a list of all the supported Redis ACL rules:
> ACL SETUSER antirez heeyyyy
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
```

## Return information

{{< multitabs id="acl-setuser-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
If the rules contain errors, the error is returned.

-tab-sep-

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
If the rules contain errors, the error is returned.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/acl-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,17 @@ users in the Redis ACL system.
2) "antirez"
3) "default"
```

## Return information

{{< multitabs id="acl-users-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users.

-tab-sep-

[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/acl-whoami.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,17 @@ can change user using [`AUTH`]({{< relref "/commands/auth" >}}).
> ACL WHOAMI
"default"
```

## Return information

{{< multitabs id="acl-whoami-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection.

-tab-sep-

[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection.

{{< /multitabs >}}
13 changes: 13 additions & 0 deletions content/commands/append.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,16 @@ GETRANGE ts 0 3
GETRANGE ts 4 7
{{% /redis-cli %}}

## Return information

{{< multitabs id="append-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation.

-tab-sep-

[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/asking.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ This is normally done automatically by cluster clients.
If an `-ASK` redirect is received during a transaction, only one ASKING command needs to be sent to the target node before sending the complete transaction to the target node.

See [ASK redirection in the Redis Cluster Specification]({{< relref "/operate/oss_and_stack/reference/cluster-spec#ask-redirection" >}}) for details.

## Return information

{{< multitabs id="asking-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.

-tab-sep-

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ Because of the high performance nature of Redis, it is possible to try
a lot of passwords in parallel in very short time, so make sure to generate a
strong and very long password so that this attack is infeasible.
A good way to generate strong passwords is via the [`ACL GENPASS`]({{< relref "/commands/acl-genpass" >}}) command.

## Return information

{{< multitabs id="auth-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid.

-tab-sep-

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid.

{{< /multitabs >}}
16 changes: 16 additions & 0 deletions content/commands/bgrewriteaof.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,19 @@ Since Redis 2.4 the AOF rewrite is automatically triggered by Redis, however the
`BGREWRITEAOF` command can be used to trigger a rewrite at any time.

See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information.

## Return information

{{< multitabs id="bgrewriteaof-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Simple string reply](../../develop/reference/protocol-spec#simple-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.
The command may reply with an error in certain cases, as documented above.

-tab-sep-

[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.
The command may reply with an error in certain cases, as documented above.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/bgsave.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,21 @@ A client may be able to check if the operation succeeded using the [`LASTSAVE`](
command.

See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information.

## Return information

{{< multitabs id="bgsave-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`.

-tab-sep-

One of the following:
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`.

{{< /multitabs >}}
14 changes: 14 additions & 0 deletions content/commands/bitcount.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,17 @@ When the bitmap is big, there are two alternatives:
* Running the bitmap incrementally using the `BITCOUNT` _start_ and _end_
optional parameters, accumulating the results client-side, and optionally
caching the result into a key.

## Return information

{{< multitabs id="bitcount-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1.

-tab-sep-

[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/bitfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,21 @@ bitmap previously set to all zeroes, will produce the following representation:
When offsets and integer sizes are aligned to bytes boundaries, this is the
same as big endian, however when such alignment does not exist, its important
to also understand how the bits inside a byte are ordered.

## Return information

{{< multitabs id="bitfield-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if OVERFLOW FAIL was given and overflows or underflows are detected.

-tab-sep-

One of the following:
* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.
* [Null reply](../../develop/reference/protocol-spec#nulls): if OVERFLOW FAIL was given and overflows or underflows are detected.

{{< /multitabs >}}
Loading