Documentation for version v74
Store Set
Description
Store Set a pipe writes the value under the given key to mongodb.
Structure
| Field | Type of value | Example | Required | Description |
|---|---|---|---|---|
| id | number | 10 | yes | Pipe's ID |
| type | string | "store_set" | yes | Type of a pipe |
| params | StoreSetParamsObject | no | Type-specific parameters | |
| outs | OutsObject | no | Pipe's outputs |
| StoreSetParamsObject | |||||
|---|---|---|---|---|---|
| Field | Type | Example | Reqiered | Default | Description |
| key | string | "key_name" | yes | - | Key name |
| value | any type | "qwerty" | yes | — | Data that will be saved. |
| table | string | "some" | no | "" | The name of the virtual collection into which the key-value pair will be written. From an implementation point of view, it’s just a tag. Therefore, it does not require any additional database configuration. |
| ttl | number | 50 | yes | - | After what time the data will be deleted. |
Errors
Error processing params.key, params.value, params.table or params.ttl - the template is invalid or the field was not found.
- Database query error.
Example
{
"id": 37,
"type": "store_set",
"params": {
"key": "session_id",
"value": "$in.data.SessionInfo.%0.SessionToken",
"ttl": 900
},
"outs": {
"success": 12,
"error": 13
}
}