users/insert_data
2 minute read.
Last Modified 2021-02-04 11:38 ESTNamespace | Name | Admin Only | Log Summary | Generates Event | Version Added | Version Removed |
---|---|---|---|---|---|---|
users | insert_data | no | no | no | 1 | 2.0 |
This API namespace was removed in version 2.0 Please look at the users/set_data API for the alternative to this functionality.
Save any random data to be associated with the currently logged-in user. This is useful to save/restore a cache of user settings that might be needed by the Web UI for instance.
This is different from the users/set_data API call in that the fields within the input arguments will be added to the current user data rather than replace it. Any input objects/variables with the same name as existing fields in the user data will overwrite those fields however.
- Required:
- Anything as long as the input arguments are a Json Object
ARGUMENTS ONLY: See the basics of API requests for additional formatting information.
{
"generic_data" : "sample field",
"dataobject": {
"datafield1" : "1"
}
}
{
"namespace" : "response",
"name" : "insert_data",
"id" : "some_id",
"args" : {
"result" : "success",
"data" : {
[COPY OF CURRENT DATA OBJECT]
}
}
}
Original saved data:
{
"dataobject" : {
"A" : "a"
},
"dataobject2" : {
"B" : "b"
}
}
After change from the request above:
{
"generic_data" : "sample field",
"dataobject": {
"datafield1" : "1"
},
"dataobject2" : {
"B" : "b"
}
}
Note that the entire “dataobject” was replaced. If you only want to insert an item into dataobject, then you will want to use the users/insert_data_value API call instead.
This API call does not generate a detailed log summary item
This API call does not emit any middleware events.