Plugins
API clients for interacting with QLAM services.
Tasks Client
Tasks Client - Clean Python API for task operations.
This module provides a typed, presentation-free API for task management. It uses the executor abstraction to perform HTTP operations and returns strongly-typed Pydantic models.
Usage
from qlam_core.plugins.tasks.api.client import TasksClient
from qlam_core.common.context import AppContext
ctx = AppContext()
# Direct usage
client = TasksClient(ctx)
tasks = client.list()
# Context manager usage
with TasksClient(ctx) as client:
tasks = client.list()
TasksClient
TasksClient(ctx: AppContext)
Bases: BaseRestApi, ListMixin[Task], ReadMixin[Task], WriteMixin[TaskCreationRequest, Task]
flowchart TD
qlam_core.plugins.tasks.api.client.TasksClient[TasksClient]
qlam_core.sdk.base_api.BaseRestApi[BaseRestApi]
qlam_core.plugins.common.mixins.ListMixin[ListMixin]
qlam_core.plugins.common.mixins.ReadMixin[ReadMixin]
qlam_core.plugins.common.mixins.WriteMixin[WriteMixin]
qlam_core.sdk.base_api.BaseRestApi --> qlam_core.plugins.tasks.api.client.TasksClient
qlam_core.plugins.common.mixins.ListMixin --> qlam_core.plugins.tasks.api.client.TasksClient
qlam_core.plugins.common.mixins.ReadMixin --> qlam_core.plugins.tasks.api.client.TasksClient
qlam_core.plugins.common.mixins.WriteMixin --> qlam_core.plugins.tasks.api.client.TasksClient
click qlam_core.plugins.tasks.api.client.TasksClient href "" "qlam_core.plugins.tasks.api.client.TasksClient"
click qlam_core.sdk.base_api.BaseRestApi href "" "qlam_core.sdk.base_api.BaseRestApi"
click qlam_core.plugins.common.mixins.ListMixin href "" "qlam_core.plugins.common.mixins.ListMixin"
click qlam_core.plugins.common.mixins.ReadMixin href "" "qlam_core.plugins.common.mixins.ReadMixin"
click qlam_core.plugins.common.mixins.WriteMixin href "" "qlam_core.plugins.common.mixins.WriteMixin"
Client for task operations.
This API provides explicit methods for task management that return Pydantic v2 models. It's presentation-free and can be used by any frontend (CLI, Web, GUI) or directly by Python consumers.
All methods automatically resolve QPU mode from configuration when not explicitly provided, using the @auto_resolve_qpu_mode decorator.
The client uses composition of mixins to provide standard CRUD operations
- ListMixin: Provides list, list_page, iter_pages, list_all
- ReadMixin: Provides get
- WriteMixin: Provides create
Resource-specific operations (like cancel) are implemented directly in this class.
Example
# Create client
client = TasksClient(ctx)
# List operations (from ListMixin)
page = client.list_page(page=0, size=50)
all_tasks = client.list_all(max_items=1000)
# Read operations (from ReadMixin)
task = client.get(id="abc-123")
# Write operations (from WriteMixin)
request = TaskCreationRequest(...)
new_task = client.create(body=request)
# Resource-specific operations
cancelled = client.cancel(id="abc-123")
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/tasks/api/client.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
cancel
cancel(qpu_mode: str | None = None, id: str | None = None) -> None
Request cancellation of a running task.
This method is a thin wrapper around the /cancel endpoint:
- On success (HTTP 202), it returns
None, indicating that the cancellation request was accepted and is being processed. - On failure (HTTP status >= 400 or network error), it propagates
the underlying exception (typically :class:
qlam_core.cli.errors.APIError).
Source code in qlam_core/plugins/tasks/api/client.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
Results Client
Results Client - API for retrieving task results.
Provides access to sanitized results via the Results Transformer by default, and unsanitized (raw) results via the Result Manager when requested.
ResultsClient
ResultsClient(ctx: AppContext)
Bases: BaseRestApi
flowchart TD
qlam_core.plugins.results.api.client.ResultsClient[ResultsClient]
qlam_core.sdk.base_api.BaseRestApi[BaseRestApi]
qlam_core.sdk.base_api.BaseRestApi --> qlam_core.plugins.results.api.client.ResultsClient
click qlam_core.plugins.results.api.client.ResultsClient href "" "qlam_core.plugins.results.api.client.ResultsClient"
click qlam_core.sdk.base_api.BaseRestApi href "" "qlam_core.sdk.base_api.BaseRestApi"
Client for task results retrieval.
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/results/api/client.py
26 27 28 29 30 31 | |
download_to_path
download_to_path(output_path: str | PathLike[str], qpu_mode: str | None = None, id: str | None = None, *, raw_source: bool = False, sort: str | None = None) -> int
Stream the full task result response directly to output_path.
Source code in qlam_core/plugins/results/api/client.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
get
get(qpu_mode: str | None = None, id: str | None = None, *, raw_source: bool = False, page: int = 0, size: int | None = None, sort: str | None = None, shots_page: int | None = None, shots_size: int | None = None) -> JsonDict
Get task results.
- Default (sanitized): Results Transformer endpoint (requires qpu_mode).
- Raw (unsanitized): Result Manager endpoint (--raw flag).
- If
sortis omitted, backend defaults are preserved.
Source code in qlam_core/plugins/results/api/client.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
Compilations Client
Compilations API - Clean Python API for compilation operations.
This module provides a typed, presentation-free API for compilation management. It uses the executor abstraction to perform HTTP operations and returns strongly-typed Pydantic models.
CompilationsClient
CompilationsClient(ctx: AppContext)
Bases: BaseRestApi, ListMixin[PublicCompilation], ReadMixin[PrivateCompilation], WriteMixin[V2QpuModeCompilationsPostRequest, PrivateCompilation]
flowchart TD
qlam_core.plugins.compilations.api.client.CompilationsClient[CompilationsClient]
qlam_core.sdk.base_api.BaseRestApi[BaseRestApi]
qlam_core.plugins.common.mixins.ListMixin[ListMixin]
qlam_core.plugins.common.mixins.ReadMixin[ReadMixin]
qlam_core.plugins.common.mixins.WriteMixin[WriteMixin]
qlam_core.sdk.base_api.BaseRestApi --> qlam_core.plugins.compilations.api.client.CompilationsClient
qlam_core.plugins.common.mixins.ListMixin --> qlam_core.plugins.compilations.api.client.CompilationsClient
qlam_core.plugins.common.mixins.ReadMixin --> qlam_core.plugins.compilations.api.client.CompilationsClient
qlam_core.plugins.common.mixins.WriteMixin --> qlam_core.plugins.compilations.api.client.CompilationsClient
click qlam_core.plugins.compilations.api.client.CompilationsClient href "" "qlam_core.plugins.compilations.api.client.CompilationsClient"
click qlam_core.sdk.base_api.BaseRestApi href "" "qlam_core.sdk.base_api.BaseRestApi"
click qlam_core.plugins.common.mixins.ListMixin href "" "qlam_core.plugins.common.mixins.ListMixin"
click qlam_core.plugins.common.mixins.ReadMixin href "" "qlam_core.plugins.common.mixins.ReadMixin"
click qlam_core.plugins.common.mixins.WriteMixin href "" "qlam_core.plugins.common.mixins.WriteMixin"
Typed API for compilation operations.
This API provides explicit methods for compilation management that return Pydantic v2 models. It's presentation-free and can be used by any frontend (CLI, Web, GUI) or directly by Python consumers.
All methods automatically resolve QPU mode from configuration when not explicitly provided, using the @auto_resolve_qpu_mode decorator.
The client uses composition of mixins to provide standard CRUD operations
- ListMixin: Provides list, list_page, iter_pages, list_all
- ReadMixin: Provides get
- WriteMixin: Provides create
Example
# Create client
client = CompilationsClient(ctx)
# List operations
page = client.list_page(page=0, size=50)
all_compilations = client.list_all(max_items=1000)
# Read operations
compilation = client.get(id="abc-123")
# Write operations
request = V2QpuModeCompilationsPostRequest(...)
new_compilation = client.create(body=request)
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/compilations/api/client.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
Definitions Client
Definitions API - Clean Python API for task definition operations.
This module provides a typed, presentation-free API for task definition management. It uses the executor abstraction to perform HTTP operations and returns strongly-typed Pydantic models.
DefinitionsClient
DefinitionsClient(ctx: AppContext)
Bases: BaseRestApi, ListMixin[TaskDefinitionResponse], ReadMixin[TaskDefinitionResponse], WriteMixin[TaskDefinitionRequest, TaskDefinitionResponse]
flowchart TD
qlam_core.plugins.definitions.api.client.DefinitionsClient[DefinitionsClient]
qlam_core.sdk.base_api.BaseRestApi[BaseRestApi]
qlam_core.plugins.common.mixins.ListMixin[ListMixin]
qlam_core.plugins.common.mixins.ReadMixin[ReadMixin]
qlam_core.plugins.common.mixins.WriteMixin[WriteMixin]
qlam_core.sdk.base_api.BaseRestApi --> qlam_core.plugins.definitions.api.client.DefinitionsClient
qlam_core.plugins.common.mixins.ListMixin --> qlam_core.plugins.definitions.api.client.DefinitionsClient
qlam_core.plugins.common.mixins.ReadMixin --> qlam_core.plugins.definitions.api.client.DefinitionsClient
qlam_core.plugins.common.mixins.WriteMixin --> qlam_core.plugins.definitions.api.client.DefinitionsClient
click qlam_core.plugins.definitions.api.client.DefinitionsClient href "" "qlam_core.plugins.definitions.api.client.DefinitionsClient"
click qlam_core.sdk.base_api.BaseRestApi href "" "qlam_core.sdk.base_api.BaseRestApi"
click qlam_core.plugins.common.mixins.ListMixin href "" "qlam_core.plugins.common.mixins.ListMixin"
click qlam_core.plugins.common.mixins.ReadMixin href "" "qlam_core.plugins.common.mixins.ReadMixin"
click qlam_core.plugins.common.mixins.WriteMixin href "" "qlam_core.plugins.common.mixins.WriteMixin"
Typed API for task definition operations.
This API provides explicit methods for task definition management that return Pydantic v2 models. It's presentation-free and can be used by any frontend (CLI, Web, GUI) or directly by Python consumers.
All methods automatically resolve QPU mode from configuration when not explicitly provided, using the @auto_resolve_qpu_mode decorator.
The client uses composition of mixins to provide standard CRUD operations
- ListMixin: Provides list, list_page, iter_pages, list_all
- ReadMixin: Provides get
- WriteMixin: Provides create
Example
# Create client
client = DefinitionsClient(ctx)
# List operations
page = client.list_page(page=0, size=50)
all_definitions = client.list_all(max_items=1000)
# Read operations
definition = client.get(id="abc-123")
# Write operations
definition = TaskDefinitionRequest(...)
new_definition = client.create(body=definition)
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/definitions/api/client.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
Tenants Client
Tenants Client - Clean Python API for tenant management.
This module provides a typed, presentation-free API for tenant lifecycle and tenant audience management. It talks to the non-QPU-scoped user-tenant service and returns strongly-typed Pydantic models.
Usage
from qlam_core.common.context import AppContext
from qlam_core.plugins.tenants import TenantsClient
ctx = AppContext()
with TenantsClient(ctx) as client:
first_page = client.list_page(size=25)
tenant = client.get(id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
access = client.get_audiences(id=tenant.id)
TenantsClient
TenantsClient(ctx: AppContext)
Bases: BaseRestApiWithoutQpuMode
flowchart TD
qlam_core.plugins.tenants.api.client.TenantsClient[TenantsClient]
qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode[BaseRestApiWithoutQpuMode]
qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode --> qlam_core.plugins.tenants.api.client.TenantsClient
click qlam_core.plugins.tenants.api.client.TenantsClient href "" "qlam_core.plugins.tenants.api.client.TenantsClient"
click qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode href "" "qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode"
Typed API for tenant and tenant-audience operations.
This client provides explicit methods for listing, creating, and retrieving tenants, plus reading and replacing tenant audience access configuration.
Unlike QPU-scoped clients such as TasksClient, this client targets the
user-tenant service and therefore does not accept or resolve qpu_mode.
The tenants endpoints are public-only and reject Visibility.PRIVATE.
Example
client = TenantsClient(ctx)
page = client.list_page(page=0, size=50)
tenant = client.get(id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
audiences = client.get_audiences(id=tenant.id)
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/tenants/api/client.py
59 60 61 62 63 64 | |
create
create(body: CreateTenantRequest | dict[str, object]) -> TenantResponse
Create a tenant.
:param body: A validated request model or a JSON-like dictionary.
:returns: The created tenant as a TenantResponse.
Source code in qlam_core/plugins/tenants/api/client.py
171 172 173 174 175 176 177 178 179 180 181 | |
get
get(id: UUID | str) -> TenantResponse
Fetch one tenant by UUID.
:param id: Tenant UUID as a UUID or UUID string.
:returns: The validated tenant response model.
Source code in qlam_core/plugins/tenants/api/client.py
159 160 161 162 163 164 165 166 167 168 169 | |
get_audiences
get_audiences(id: UUID | str) -> TenantQpuAccess
Fetch configured tenant audience access.
:param id: Tenant UUID as a UUID or UUID string.
:returns: The tenant's configured TenantQpuAccess payload.
Source code in qlam_core/plugins/tenants/api/client.py
183 184 185 186 187 188 189 190 191 192 193 | |
iter_pages
iter_pages(start_page: int = 0, size: int | None = None, max_pages: int | None = None) -> Iterator[Page[TenantResponse]]
Yield tenant pages lazily.
Use this when you want to stream through paginated results without collecting every tenant in memory up front.
:param start_page: Zero-based page index to start from. :param size: Optional page size. :param max_pages: Optional maximum number of pages to yield. :returns: An iterator of typed tenant pages.
Source code in qlam_core/plugins/tenants/api/client.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
list
list(page: int = 0, size: int | None = None) -> list[TenantResponse]
Return tenants from a single page.
This is a convenience wrapper around :meth:list_page that returns
only the page items.
Source code in qlam_core/plugins/tenants/api/client.py
92 93 94 95 96 97 98 | |
list_all
list_all(size: int | None = None, max_items: int | None = None) -> list[TenantResponse]
Return tenants across all pages.
This eagerly collects items from :meth:iter_pages into a single list.
:param size: Optional page size.
:param max_items: Optional cap on the total number of items returned.
:returns: A list of TenantResponse objects.
Source code in qlam_core/plugins/tenants/api/client.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
list_page
list_page(page: int = 0, size: int | None = None) -> Page[TenantResponse]
Return one page of tenants.
:param page: Zero-based page index.
:param size: Optional page size. If omitted, the server default is used.
:returns: A typed page of TenantResponse items.
Source code in qlam_core/plugins/tenants/api/client.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
set_audiences
set_audiences(id: UUID | str, body: TenantQpuAccess | dict[str, object]) -> TenantQpuAccess
Replace configured tenant audience access.
The backend validates the canonical audience URIs in the request and will reject duplicate or unknown entries.
:param id: Tenant UUID as a UUID or UUID string.
:param body: A validated TenantQpuAccess model or JSON-like dict.
:returns: The updated tenant audience configuration.
Source code in qlam_core/plugins/tenants/api/client.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
Users Client
Users Client - Clean Python API for user management.
This module provides a typed, presentation-free API for user lifecycle, user detail, and user role management. It talks to the non-QPU-scoped user-tenant service and returns strongly-typed Pydantic models.
Usage
from qlam_core.common.context import AppContext
from qlam_core.plugins.users import UsersClient
ctx = AppContext()
with UsersClient(ctx) as client:
page = client.list_page(size=25)
user = client.get(id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
roles = client.get_roles(id=user.id)
UsersClient
UsersClient(ctx: AppContext)
Bases: BaseRestApiWithoutQpuMode
flowchart TD
qlam_core.plugins.users.api.client.UsersClient[UsersClient]
qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode[BaseRestApiWithoutQpuMode]
qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode --> qlam_core.plugins.users.api.client.UsersClient
click qlam_core.plugins.users.api.client.UsersClient href "" "qlam_core.plugins.users.api.client.UsersClient"
click qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode href "" "qlam_core.sdk.base_api.BaseRestApiWithoutQpuMode"
Typed API for user and user-role operations.
This client provides explicit methods for listing, creating, updating, and retrieving users, along with helpers for role-assignment and password-change endpoints.
Unlike QPU-scoped clients such as TasksClient, this client targets the
user-tenant service and therefore does not accept or resolve qpu_mode.
Role updates use the service's bare JSON list request body rather than a
wrapper object. The users endpoints are public-only and reject
Visibility.PRIVATE.
Example
client = UsersClient(ctx)
page = client.list_page(page=0, size=50)
user = client.get(id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
roles = client.get_roles(id=user.id)
:param ctx: Application context with configuration and auth.
Source code in qlam_core/plugins/users/api/client.py
99 100 101 102 103 104 | |
change_password
change_password(id: UUID | str) -> None
Trigger the backend change-password flow for a user.
The underlying endpoint returns HTTP 204 with no response body on
success, so this method returns None.
:param id: User UUID as a UUID or UUID string.
Source code in qlam_core/plugins/users/api/client.py
383 384 385 386 387 388 389 390 391 392 393 394 | |
create
create(body: CreateUserRequest | dict[str, object]) -> UserResponse
Create a user.
:param body: A validated request model or a JSON-like dictionary.
:returns: The created user as a UserResponse.
Source code in qlam_core/plugins/users/api/client.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
get
get(id: UUID | str) -> UserResponse
Fetch one user by UUID.
:param id: User UUID as a UUID or UUID string.
:returns: The validated user response model.
Source code in qlam_core/plugins/users/api/client.py
285 286 287 288 289 290 291 292 293 294 295 | |
get_details
get_details(id: UUID | str) -> UserDetailsResponse
Fetch the detailed user profile.
:param id: User UUID as a UUID or UUID string.
:returns: The validated UserDetailsResponse model.
Source code in qlam_core/plugins/users/api/client.py
336 337 338 339 340 341 342 343 344 345 346 | |
get_roles
get_roles(id: UUID | str) -> list[RoleAssignment]
Fetch the user's role assignments.
:param id: User UUID as a UUID or UUID string.
:returns: A validated list of RoleAssignment objects.
Source code in qlam_core/plugins/users/api/client.py
348 349 350 351 352 353 354 355 356 357 358 | |
iter_pages
iter_pages(start_page: int = 0, size: int | None = None, sort: str | None = DEFAULT_USER_SORT_ORDER, tenant_id: UUID | str | None = None, id: list[UUID | str] | None = None, name: list[str] | None = None, email: list[str] | None = None, auth_provider: list[str] | None = None, max_pages: int | None = None) -> Iterator[Page[UserResponse]]
Yield user pages lazily.
Use this when you want to stream through paginated results without collecting every user in memory up front.
:param start_page: Zero-based page index to start from. :param size: Optional page size. :param sort: Optional sort expression applied to every fetched page. :param tenant_id: Optional tenant UUID filter applied to every page. :param id: Optional user UUID filters applied to every page. :param name: Optional name filters applied to every page. :param email: Optional email filters applied to every page. :param auth_provider: Optional auth provider filters applied to every page. :param max_pages: Optional maximum number of pages to yield. :returns: An iterator of typed user pages.
Source code in qlam_core/plugins/users/api/client.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
list
list(page: int = 0, size: int | None = None, sort: str | None = DEFAULT_USER_SORT_ORDER, tenant_id: UUID | str | None = None, id: list[UUID | str] | None = None, name: list[str] | None = None, email: list[str] | None = None, auth_provider: list[str] | None = None) -> list[UserResponse]
Return users from a single page.
This is a convenience wrapper around :meth:list_page that returns
only the page items.
Filter parameters match :meth:list_page.
Source code in qlam_core/plugins/users/api/client.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
list_all
list_all(size: int | None = None, sort: str | None = DEFAULT_USER_SORT_ORDER, tenant_id: UUID | str | None = None, id: list[UUID | str] | None = None, name: list[str] | None = None, email: list[str] | None = None, auth_provider: list[str] | None = None, max_items: int | None = None) -> list[UserResponse]
Return users across all pages.
This eagerly collects items from :meth:iter_pages into a single list.
:param size: Optional page size.
:param sort: Optional sort expression applied to every fetched page.
:param tenant_id: Optional tenant UUID filter.
:param id: Optional user UUID filters.
:param name: Optional name filters.
:param email: Optional email filters.
:param auth_provider: Optional auth provider filters.
:param max_items: Optional cap on the total number of items returned.
:returns: A list of UserResponse objects.
Source code in qlam_core/plugins/users/api/client.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
list_page
list_page(page: int = 0, size: int | None = None, sort: str | None = DEFAULT_USER_SORT_ORDER, tenant_id: UUID | str | None = None, id: list[UUID | str] | None = None, name: list[str] | None = None, email: list[str] | None = None, auth_provider: list[str] | None = None) -> Page[UserResponse]
Return one page of users.
:param page: Zero-based page index.
:param size: Optional page size. If omitted, the server default is used.
:param sort: Optional sort expression. Defaults to created_date,DESC.
:param tenant_id: Optional tenant UUID filter.
:param id: Optional user UUID filters. Repeated values are ORed.
:param name: Optional name filters using contains-style wildcard search.
:param email: Optional email filters using exact match.
:param auth_provider: Optional auth provider filters using exact match.
:returns: A typed page of UserResponse items.
Source code in qlam_core/plugins/users/api/client.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
set_roles
set_roles(id: UUID | str, roles: list[RoleAssignment] | list[dict[str, object]]) -> list[RoleAssignment]
Replace the user's role assignments with a bare JSON list body.
:param id: User UUID as a UUID or UUID string.
:param roles: A list of validated role models or JSON-like dictionaries.
:returns: The updated list of RoleAssignment objects.
Source code in qlam_core/plugins/users/api/client.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
update
update(id: UUID | str, body: PatchUserRequest | dict[str, object]) -> UserResponse
Patch user profile fields.
:param id: User UUID as a UUID or UUID string.
:param body: A validated patch model or a JSON-like dictionary.
:returns: The updated user as a UserResponse.
Source code in qlam_core/plugins/users/api/client.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |