SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

profile #

Instantiate a new security Profile object.


profile(id, content) #

ArgumentsTypeDescription
idstringUnique profile identifier
contentJSON ObjectProfile content

Return Value #

Returns the new security Profile object.

Usage #

var profileDefinition = {
  policies: [
    {roleId: 'myrole'},
    {roleId: 'default', restrictedTo: [{index: 'index1'}, {index: 'index2', collections: ['foo', 'bar'] } ] }
  ]
};
var profile = kuzzle.security.profile('myprofile', profileDefinition);