Creates a new platform role for the authenticated org.
Required permission
Os > Admin > Roles > Manage
Request body
- {object}
name
string requiredThe name of the role.description
stringA description of the role.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$permissions
{object}Permissions granted by this role.teamScope
[array]Team-level RBAC permission strings.- string
projectScope
[array]Project-level RBAC permission strings.- string
orgScope
[array]Org-level RBAC permission strings.- string
restrictions
{object}Access restrictions for this role.enabled
boolean requiredWhether restrictions are enabled.
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredID of the role.pattern^[A-Za-z0-9-]+$name
string requiredDisplay name of the role.description
stringDescription of the role.restrictions
{object} requiredenabled
boolean requiredWhether restrictions are enabled.createdAt
stringCreation time.updatedAt
stringLast updated.permissions
{object} requiredteamScope
[array] requiredTeam-level permissions.- string
projectScope
[array] requiredProject-level permissions.- string
orgScope
[array] requiredOrg-level permissions.- string
API
CLI
JS Client
POST /v1/org-roles
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Developer","description":"Role for developers."}' \
https://api.northflank.com/v1/org-rolesExample response
200 OK
Details about the newly created org role.
JSON
{
"data": {
"id": "developer",
"name": "Developer",
"description": "Role for developers.",
"createdAt": "2021-01-20T11:19:53.175Z",
"updatedAt": "2021-01-20T11:19:53.175Z"
}
}