Namespace: Role

Role

Role instances

Type Definitions

Role #

See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/roles/create-a-role
Properties:
Name Type Description
sys Meta.Sys System metadata
name string
permissions object Permissions for application sections
policies object
toPlainObject() function Returns this Role as a plain JS object
Source:

RoleCollection #

Properties:
Name Type Description
total number
skip number
limit number
items Array.<Role.Role>
toPlainObject() function Returns this Role collection as a plain JS object
Source:

Methods

(static) delete() → {Promise} #

Deletes this object on the server.
Returns:
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Type:
Promise
Source:
Example
role.delete()
.catch(err => console.log(err))

(static) update() → {Promise.<Role>} #

Sends an update to the server with any changes made to the object's properties
Returns:
Object returned from the server with updated changes.
Type:
Promise.<Role>
Source:
Example
role.name = 'New name'
role.update()
.then(role => console.log(role.name))