Permissions
Create team role
Changed onCreates a team-scoped permission role.
post/teams/{key}/roles
Request
- Base URLhttps://api.session.services
- AuthAPI key in header x-tenant-id
Path parameters
key, string required
Team identifier (ID or slug)
Request body
object required
name, string required
Role display name
description, string
Optional role description
permissions, string[] required
Non-empty array of permission nodes. Supports wildcard and negation.
Example request
{
"permissions": [
"team.read",
"team.member.write"
]
}Response
OK
object required
role, object required
Team-scoped permission role
Example response
{
"role": {
"permissions": [
"team.read",
"team.member.write"
]
}
}Changes
- breaking
the
permissionsrequest property's minItems was increased to1 - breaking
the
namerequest property's minLength was increased from0to1 - breaking
added the pattern
^-?(?:\*|(?:[a-z][a-z0-9-]*)(?:\.[a-z][a-z0-9-]*)*(?:\.\*|\.bypass|\.[a-z]{3}_[0-9a-z]{26})?)$to the request propertypermissions/items
3 more changes in this revision
- breaking