RoleInfo

pydantic model openapi_client.models.role_info.RoleInfo

Request body for POST /roles. The backend enforces a strict allow-list: any property other than the six below is rejected with IPV-1008. RoleName, RoleDescription and UsersAttached must be present (their values may be empty, except RoleName which must be non-empty). RolePermissions is also listed as required here because the handler dereferences it unconditionally; omitting it produces an unhandled HTTP 500 rather than a validation error, so the API Gateway validator rejecting it up front is the desired behaviour.

Fields:
field role_name: StrictStr [Required] (alias 'RoleName')

Name of the new role. Must be non-empty and unique across the platform. Must not begin with “SystemRole”, which is reserved (rejected with ROLE-1001).

Constraints:
  • strict = True

field role_description: Optional[StrictStr] = None (alias 'RoleDescription')

Description of the role. The key must be present but the value may be an empty string.

field role_permissions: List[StrictStr] [Required] (alias 'RolePermissions')

Permissions to grant, each in the form “<service>.<action>”, for example “datasets.view”. Each entry is validated against the platform’s permission catalog and an unknown entry is rejected with ROLE-1001. An empty array is accepted. Redundant lower-level permissions are stripped automatically: granting “<service>. fullaccess” removes “<service>.manage” and “<service>.view”, and granting “<service>.manage” removes “<service>.view”.

field users_attached: List[StrictStr] [Required] (alias 'UsersAttached')

User IDs to attach to the role. The key must be present but the array may be empty. Every ID is validated and an unknown user is rejected with GE-1060. Any RoleManagers supplied are appended to this list automatically.

field role_managers: Optional[List[StrictStr]] = None (alias 'RoleManagers')

User IDs permitted to update or delete this role. Optional: when omitted the caller becomes the sole role manager, and when supplied the caller is appended to the list. Every ID is validated against the users table.

field sidenav_config: Optional[List[Dict[str, Any]]] = None (alias 'SidenavConfig')

Optional UI navigation configuration. Stored verbatim; the backend never inspects its structure, so no element shape is defined.

to_str()

Returns the string representation of the model using alias

Return type:

str

to_json()

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str)

Create an instance of RoleInfo from a JSON string

Return type:

Optional[Self]

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj)

Create an instance of RoleInfo from a dict

Return type:

Optional[Self]