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

Method create_organization

sdk/agenta/client/client.py:421–499  ·  view source on GitHub ↗

Parameters ---------- name : str owner : str description : typing.Optional[str] type : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns -------

(
        self,
        *,
        name: str,
        owner: str,
        description: typing.Optional[str] = OMIT,
        type: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    )

Source from the content-addressed store, hash-verified

419 raise ApiError(status_code=_response.status_code, body=_response_json)
420
421 def create_organization(
422 self,
423 *,
424 name: str,
425 owner: str,
426 description: typing.Optional[str] = OMIT,
427 type: typing.Optional[str] = OMIT,
428 request_options: typing.Optional[RequestOptions] = None,
429 ) -> typing.Optional[typing.Any]:
430 """
431 Parameters
432 ----------
433 name : str
434
435 owner : str
436
437 description : typing.Optional[str]
438
439 type : typing.Optional[str]
440
441 request_options : typing.Optional[RequestOptions]
442 Request-specific configuration.
443
444 Returns
445 -------
446 typing.Optional[typing.Any]
447 Successful Response
448
449 Examples
450 --------
451 from agenta import AgentaApi
452
453 client = AgentaApi(
454 api_key="YOUR_API_KEY",
455 base_url="https://yourhost.com/path/to/api",
456 )
457 client.create_organization(
458 name="name",
459 owner="owner",
460 )
461 """
462 _response = self._client_wrapper.httpx_client.request(
463 "organizations",
464 method="POST",
465 json={
466 "name": name,
467 "owner": owner,
468 "description": description,
469 "type": type,
470 },
471 headers={
472 "content-type": "application/json",
473 },
474 request_options=request_options,
475 omit=OMIT,
476 )
477 try:
478 if 200 <= _response.status_code < 300:

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected