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

Method accept_invitation

sdk/agenta/client/client.py:852–942  ·  view source on GitHub ↗

Accept an invitation to a workspace. Raises: HTTPException: _description_; status_code: 500 HTTPException: Invitation not found or has expired; status_code: 400 HTTPException: You already belong to this organization; status_code: 400 Ret

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

Source from the content-addressed store, hash-verified

850 raise ApiError(status_code=_response.status_code, body=_response_json)
851
852 def accept_invitation(
853 self,
854 org_id: str,
855 workspace_id: str,
856 *,
857 project_id: str,
858 token: str,
859 request_options: typing.Optional[RequestOptions] = None,
860 ) -> typing.Optional[typing.Any]:
861 """
862 Accept an invitation to a workspace.
863
864 Raises:
865 HTTPException: _description_; status_code: 500
866 HTTPException: Invitation not found or has expired; status_code: 400
867 HTTPException: You already belong to this organization; status_code: 400
868
869 Returns:
870 JSONResponse: Accepted invitation to workspace; status_code: 200
871
872 Parameters
873 ----------
874 org_id : str
875
876 workspace_id : str
877
878 project_id : str
879
880 token : str
881
882 request_options : typing.Optional[RequestOptions]
883 Request-specific configuration.
884
885 Returns
886 -------
887 typing.Optional[typing.Any]
888 Successful Response
889
890 Examples
891 --------
892 from agenta import AgentaApi
893
894 client = AgentaApi(
895 api_key="YOUR_API_KEY",
896 base_url="https://yourhost.com/path/to/api",
897 )
898 client.accept_invitation(
899 org_id="org_id",
900 workspace_id="workspace_id",
901 project_id="project_id",
902 token="token",
903 )
904 """
905 _response = self._client_wrapper.httpx_client.request(
906 f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept",
907 method="POST",
908 params={
909 "project_id": project_id,

Callers

nothing calls this directly

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