Backendless Support
 
Answered

What is the minimum for a PUT to User object?

I'm trying to add some relations to User objects, but am seeing weird results in my app and my REST client.

Are there certain fields that are required when sending a PUT on a user. Right now I'm trying to limit the amount of data I send, so I'm only sending the relations. Is that not possible? I couldn't find an answer to this in the documentation.

Thanks!

Leave a Comment

Comments (4)

photo
1

Hi Jeff,

Minimum object to save to User table if following:

  1. {
  2. "email":"e@e.e",
  3. "password": "***",
  4. "___class": "Users"
  5. }

Email property is default identity so if you changed identity, it should be sent instead.

Regards,

Denys

photo
1

I think maybe I wasn't correct/clear in my question. I'm trying to save relations of custom objects on Users.

To send a PUT to a user, is there a minimum amount of data I must send?

photo
photo
1

I think maybe I wasn't correct/clear in my question. I'm trying to save relations of custom objects on Users.

To send a PUT to a user, is there a minimum amount of data I must send?

photo
1

If you need to add relations, then just add them to the same JSON Denys provided. For any object the only obligatory field is "___class", and "objectId" in case you're establishing a relation to the existing object.

  1. {
  2. "email":"e@e.e",
  3. "password": "***",
  4. "___class": "Users"
  5. "relation1": {
  6. "___class": "MyTable"
  7. }

photo