younifyd
Menu

Update Role

Update a role

PUT/spaces/{spaceId}/roles/{roleId}

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Update Role action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{updateRole.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

roleIdstringrequired

ID of the role

Headers

X-Contentful-Versioninteger (int64)required

The version of the locale to update.

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

The name of the role.

descriptionstringrequired

A short description of the role.

permissionsobject

A map of permissions associated with the role.

policiesarray<any>

A map of permissions associated with the role.

json
{
  "name": "Updated Editor",
  "description": "Updated description for the role.",
  "permissions": {},
  "policies": [
    null
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{updateRole.response.data.<field>}}.

sysobject
namestring

The name of the role.

descriptionstring

A short description of the role.

permissionsobject

A map of permissions associated with the role.

policiesarray<any>

A map of permissions associated with the role.

json
{
  "sys": {},
  "name": "string",
  "description": "string",
  "permissions": {},
  "policies": [
    null
  ]
}

Need more? See the Contentful guide for connection setup and behaviour shared by every action.