Unable to save data into custom_data field

alexalexalex
Posts: 3
Joined: Wed Apr 13, 2022 7:14 am

Unable to save data into custom_data field

Postby alexalexalex » Wed Apr 13, 2022 7:28 am

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?

dattatrayhkulkarni
Posts: 1
Joined: Thu Apr 14, 2022 11:03 am

Re: Unable to save data into custom_data field

Postby dattatrayhkulkarni » Thu Apr 14, 2022 11:07 am

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.

alexalexalex
Posts: 3
Joined: Wed Apr 13, 2022 7:14 am

Re: Unable to save data into custom_data field

Postby alexalexalex » Mon Apr 18, 2022 11:48 pm

Thanks Dattatray, I can see the updated documentation now.

alexalexalex
Posts: 3
Joined: Wed Apr 13, 2022 7:14 am

Re: Unable to save data into custom_data field

Postby alexalexalex » Tue Apr 19, 2022 1:22 am

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

Who is online

Users browsing this forum: No registered users and 74 guests