MCPcopy
hub / github.com/Agenta-AI/agenta / remove_user_from_workspace

Method remove_user_from_workspace

sdk/agenta/client/client.py:1398–1482  ·  view source on GitHub ↗

Remove a user from a workspace. Parameters: - payload (UserRole): The payload containing the user email and organization ID. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. Returns: - Workspace

(
        self,
        workspace_id: str,
        *,
        org_id: str,
        email: str,
        request_options: typing.Optional[RequestOptions] = None,
    )

Source from the content-addressed store, hash-verified

1396 raise ApiError(status_code=_response.status_code, body=_response_json)
1397
1398 def remove_user_from_workspace(
1399 self,
1400 workspace_id: str,
1401 *,
1402 org_id: str,
1403 email: str,
1404 request_options: typing.Optional[RequestOptions] = None,
1405 ) -> WorkspaceResponse:
1406 """
1407 Remove a user from a workspace.
1408
1409 Parameters:
1410 - payload (UserRole): The payload containing the user email and organization ID.
1411 - workspace_id (str): The ID of the workspace.
1412 - request (Request): The FastAPI request object.
1413
1414 Returns:
1415 - WorkspaceResponse: The updated workspace.
1416
1417 Raises:
1418 - HTTPException: If the user does not have permission to perform this action.
1419 - HTTPException: If there is an error during the removal process.
1420
1421 Parameters
1422 ----------
1423 workspace_id : str
1424
1425 org_id : str
1426
1427 email : str
1428
1429 request_options : typing.Optional[RequestOptions]
1430 Request-specific configuration.
1431
1432 Returns
1433 -------
1434 WorkspaceResponse
1435 Successful Response
1436
1437 Examples
1438 --------
1439 from agenta import AgentaApi
1440
1441 client = AgentaApi(
1442 api_key="YOUR_API_KEY",
1443 base_url="https://yourhost.com/path/to/api",
1444 )
1445 client.remove_user_from_workspace(
1446 workspace_id="workspace_id",
1447 org_id="org_id",
1448 email="email",
1449 )
1450 """
1451 _response = self._client_wrapper.httpx_client.request(
1452 f"workspaces/{jsonable_encoder(workspace_id)}/users",
1453 method="DELETE",
1454 params={
1455 "org_id": org_id,

Callers 1

Calls 6

jsonable_encoderFunction · 0.90
parse_obj_asFunction · 0.85
jsonMethod · 0.80
ApiErrorClass · 0.50
requestMethod · 0.45

Tested by

no test coverage detected