Parameters ---------- org_id : str workspace_id : str name : typing.Optional[str] description : typing.Optional[str] updated_at : typing.Optional[dt.datetime] request_options : typing.Optional[RequestOptions] Request-s
(
self,
org_id: str,
workspace_id: str,
*,
name: typing.Optional[str] = OMIT,
description: typing.Optional[str] = OMIT,
updated_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
)
| 1021 | raise ApiError(status_code=_response.status_code, body=_response_json) |
| 1022 | |
| 1023 | def update_workspace( |
| 1024 | self, |
| 1025 | org_id: str, |
| 1026 | workspace_id: str, |
| 1027 | *, |
| 1028 | name: typing.Optional[str] = OMIT, |
| 1029 | description: typing.Optional[str] = OMIT, |
| 1030 | updated_at: typing.Optional[dt.datetime] = OMIT, |
| 1031 | request_options: typing.Optional[RequestOptions] = None, |
| 1032 | ) -> WorkspaceResponse: |
| 1033 | """ |
| 1034 | Parameters |
| 1035 | ---------- |
| 1036 | org_id : str |
| 1037 | |
| 1038 | workspace_id : str |
| 1039 | |
| 1040 | name : typing.Optional[str] |
| 1041 | |
| 1042 | description : typing.Optional[str] |
| 1043 | |
| 1044 | updated_at : typing.Optional[dt.datetime] |
| 1045 | |
| 1046 | request_options : typing.Optional[RequestOptions] |
| 1047 | Request-specific configuration. |
| 1048 | |
| 1049 | Returns |
| 1050 | ------- |
| 1051 | WorkspaceResponse |
| 1052 | Successful Response |
| 1053 | |
| 1054 | Examples |
| 1055 | -------- |
| 1056 | from agenta import AgentaApi |
| 1057 | |
| 1058 | client = AgentaApi( |
| 1059 | api_key="YOUR_API_KEY", |
| 1060 | base_url="https://yourhost.com/path/to/api", |
| 1061 | ) |
| 1062 | client.update_workspace( |
| 1063 | org_id="org_id", |
| 1064 | workspace_id="workspace_id", |
| 1065 | ) |
| 1066 | """ |
| 1067 | _response = self._client_wrapper.httpx_client.request( |
| 1068 | f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}", |
| 1069 | method="PUT", |
| 1070 | json={ |
| 1071 | "name": name, |
| 1072 | "description": description, |
| 1073 | "updated_at": updated_at, |
| 1074 | }, |
| 1075 | headers={ |
| 1076 | "content-type": "application/json", |
| 1077 | }, |
| 1078 | request_options=request_options, |
| 1079 | omit=OMIT, |
| 1080 | ) |
nothing calls this directly
no test coverage detected