Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
258df46
feat(api): add array read endpoints (RI-8219)
pawelangelow Jun 12, 2026
e97009b
docs(api): add Array bruno presets and seed fixture (RI-8219)
pawelangelow Jun 12, 2026
8ba1b36
fix(api): harden array read paths for null/undefined edges (RI-8219)
pawelangelow Jun 12, 2026
62a94ff
feat(api): expose array length and count via key-info (RI-8219)
pawelangelow Jun 12, 2026
9aa03ad
use the proper casing
pawelangelow Jun 15, 2026
f51748f
add limit for ARSCAN
pawelangelow Jun 15, 2026
5d84753
fix lint
pawelangelow Jun 15, 2026
05e3363
add tests for the transformer
pawelangelow Jun 15, 2026
3cf97b5
address PR comments
pawelangelow Jun 15, 2026
f65e26d
address PR comments
pawelangelow Jun 15, 2026
9186271
feat(api): reject reversed array ranges (RI-8219)
pawelangelow Jun 15, 2026
74bb22a
address comments
pawelangelow Jun 16, 2026
ca359b8
remove any reversible stuff
pawelangelow Jun 16, 2026
7ccd26c
refactor(api): dedicated key-info response for array keys (RI-8219)
pawelangelow Jun 16, 2026
42ddc13
fix(api): nil-safe index normalization and ARMGET indexes cap (RI-8219)
pawelangelow Jun 16, 2026
0409c61
fix(api): correct OAS schema for array element nullability (RI-8219)
pawelangelow Jun 16, 2026
036f805
address pr comments
pawelangelow Jun 16, 2026
a72df11
reduce comments
pawelangelow Jun 16, 2026
2ccfdf3
fix(api): allow reversed ranges for ARSCAN (RI-8219)
pawelangelow Jun 17, 2026
79b2181
fix(api): allow reversed ranges for ARGETRANGE (RI-8219)
pawelangelow Jun 17, 2026
2ff5939
address issues
pawelangelow Jun 17, 2026
fd4df8d
fix(api): handle nested ARSCAN reply shape (RI-8219)
pawelangelow Jun 17, 2026
d3cdb3f
address comments
pawelangelow Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ docs {
|-------|------|-------------|
| `keyName` | string | The key name for the new Array |
| `mode` | string | Must be `contiguous` for this request shape |
| `startIndex` | string | Start index as a numeric string (`0` to `18446744073709551615`) |
| `startIndex` | string | Start index as a numeric string (`0` to `18446744073709551614`) |
| `values` | string[] | Value(s) to write starting at `startIndex` |
| `expire` | number (optional) | TTL in seconds |

Expand All @@ -47,7 +47,7 @@ docs {

| Status | Condition |
|--------|-----------|
| `400` | Validation failed, e.g. a non-canonical index: `startIndex must be an integer string between 0 and 18446744073709551615` |
| `400` | Validation failed, e.g. a non-canonical index: `startIndex must be an integer string between 0 and 18446744073709551614` |
| `403` | User has no permissions |
| `409` | Key with this name already exists |
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ docs {
| `keyName` | string | The key name for the new Array |
| `mode` | string | Must be `sparse` for this request shape |
| `elements` | array | Index/value pairs to write |
| `elements[].index` | string | Element index as a numeric string (`0` to `18446744073709551615`) |
| `elements[].index` | string | Element index as a numeric string (`0` to `18446744073709551614`) |
| `elements[].value` | string | Element value |
| `expire` | number (optional) | TTL in seconds |

Expand All @@ -50,7 +50,7 @@ docs {

| Status | Condition |
|--------|-----------|
| `400` | Validation failed, e.g. a non-canonical index: `elements.0.index must be an integer string between 0 and 18446744073709551615` |
| `400` | Validation failed, e.g. a non-canonical index: `elements.0.index must be an integer string between 0 and 18446744073709551614` |
| `403` | User has no permissions |
| `409` | Key with this name already exists |
}
Expand Down
45 changes: 45 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Count.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: Get Count
type: http
seq: 4
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-count
body: json
auth: inherit
}

body:json {
{
"keyName": "readings"
}
}

docs {
# ARCOUNT

Returns the number of populated (non-empty) elements in the array.
Unsigned 64-bit integer returned as a numeric string.

## Response

```
{
"keyName": "readings",
"count": "5"
}
```

## Errors

| Status | When |
|--------|------|
| `400` | Key holds a non-array type. |
| `403` | User has no permission for `ARCOUNT`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
meta {
name: Get Element (empty slot)
type: http
seq: 8
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-element
body: json
auth: inherit
}

body:json {
{
"keyName": "readings",
"index": "3"
}
}

docs {
# ARGET — empty slot

Same endpoint as **Get Element**, pre-filled to query an **unset index**
on the seeded `readings` key. With the `Seed Sample Data` fixture
populating indexes `0`, `1`, `5`, asking for index `3` exercises the
gap-preserving semantics of Redis arrays.

## Why this preset exists

A common reviewer assumption is "missing index → 404". For arrays it
isn't: the key exists and the array's logical length still spans the
requested index, so the API returns `200 OK` with a `null` `value`.
Only a missing **key** returns 404.

## Response

```
{
"keyName": "readings",
"value": null
}
```

## Compare with

- **Get Element** (`index: "1"`) → `"value": "20.4"` (slot is set).
- **Get Element** (`keyName: "no-such-key"`) → `404 Not Found` (key missing).
}

settings {
encodeUrl: true
}
53 changes: 53 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Element.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
meta {
name: Get Element
type: http
seq: 6
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-element
body: json
auth: inherit
}

body:json {
{
"keyName": "readings",
"index": "1"
}
}

docs {
# ARGET

Get the value at a single index. Returns `null` for an empty slot or an
index past the array length.

## Request body

| Field | Type | Notes |
|-----------|--------|--------------------------------------------------------|
| `keyName` | string | The Array key name. |
| `index` | string | Unsigned 64-bit integer as string. |

## Response

```
{
"keyName": "readings",
"value": "20.4"
}
```

## Errors

| Status | When |
|--------|------|
| `400` | Key holds a non-array type. |
| `403` | User has no permission for `ARGET`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
53 changes: 53 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Elements.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
meta {
name: Get Elements
type: http
seq: 7
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-elements
body: json
auth: inherit
}

body:json {
{
"keyName": "readings",
"indexes": ["0", "3", "5"]
}
}

docs {
# ARMGET

Get values at multiple indexes in one round-trip. Returns an array of
`value | null`, one entry per requested index, in request order.

## Request body

| Field | Type | Notes |
|-----------|----------|------------------------------------------------------|
| `keyName` | string | The Array key name. |
| `indexes` | string[] | 1 to 1,000,000 indexes; each unsigned 64-bit as string. |

## Response

```
{
"keyName": "readings",
"elements": ["20.1", null, "21.4"]
}
```

## Errors

| Status | When |
|--------|------|
| `400` | `indexes` is empty or exceeds 1,000,000 entries, any index is not a valid unsigned 64-bit integer string, or the key holds a non-array type. |
| `403` | User has no permission for `ARMGET`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
45 changes: 45 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Length.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: Get Length
type: http
seq: 3
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-length
body: json
auth: inherit
}

body:json {
{
"keyName": "readings"
}
}

docs {
# ARLEN

Returns the logical length of the array — highest set index + 1 (includes
gaps). Unsigned 64-bit integer returned as a numeric string.

## Response

```
{
"keyName": "readings",
"length": "7"
}
```

## Errors

| Status | When |
|--------|------|
| `400` | Key holds a non-array type. |
| `403` | User has no permission for `ARLEN`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
45 changes: 45 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Next Index.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: Get Next Index
type: http
seq: 5
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-next-index
body: json
auth: inherit
}

body:json {
{
"keyName": "readings"
}
}

docs {
# ARNEXT

Returns the next index that `ARINSERT` would use. Read-only.
Unsigned 64-bit integer returned as a numeric string.

## Response

```
{
"keyName": "readings",
"index": "7"
}
```

## Errors

| Status | When |
|--------|------|
| `400` | Key holds a non-array type. |
| `403` | User has no permission for `ARNEXT`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
55 changes: 55 additions & 0 deletions redisinsight/api/bruno/RedisInsight/Array/Get Range.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
meta {
name: Get Range
type: http
seq: 1
}

post {
url: {{API_URL}}/databases/{{DB_INSTANCE_ID}}/array/get-range
body: json
auth: inherit
}

body:json {
{
"keyName": "readings",
"start": "0",
"end": "6"
}
}

docs {
# ARGETRANGE

Read an inclusive range of elements from an Array key. Empty slots are
returned as `null`. `start` must be less than or equal to `end`.

## Request body

| Field | Type | Notes |
|-----------|--------|-----------------------------------------------------------|
| `keyName` | string | The Array key name. |
| `start` | string | Inclusive start index. Unsigned 64-bit integer as string. |
| `end` | string | Inclusive end index. Unsigned 64-bit integer as string. Must be ≥ `start`. |

## Response

```
{
"keyName": "readings",
"elements": ["20.1", "20.4", "20.9", null, null, "21.4", "21.9"]
}
```

## Errors

| Status | When |
|--------|------|
| `400` | `start` is greater than `end`, range exceeds 1,000,000 elements per call, or the key holds a non-array type. |
| `403` | User has no permission for `ARGETRANGE`. |
| `404` | Key does not exist. |
}

settings {
encodeUrl: true
}
Loading