# server\_storage

Source: https://zotonic.com/docs/2093/server_storage

URI: https://zotonic.com/id/2093

Language: en



Model to access the server side storage of data.

See the module documentation of <a href="/id/doc_module_mod_server_storage" class="doc-reference doc-reference-module"><code>module#mod_server_storage</code></a> for information.

Available Model API Paths
-------------------------

| Method   | Path pattern | Description                                                                      |
| -------- | ------------ | -------------------------------------------------------------------------------- |
| `get`    | `/`          | Return all non-secure server-storage key/value pairs for the current session id via `z_server_storage:lookup/2`. No further lookups. |
| `get`    | `/+key/...`  | Return value for session key `+key` from non-secure server storage (or `not_found/no_session` error). |
| `post`   | `/+key`      | Store payload under session key `+key` in non-secure server storage; starts storage for the session when missing. No further lookups. |
| `delete` | `/+key`      | Delete key `+key` from non-secure server storage for the current session. No further lookups. |
| `delete` | `/`          | Delete all non-secure server-storage keys for the current session. No further lookups. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2093?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2093?language=en>)
