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

Managing account properties

You are also able to do a similar property management on an account level as you do on a user level.

For this, you'll need to use the /nodes/account-property request path to be able to get, store and delete properties for the logged in user for the current session.

Information is organized the same way it is on managing user properties, as an object with the properties domain, key and value.


Properties



Show Properties



Retrieve properties


You can use a GET request to retrieve information related to an account using the account name, domain and key.

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/account-property/{account}/{domain}/{key}

Parameters


accountstringThe name of the user's account you want to store information into.
domainstringThe domain you want to retrieve the information from.
keystringIdentify 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/account-property/{account}/{domain}/{key}'

Response


By default, it returns the account-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/account-property/account/domain/key and specifying the value for the key on the request body.

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

Parameters


accountstringThe name of the user's account you want to store information into.
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 account or 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/account-property/{account}/{domain}/{key}

Parameters


accountstringThe name of the user's account you want to store information into.
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 "Accept: application/json" \
'https://rest.smartvault.com/nodes/account-property/{account}/{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