# Storage Options Rest Encode

Encode storage options rest with named typed sockets.

Canonical URL: https://opennodeflow.dev/wiki/reference-app-storage-storage-codec-options-rest-encode/
JSON reference: https://opennodeflow.dev/wiki/reference-app-storage-storage-codec-options-rest-encode/index.json
Source snapshot: 2026-10-23

## Storage Options Rest Encode

Constructs the Storage Options Rest contract.

Inputs: `rest` (storage.type.options-rest, required), `item` (storage.type.option, optional), `index` (number, optional), `count` (number, optional).

Outputs: `value` (storage.type.options-rest, required).

Decode selects `config.index` (default 0), returning optional item, the remaining list, selected index and original count. Empty lists use index 0 and omit item. Encode inserts an optional item at index into rest and validates an optional count.

Pure transformation: no network calls, storage writes, namespace selection or persistent side effects. Codecs preserve explicitly present null values. A missing optional output stays absent; connecting that output to a dependent node can skip the dependent node. Invalid socket values fail schema validation.

## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `app.storage.storage.codec.options-rest.encode` |
| Kind | node |
| Family | app-storage |
| Pack | See library discovery |

[Integration guide](/wiki/storage/) · [Browse the catalog](/wiki/integration-catalog/)

## Inputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `rest` | Rest | storage.type.options-rest v1 | Yes |  |
| `item` | Item | storage.type.option v1 | No |  |
| `index` | Index | number | No |  |
| `count` | Count | number | No |  |

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `value` | Value | storage.type.options-rest v1 | Yes |  |

## Configuration schema


```json
{}
```





## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
