Page 1 of 1

Unable to save data into custom_data field

Posted: Wed Apr 13, 2022 7:28 am
by alexalexalex
Hi All,

I have been having issues while attempting to save data into the custom_data field as pointed to by the /v1/user/custom_data endpoint.

I have been trying to write data via the swagger API. I have been performing the following sequence:

* create new account

* test out the /v1/user/custom_data route, and receive
`{}`

* Attempt to write custom data via PUT route using the example data, ie
`{
"user_data": {
"Country": "<country>",
"Time Zone": "UTC",
"Last Active Date": "yyyy-mm-dd",
"Beta": false
},
"write_once_user_data": {
"Birthday": "yyyy-mm-dd"
}
}`

* response received has status 200 and body:
`{
"user_data": {},
"user_settings": {},
"write_once_user_data": {}
}`

* attempting a GET request for the data returns the same empty json items.

My testing has suggested that this is an issue on the rainmaker cloud as it is occurring for brand new accounts and has no interaction with my app.

Any thoughts to solve this?

Re: Unable to save data into custom_data field

Posted: Thu Apr 14, 2022 11:07 am
by dattatrayhkulkarni
Hi,

The API definition for the Common user Data is updated.

Please refer to the Swagger link below -

https://swaggerapis.rainmaker.espressif ... reUserData

Let me know if you have any queries.

regards,
dattatray.

Re: Unable to save data into custom_data field

Posted: Mon Apr 18, 2022 11:48 pm
by alexalexalex
Thanks Dattatray, I can see the updated documentation now.

Re: Unable to save data into custom_data field

Posted: Tue Apr 19, 2022 1:22 am
by alexalexalex
Hi Dattatray,

Previously, we had a custom field under custom_data.user_data.user_sessions where we were storing arrays of arrays. However, in the new version of the API, I seem to be locked into using the field names and structure of the example code in swagger.

What's the best way to store my custom data?

Thanks, Alex