Skip to content

Admin Manage API

The AdminManageAPI client exposes four admin-only read-form endpoints added in v0.6.0.

Resource grouping

All four endpoints are grouped under client.admin_manage (D-v0.6-1), separate from the posts, users, or catalogs resource clients. They are admin-only and propaedeutic to the future write surface (deferred to v1.0+).

Endpoint scope

Each endpoint returns the full editable state of an entity plus an occToken (optimistic concurrency token) for use by future write operations. The occToken is carried through each facade's .raw escape hatch — it is never surfaced as a narrow property (D-v0.6-2).

Method Path Facade
workspace_for_edit admin/manage/workspaces/{workspaceId}/edit WorkspaceForEdit
catalog_for_edit admin/manage/catalogs/{catalogId}/edit CatalogForEdit
catalog_entry_for_edit admin/manage/catalogs/{catalogId}/entries/{entryId}/edit CatalogEntryForEdit
user_credentials_for_edit admin/manage/users/{userId}/credentials/edit UserCredentialsForEdit

Usage

from pynteracta.client import InteractaClient

with InteractaClient(base_url="https://tenant.example.com", credentials=...) as client:
    # Workspace edit form
    ws = client.admin_manage.workspace_for_edit(88)
    print(ws.id, ws.name, ws.member_users_count)
    print(ws.raw.occToken)  # occToken only on .raw — for future write use

    # Catalog edit form
    catalog = client.admin_manage.catalog_for_edit(5)
    print(catalog.id, catalog.name, catalog.community_associations_count)

    # Catalog entry edit form
    entry = client.admin_manage.catalog_entry_for_edit(5, 100)
    print(entry.id, entry.label, entry.external_id, entry.parents_count)

    # User credentials edit form
    creds = client.admin_manage.user_credentials_for_edit(1042)
    print(creds.has_google_credentials, creds.has_custom_credentials, creds.custom_username)

Field curation (Q-v0.6-1)

Narrow facade properties surface the directly-typed scalar fields of each response DTO, plus light convenience accessors that dig one level into the nested editable-content blocks (which the code generator emits as RootModel[Any] stubs) for the human-facing name/label/credential flags. Complex nested structures (the full contentData, communityAssociations, parents, per-provider credential configs) and occToken stay on .raw.

API Reference

pynteracta.api.admin_manage.AdminManageAPI

Bases: ResourceClient

Client for the admin/manage edit (read-form) endpoints.

These are admin-only read helpers, propaedeutic to the future write surface. Each returns the entity's editable state and an occToken (only on the facade .raw).

workspace_for_edit(workspace_id)

GET /admin/manage/workspaces/{workspaceId}/edit.

Parameters:

Name Type Description Default
workspace_id int

The workspace ID to fetch.

required

catalog_for_edit(catalog_id)

GET /admin/manage/catalogs/{catalogId}/edit.

Parameters:

Name Type Description Default
catalog_id int

The catalog ID to fetch.

required

catalog_entry_for_edit(catalog_id, entry_id)

GET /admin/manage/catalogs/{catalogId}/entries/{entryId}/edit.

Parameters:

Name Type Description Default
catalog_id int

The catalog ID owning the entry.

required
entry_id int

The catalog entry ID to fetch.

required

user_credentials_for_edit(user_id)

GET /admin/manage/users/{userId}/credentials/edit.

Parameters:

Name Type Description Default
user_id int

The user ID whose credentials to fetch.

required

Facade Reference

pynteracta.models.facade.admin_manage.WorkspaceForEdit

Narrow facade over :class:~generated.GetWorkspaceForEditResponseDTO.

The editable payload (name, description, members, …) lives in contentData, which the generator emits as a RootModel[Any] stub; :attr:name and :attr:description re-validate it into the typed sibling for convenience. occToken is only on .raw — it is the propaedeutic edit token for the future write surface.

Attributes:

Name Type Description
raw

The underlying generated DTO; access additional fields via this escape hatch.

