Is it possible to extend user collection with custom fields

Hello,

Is it possible to extend user resource in user collection with custom properties, e.g. we would like to add
token property (string type) to the user resource in order to send notifications to the user device. Maybe later on, we would like to add/extend with some additional property as well like some user settings.

We are reffering to :
http://cumulocity.com/api/#operation/putUserResource

and we don’t see possibility for such customization.

Kind regards,
Miloš

Hello Miloš,

The user object has a customProperties attribute that you can use for storing your custom attributes within it.
This attribute is actually not listed for some reason within the request body, but the response sample of the linked API does list it:

{
    "self": "https://<TENANT_DOMAIN>/user/{tenant}/jdoe",
    "firstName": "John",
    "lastName": "Doe",
    "userName": "jdoe",
    "id": "123",
    "displayName": "jdoe",
    "phone": "+1-541-754-3010",
    "email": "johndoe@example.com",
    "newsletter": true,
    "lastPasswordChange": "2020-06-09T09:48:40.008Z",
    "shouldResetPassword": false,
    "passwordStrength": "GREEN",
    "enabled": true,
    "customProperties": {
		"language": "en"
	}
}

Kind Regards,
Tristan

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.