Roles
Update a role
Perform a full replacement update of the mutable fields of the role in a single request, including the complete set of permissions.
PUT
/
v2
/
organizations
/
{organization_id}
/
roles
/
{role_id}
curl --request PUT \
--url https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Operador de organizacion",
"permissions": [
{
"target_organization": "507f1f77bcf86cd799439011",
"portal_permission": "organization_admin",
"workspaces_permission": "admin_read_only",
"analyzer_permission": "access",
"target_reporting_groups": [
"64f0c2a1b2d3e4f5060708c1",
"64f0c2a1b2d3e4f5060708c2"
]
}
]
}
'
{
"id": "<string>",
"name": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"permissions": [
{
"target_organization": "all",
"target_reporting_groups": "all",
"portal_permission": "admin",
"workspaces_permission": "no_access",
"analyzer_permission": "no_access"
}
]
}{
"error": {
"message": "Cuerpo de solicitud invalido",
"code": "bad_request",
"details": "permissions[0].target_organization debe ser una cadena hexadecimal en minusculas de 24 caracteres o el valor all"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Rol no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "El nombre del rol ya existe",
"code": "conflict",
"details": "name ya esta en uso dentro de esta organizacion"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Body
application/json
Response
Role updated successfully.
Role identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role name.
Organization identifier associated with this role.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role creation timestamp in ISO 8601 format.
Identifier of the user who created the role.
Required string length:
24Pattern:
^[0-9a-f]{24}$Permission entries configured for this role.
Show child attributes
Show child attributes
⌘I
curl --request PUT \
--url https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Operador de organizacion",
"permissions": [
{
"target_organization": "507f1f77bcf86cd799439011",
"portal_permission": "organization_admin",
"workspaces_permission": "admin_read_only",
"analyzer_permission": "access",
"target_reporting_groups": [
"64f0c2a1b2d3e4f5060708c1",
"64f0c2a1b2d3e4f5060708c2"
]
}
]
}
'
{
"id": "<string>",
"name": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"permissions": [
{
"target_organization": "all",
"target_reporting_groups": "all",
"portal_permission": "admin",
"workspaces_permission": "no_access",
"analyzer_permission": "no_access"
}
]
}{
"error": {
"message": "Cuerpo de solicitud invalido",
"code": "bad_request",
"details": "permissions[0].target_organization debe ser una cadena hexadecimal en minusculas de 24 caracteres o el valor all"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Rol no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "El nombre del rol ya existe",
"code": "conflict",
"details": "name ya esta en uso dentro de esta organizacion"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}