iahiqosolutions
13 years agoAdvisor
REST API: Add custom setting to User entity
Hi there!
I have question concering the Lithium REST API.
I want to add custom setting to the user entity(gender of the current user).
I tried to use the following method:
/restapi/vc/authentication/sessions/current/user/settings/name/profile.gender/set
But I'm always getting the error with code #303.
Error code: 303. User[id=49, loginRef=Georg McMurfy, emailRef=hpb13448@msb.minsmail.com, registrationTime=1346411976379, deletedRef=false, rankingId=-1, lastVisitTime=1346411976379, isLegacy=true, isPartiallyRegistered=false, registrationCompletedTime=0, isAnonymous=false, roleInfoRef=UserRoleInfo[roles=[]], ranking=Ranking [rankId=-1, sortOrder=100, rankName=N/A, rankBold=false, rankColor=, rankIcon=, rankIconRight=, rankIconThread=, grantRoles=, removeRoles=, kudosWeight=-1, registrationAge=0, metricPosts=0, metricPageViews=0, metricLogins=0, metricMinutesOnline=0, metricTags=0, averageMessageRating=0, equalsUserId=-1, equalsRole=, equalsRoleKey=null, rankingFormula=, rankingFormulaEnabled=false, coreNode=CoreNode(class lithium.boards.core.Community)[SQLCoreNodeinfo: owner=-1 metricsId=1 hidden=false hiddenAncestor=false deleted=false nodeId=1 parentNodeId=-1 type=DaoNodeTypeRef[nodeTypeUid=1] displayId='napaonline' path=NodePath:/, depth:1], rankTextMsg=LocalizedMessageDescriptor[messageLocator=FallbackSequenceMessageLocator[textKeyIterable=[TextKey[rank.-1.title]]],messageArgs={}]]] cannot set field 'profile.gender' on object User[id=49, loginRef=Georg McMurfy, emailRef=hpb13448@msb.minsmail.com, registrationTime=1346411976379, deletedRef=false, rankingId=-1, lastVisitTime=1346411976379, isLegacy=true, isPartiallyRegistered=false, registrationCompletedTime=0, isAnonymous=false, roleInfoRef=UserRoleInfo[roles=[]], ranking=Ranking [rankId=-1, sortOrder=100, rankName=N/A, rankBold=false, rankColor=, rankIcon=, rankIconRight=, rankIconThread=, grantRoles=, removeRoles=, kudosWeight=-1, registrationAge=0, metricPosts=0, metricPageViews=0, metricLogins=0, metricMinutesOnline=0, metricTags=0, averageMessageRating=0, equalsUserId=-1, equalsRole=, equalsRoleKey=null, rankingFormula=, rankingFormulaEnabled=false, coreNode=CoreNode(class lithium.boards.core.Community)[SQLCoreNodeinfo: owner=-1 metricsId=1 hidden=false hiddenAncestor=false deleted=false nodeId=1 parentNodeId=-1 type=DaoNodeTypeRef[nodeTypeUid=1] displayId='napaonline' path=NodePath:/, depth:1], rankTextMsg=LocalizedMessageDescriptor[messageLocator=FallbackSequenceMessageLocator[textKeyIterable=[TextKey[rank.-1.title]]],messageArgs={}]]]
Could anybody explain me, what does it mean?
P.S.
I used session key of the user with administration permissions.