Source code in src/pynteracta/models/facade/admin_manage.py
class WorkspaceForEdit:
    """Narrow facade over :class:`~generated.GetWorkspaceForEditResponseDTO`.

    The editable payload (``name``, ``description``, members, …) lives in ``contentData``, which
    the generator emits as a ``RootModel[Any]`` stub; :attr:`name` and :attr:`description`
    re-validate it into the typed sibling for convenience. ``occToken`` is only on ``.raw`` — it is
    the propaedeutic edit token for the future write surface.

    Attributes:
        raw: The underlying generated DTO; access additional fields via this escape hatch.
    """

    def __init__(self, raw: generated.GetWorkspaceForEditResponseDTO) -> None:
        self.raw = raw
        self._content = self._typed_content(raw)

    @staticmethod
    def _typed_content(
        raw: generated.GetWorkspaceForEditResponseDTO,
    ) -> generated.WorkspaceEditableContentDataDTO1 | None:
        if raw.contentData is None:
            return None
        root = _resolve_root(raw.contentData)
        if isinstance(root, dict):
            return generated.WorkspaceEditableContentDataDTO1.model_validate(root)
        return None

    @property
    def id(self) -> int | None:
        return self.raw.id

    @property
    def name(self) -> str | None:
        """Workspace name (from the editable ``contentData`` block)."""
        return self._content.name if self._content is not None else None

    @property
    def description(self) -> dict[str, str] | None:
        """Internationalized description map (from ``contentData``)."""
        return self._content.description if self._content is not None else None

    @property
    def admin_users_count(self) -> int | None:
        return self.raw.adminUsersCount

    @property
    def admin_groups_count(self) -> int | None:
        return self.raw.adminGroupsCount

    @property
    def member_users_count(self) -> int | None:
        return self.raw.memberUsersCount

    @property
    def member_groups_count(self) -> int | None:
        return self.raw.memberGroupsCount

    @property
    def creation_timestamp(self) -> int | None:
        return self.raw.creationTimestamp

    @property
    def last_modify_timestamp(self) -> int | None:
        return self.raw.lastModifyTimestamp

    @classmethod
    def from_dict(cls, data: dict) -> WorkspaceForEdit:  # type: ignore[type-arg]
        """Parse from a raw API response dict."""
        return cls(generated.GetWorkspaceForEditResponseDTO.model_validate(data))

description property

Internationalized description map (from contentData).

name property

Workspace name (from the editable contentData block).

from_dict(data) classmethod

Parse from a raw API response dict.

Source code in src/pynteracta/models/facade/admin_manage.py
@classmethod
def from_dict(cls, data: dict) -> WorkspaceForEdit:  # type: ignore[type-arg]
    """Parse from a raw API response dict."""
    return cls(generated.GetWorkspaceForEditResponseDTO.model_validate(data))

pynteracta.models.facade.admin_manage.CatalogForEdit

Narrow facade over :class:~generated.GetCatalogForEditResponseDTO.

The editable payload (name map, parentCatalog, deleted) lives in contentData, a RootModel[Any] stub re-validated into its typed sibling for :attr:name and :attr:deleted. communityAssociations (the communities using this catalog) is summarized by :attr:community_associations_count; the full list stays on .raw. occToken is only on .raw.

Attributes:

Name Type Description
raw

The underlying generated DTO; access additional fields via this escape hatch.

