IntroductionBefore you beginTerminologyGetting started
Authorization
Accounts
Entities
User accounts
IntroductionCreate a new accountRetrieve account informationManage user propertiesPropertiesRetrieve propertiesStore propertiesDelete propertiesManage account properties
GroupsFilesFoldersTemplatesEmail templatesAppsErrors

Managing user properties

You can use /nodes/user-property to get, store and delete properties for the logged in user for the current session
This information is set as an object with the properties: domains, keys, and values.


Properties



Show Properties



Retrieve properties


You can use a GET request to retrieve information related to a domain and key about the logged in user.

You can also retrieve all the keys from a domain not specifying the key parameter and using the "?children" query param after the domain.

You won't be able to see the properties values if you don't specify the query param "?eprop=true".

Get properties
GET/nodes/user-property/{domain}/{key}

Parameters


domainstringThe domain you want to retrieve the information from.
keystring (optional)Identify the value you want to get by its key.

Request


curl --include \
--header "Authorization: Basic dGVzdHVzZXJAc21hcnR2YXVsdC5jb206UTB4Sk1EQUFBQUFBQUFBQlVZRE9MOE82N3oyQjdvVmJLcytWMngybmZHTXgzR2FzY2pNUEp4Y0dGeHZPeWc9PQ==" \
--header "Accept: application/json" \
'https://rest.smartvault.com/nodes/user-property/{domain}/{key}'

Response


By default, it returns the user-property object data. As stated above, you'll need to specify the query param "?eprop=true" if you want the value of the key to be present on the response.

Show success object


Not specifying the key and setting the children query param, would return all the keys stored under a certain domain.

Show success object




Store properties


You can store properties for a logged in user by placing a PUT request to /nodes/user-property/domain/key and specifying the value for the key on the request body..

Store properties
PUT/nodes/user-property/{domain}/{key}

Parameters


domainstringThe domain you want to set the information to.
keystringThe key to identify the information within the domain.


Body parameters


valuestringThe value for the key property you're creating.
{
"value": "Example text to be stored on the key."
}

Request


Headers:
Authorization:Basic dGVzdHVzZXJAc21hcnR2YXVsdC5jb206UTB4Sk1EQUFBQUFBQUFBQlVZRE9MOE82N3oyQjdvVmJLcytWMngybmZHTXgzR2FzY2pNUEp4Y0dGeHZPeWc9PQ==
Content-type:application/json
Accept:application/json
Body:
{
"value": "Example text to be stored."
}

Response


Returns a default node object.

Show success object


Will return an error object if either the domain from path or value from body parameters are not present in the request.




Delete properties


You are also able to delete some information saved in a domain using a delete request.

You cannot delete a domain, only the keys in the domains.

Delete properties
DELETE/nodes/user-property/{domain}/{key}

Parameters


domainstringThe domain you want to retrieve the information from.
keystringIdentify the value you want to get by its key.

Request


curl --include \
--request DELETE \
--header "Authorization: Basic dGVzdHVzZXJAc21hcnR2YXVsdC5jb206UTB4Sk1EQUFBQUFBQUFBQlVZRE9MOE82N3oyQjdvVmJLcytWMngybmZHTXgzR2FzY2pNUEp4Y0dGeHZPeWc9PQ==" \
--header "Content-type: application/json" \
--header "Accept: application/json" \
'https://rest.smartvault.com/nodes/user-property/{domain}/{key}'

Response


Returns a default object if deletion goes well.

Show success object


Returns an error object if the key doesn't exist.

Show error object