Skip to content

EnterpriseDepartmentGetListRequest

Bases: OCIRequest

Request a list of departments in an enterprise. You may request only the list of departments defined at the enterprise-level, or you may request the list of all departments in the enterprise including all the departments defined within the groups inside the enterprise. The response is either EnterpriseDepartmentGetListResponse or ErrorResponse.

Attributes:

enterprise_id (str):

include_group_departments (bool):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class EnterpriseDepartmentGetListRequest(OCIRequest):
    """Request a list of departments in an enterprise. You may request only the
        list of departments defined at the enterprise-level, or you may request
        the list of all departments in the enterprise including all the departments
        defined within the groups inside the enterprise.
        The response is either EnterpriseDepartmentGetListResponse or ErrorResponse.

    Attributes:

        enterprise_id (str):

        include_group_departments (bool):

    """

    enterprise_id: str = field(metadata={"alias": "enterpriseId"})

    include_group_departments: bool = field(
        metadata={"alias": "includeGroupDepartments"}
    )

Responses

Bases: OCIDataResponse

Response to EnterpriseDepartmentGetListRequest. The response includes two parallel arrays of department keys and department display names.

Attributes:

department_key (Optional[List[DepartmentKey]]):

full_path_name (Optional[List[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class EnterpriseDepartmentGetListResponse(OCIDataResponse):
    """Response to EnterpriseDepartmentGetListRequest.
        The response includes two parallel arrays of department keys and department display names.

    Attributes:

        department_key (Optional[List[DepartmentKey]]):

        full_path_name (Optional[List[str]]):

    """

    department_key: Optional[List[DepartmentKey]] = field(
        default=None, metadata={"alias": "departmentKey"}
    )

    full_path_name: Optional[List[str]] = field(
        default=None, metadata={"alias": "fullPathName"}
    )

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import EnterpriseDepartmentGetListRequest

client = Client()

command = EnterpriseDepartmentGetListRequest(
    enterprise_id=...,
    include_group_departments=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("EnterpriseDepartmentGetListRequest",
    enterprise_id=...,
    include_group_departments=...,
)

print(response)