younifyd
Menu

Create Roles

Create roles

POST/admin/realms/{realm}/roles

Use it in a workflow

  1. Add a step and choose the Keycloak connector.
  2. Pick the Create Roles action (under Roles).
  3. Fill in the fields below, then reference the result from later steps as {{createRoles.response.data}}.

Request

Path parameters

realmstringrequired

realm name (not id!)

Request body

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

idstring
namestring
descriptionstring
scopeParamRequiredboolean
compositeboolean
compositesobject
realmarray<string>
clientobject
applicationobject
clientRoleboolean
containerIdstring
attributesobject
json
{
  "id": "string",
  "name": "string",
  "description": "string",
  "scopeParamRequired": false,
  "composite": false,
  "composites": {
    "realm": [
      "string"
    ],
    "client": {},
    "application": {}
  },
  "clientRole": false,
  "containerId": "string",
  "attributes": {}
}

Response

Returns 201 with a any. Read it in later steps with {{createRoles.response.data.<field>}}.

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

Create Roles — Keycloak — Documentation