Show examples in:
    Update a role

    Body Parameters

    name  Optional  string  Example: "Editor"

    The name of the role

    can_edit_favicon  Optional  boolean  Example: true

    Can edit favicon, global SEO settings and no-index policy

    can_edit_site  Optional  boolean  Example: true

    Can change project global properties

    can_edit_schema  Optional  boolean  Example: true

    Can create/edit models and plugins

    can_manage_menu  Optional  boolean  Example: true

    Can customize content navigation bar

    can_edit_environment  Optional  boolean  Example: true

    Can change locales, timezone and UI theme

    can_promote_environments  Optional  boolean  Example: true

    Can promote environments to primary and manage maintenance mode

    environments_access  Optional  enum  Example: "primary_only"

    Specifies the environments the user can access

    can_manage_users  Optional  boolean  Example: true

    Can create/edit roles and invite/remove collaborators

    can_manage_shared_filters  Optional  boolean  Example: true

    Can create/edit shared filters (both for models and the media area)

    can_manage_build_triggers  Optional  boolean  Example: true

    Can create/edit Build triggers

    can_manage_webhooks  Optional  boolean  Example: true

    Can create/edit webhooks

    can_manage_environments  Optional  boolean  Example: true

    Can create/delete sandbox environments and promote them to primary environment

    can_manage_sso  Optional  boolean  Example: true

    Can manage Single Sign-On settings

    can_access_audit_log  Optional  boolean  Example: true

    Can access Audit Log

    can_manage_workflows  Optional  boolean  Example: true

    Can create/edit workflows

    can_manage_access_tokens  Optional  boolean  Example: true

    Can manage API tokens

    can_perform_site_search  Optional  boolean  Example: true

    Can perform Site Search API calls

    can_access_build_events_log  Optional  boolean  Example: true

    Can access the build events log

    positive_item_type_permissions  Optional  Array<object>

    Allowed actions on a model (or all) for a role

    negative_item_type_permissions  Optional  Array<object>

    Prohibited actions on a model (or all) for a role

    positive_upload_permissions  Optional  Array<object>

    Allowed actions on a model (or all) for a role

    negative_upload_permissions  Optional  Array<object>

    Prohibited actions on a model (or all) for a role

    positive_build_trigger_permissions  Optional  Array<object>

    Allowed build triggers for a role

    negative_build_trigger_permissions  Optional  Array<object>

    Prohibited build triggers for a role

    meta.final_permissions  Optional  object

    The final set of permissions considering also inherited roles

    inherits_permissions_from  Optional  Array of { type: "role", id: role.id }

    The roles from which this role inherits permissions

    Returns

    Returns a role resource object.

    Examples

    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const roleId = '34';
    const role = await client.roles.update(roleId, {});
    console.log(role);
    }
    run();