Source code in src/pynteracta/models/facade/admin_manage.py
class CatalogForEdit:
    """Narrow facade over :class:`~generated.GetCatalogForEditResponseDTO`.

    The editable payload (``name`` map, ``parentCatalog``, ``deleted``) lives in ``contentData``,
    a ``RootModel[Any]`` stub re-validated into its typed sibling for :attr:`name` and
    :attr:`deleted`. ``communityAssociations`` (the communities using this catalog) is summarized
    by :attr:`community_associations_count`; the full list stays on ``.raw``. ``occToken`` is only
    on ``.raw``.

    Attributes:
        raw: The underlying generated DTO; access additional fields via this escape hatch.
    """

    def __init__(self, raw: generated.GetCatalogForEditResponseDTO) -> None:
        self.raw = raw
        self._content = self._typed_content(raw)

    @staticmethod
    def _typed_content(
        raw: generated.GetCatalogForEditResponseDTO,
    ) -> generated.CatalogEditableContentDTOModel | None:
        if raw.contentData is None:
            return None
        root = _resolve_root(raw.contentData)
        if isinstance(root, dict):
            return generated.CatalogEditableContentDTOModel.model_validate(root)
        return None

    @property
    def id(self) -> int | None:
        return self.raw.id

    @property
    def name(self) -> dict[str, str] | None:
        """Internationalized catalog name map (from ``contentData``)."""
        return self._content.name if self._content is not None else None

    @property
    def deleted(self) -> bool | None:
        """Whether the catalog is logically deleted (from ``contentData``)."""
        return self._content.deleted if self._content is not None else None

    @property
    def community_associations_count(self) -> int | None:
        """Number of communities that use this catalog."""
        assocs = self.raw.communityAssociations
        return len(assocs) if assocs is not None else None

    @classmethod
    def from_dict(cls, data: dict) -> CatalogForEdit:  # type: ignore[type-arg]
        """Parse from a raw API response dict."""
        return cls(generated.GetCatalogForEditResponseDTO.model_validate(data))

community_associations_count property

Number of communities that use this catalog.

deleted property

Whether the catalog is logically deleted (from contentData).

name property

Internationalized catalog name map (from contentData).

from_dict(data) classmethod

Parse from a raw API response dict.

Source code in src/pynteracta/models/facade/admin_manage.py
@classmethod
def from_dict(cls, data: dict) -> CatalogForEdit:  # type: ignore[type-arg]
    """Parse from a raw API response dict."""
    return cls(generated.GetCatalogForEditResponseDTO.model_validate(data))

pynteracta.models.facade.admin_manage.CatalogEntryForEdit

Narrow facade over :class:~generated.GetCatalogEntryForEditResponseDTO.

All surfaced fields are directly typed on the response DTO. label is an internationalized map; parents (the hierarchical parent chain) is summarized by :attr:parents_count, with the full list available on .raw. occToken is only on .raw.

Attributes:

Name Type Description
raw

The underlying generated DTO; access additional fields via this escape hatch.

Source code in src/pynteracta/models/facade/admin_manage.py
class CatalogEntryForEdit:
    """Narrow facade over :class:`~generated.GetCatalogEntryForEditResponseDTO`.

    All surfaced fields are directly typed on the response DTO. ``label`` is an internationalized
    map; ``parents`` (the hierarchical parent chain) is summarized by :attr:`parents_count`, with
    the full list available on ``.raw``. ``occToken`` is only on ``.raw``.

    Attributes:
        raw: The underlying generated DTO; access additional fields via this escape hatch.
    """

    def __init__(self, raw: generated.GetCatalogEntryForEditResponseDTO) -> None:
        self.raw = raw

    @property
    def id(self) -> int | None:
        return self.raw.id

    @property
    def label(self) -> dict[str, str] | None:
        """Internationalized entry label map."""
        return self.raw.label

    @property
    def external_id(self) -> str | None:
        return self.raw.externalId

    @property
    def deleted(self) -> bool | None:
        return self.raw.deleted

    @property
    def parents_count(self) -> int | None:
        """Number of parent entries (hierarchical dependency chain)."""
        parents = self.raw.parents
        return len(parents) if parents is not None else None

    @classmethod
    def from_dict(cls, data: dict) -> CatalogEntryForEdit:  # type: ignore[type-arg]
        """Parse from a raw API response dict."""
        return cls(generated.GetCatalogEntryForEditResponseDTO.model_validate(data))

label property

Internationalized entry label map.

parents_count property

Number of parent entries (hierarchical dependency chain).

from_dict(data) classmethod

Parse from a raw API response dict.

