Menu
Create Roles
Create Multiple Roles
POST
/rolesUse it in a workflow
- Add a step and choose the Directus connector.
- Pick the Create Roles action (under Roles).
- Fill in the fields below, then reference the result from later steps as
{{createRoles.response.data}}.
Request
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"data": [
{
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Administrator",
"icon": "verified_user",
"description": "Admins have access to all managed data within the system by default",
"parent": "00000000-0000-0000-0000-000000000000",
"children": [
null
],
"policies": [
null
],
"users": [
null
]
}
]
}
Response
Returns 200 with an object. Read it in later steps with {{createRoles.response.data.<field>}}.
{
"data": [
{
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Administrator",
"icon": "verified_user",
"description": "Admins have access to all managed data within the system by default",
"parent": "00000000-0000-0000-0000-000000000000",
"children": [
null
],
"policies": [
null
],
"users": [
null
]
}
],
"meta": {
"total_count": 0,
"filter_count": 0
}
}
Need more? See the Directus guide for connection setup and behaviour shared by every action.
Was this page helpful?