Source code in src/pynteracta/models/facade/admin_manage.py
@classmethod
def from_dict(cls, data: dict) -> CatalogEntryForEdit:  # type: ignore[type-arg]
    """Parse from a raw API response dict."""
    return cls(generated.GetCatalogEntryForEditResponseDTO.model_validate(data))

pynteracta.models.facade.admin_manage.UserCredentialsForEdit

Narrow facade over :class:~generated.GetUserCredentialsForEditResponseDTO.

The response has no entity id (the user id is the path parameter). The credentials payload lives in userCredentialsConfiguration, a RootModel[Any] stub re-validated into its typed sibling. Narrow properties expose which credential kinds are configured plus the custom username/active flags; the full per-provider configuration stays on .raw. occToken is only on .raw.

Attributes:

Name Type Description
raw

The underlying generated DTO; access additional fields via this escape hatch.

Source code in src/pynteracta/models/facade/admin_manage.py
class UserCredentialsForEdit:
    """Narrow facade over :class:`~generated.GetUserCredentialsForEditResponseDTO`.

    The response has no entity id (the user id is the path parameter). The credentials payload
    lives in ``userCredentialsConfiguration``, a ``RootModel[Any]`` stub re-validated into its
    typed sibling. Narrow properties expose which credential kinds are configured plus the custom
    username/active flags; the full per-provider configuration stays on ``.raw``. ``occToken`` is
    only on ``.raw``.

    Attributes:
        raw: The underlying generated DTO; access additional fields via this escape hatch.
    """

    def __init__(self, raw: generated.GetUserCredentialsForEditResponseDTO) -> None:
        self.raw = raw
        self._config = self._typed_config(raw)

    @staticmethod
    def _typed_config(
        raw: generated.GetUserCredentialsForEditResponseDTO,
    ) -> generated.UserCredentialsConfigurationDTO1 | None:
        if raw.userCredentialsConfiguration is None:
            return None
        root = _resolve_root(raw.userCredentialsConfiguration)
        if isinstance(root, dict):
            return generated.UserCredentialsConfigurationDTO1.model_validate(root)
        return None

    @staticmethod
    def _typed_custom(
        config: generated.UserCredentialsConfigurationDTO1 | None,
    ) -> generated.CustomUserCredentialsConfigurationDTOModel | None:
        if config is None or config.custom is None:
            return None
        root = _resolve_root(config.custom)
        if isinstance(root, dict):
            return generated.CustomUserCredentialsConfigurationDTOModel.model_validate(root)
        return None

    @property
    def has_google_credentials(self) -> bool:
        return self._config is not None and self._config.google is not None

    @property
    def has_microsoft_credentials(self) -> bool:
        return self._config is not None and self._config.microsoft is not None

    @property
    def has_custom_credentials(self) -> bool:
        return self._config is not None and self._config.custom is not None

    @property
    def custom_username(self) -> str | None:
        """Username of the custom (username/password) credentials, if configured."""
        custom = self._typed_custom(self._config)
        return custom.username if custom is not None else None

    @property
    def custom_active(self) -> bool | None:
        """Whether the custom credentials are active, if configured."""
        custom = self._typed_custom(self._config)
        return custom.active if custom is not None else None

    @classmethod
    def from_dict(cls, data: dict) -> UserCredentialsForEdit:  # type: ignore[type-arg]
        """Parse from a raw API response dict."""
        return cls(generated.GetUserCredentialsForEditResponseDTO.model_validate(data))

custom_active property

Whether the custom credentials are active, if configured.

custom_username property

Username of the custom (username/password) credentials, if configured.

from_dict(data) classmethod

Parse from a raw API response dict.

Source code in src/pynteracta/models/facade/admin_manage.py
@classmethod
def from_dict(cls, data: dict) -> UserCredentialsForEdit:  # type: ignore[type-arg]
    """Parse from a raw API response dict."""
    return cls(generated.GetUserCredentialsForEditResponseDTO.model_validate(data))