Skip to main content

aip_sdk.NotificationConfig

aip_sdk.NotificationConfig(data: dict[str, Any], client: APIClient)

A workspace-scoped notification routing destination.

One row = one channel. A workspace wanting both webhook and in-app delivery creates two configs.

The secret argument to create() is sent in the request body but is never returned by the API, so it is never exposed as an instance attribute.

aip_sdk.NotificationConfig.channel​

aip_sdk.NotificationConfig.channel: str = data['channel']

No docstring is defined in the source.

aip_sdk.NotificationConfig.create​

aip_sdk.NotificationConfig.create(workspace_id: str, channel: str, target: str | None = None, secret: str | None = None, event_filter: list[str] | None = None, enabled: bool = True, client: APIClient | None = None) -> NotificationConfig

Create a notification config.

Parameters

  • workspace_id str: Workspace to attach the config to.
  • channel str: "webhook" or "in_app".
  • target str | None: Destination URL for webhook channels; omit for in-app.
  • secret str | None: Optional HMAC signing secret for webhook deliveries. Sent in the request body and stored encrypted by the server; never echoed back, so it never appears on the returned instance.
  • event_filter list[str] | None: Event types to deliver (e.g. ["run.completed"]). Must be non-empty when the request reaches the API.
  • enabled bool: Whether the config is active.
  • client APIClient | None: Explicit API client. Falls back to aip_sdk.get_default_client() when omitted.

Returns

Caller must be a platform admin or a workspace_admin / workspace_editor of workspace_id.

aip_sdk.NotificationConfig.created_at​

aip_sdk.NotificationConfig.created_at: datetime | None = parse_dt(data.get('created_at'))

No docstring is defined in the source.

aip_sdk.NotificationConfig.delete​

aip_sdk.NotificationConfig.delete(client: APIClient | None = None) -> None

Soft-delete this notification config.

The row is preserved on the server with deleted_at set, but is excluded from all subsequent reads — a second delete() on the same instance will raise NotFoundError.

Parameters

  • client APIClient | None: Explicit API client. Defaults to the client this instance was constructed with.

Caller must be a platform admin or a workspace_admin / workspace_editor of the config's workspace.

aip_sdk.NotificationConfig.enabled​

aip_sdk.NotificationConfig.enabled: bool = data['enabled']

No docstring is defined in the source.

aip_sdk.NotificationConfig.event_filter​

aip_sdk.NotificationConfig.event_filter: list[str] = list(data.get('event_filter', []))

No docstring is defined in the source.

aip_sdk.NotificationConfig.id​

aip_sdk.NotificationConfig.id: str = data['id']

No docstring is defined in the source.

aip_sdk.NotificationConfig.list​

aip_sdk.NotificationConfig.list(workspace_id: str | None = None, page: int = 1, per_page: int = 100, client: APIClient | None = None, *, all_workspaces: bool = False) -> list[NotificationConfig]

List notification configs visible to the caller.

Reads your session's workspace unless you name one, and raises if none is set. Pass all_workspaces=True to read across every workspace you can access.

Parameters

  • workspace_id str | None: Optional workspace filter. Filtering by a workspace the caller cannot access raises a ForbiddenError.
  • page int: Page number, 1-indexed.
  • per_page int: Results per page (server max is 100).
  • client APIClient | None: Explicit API client. Falls back to aip_sdk.get_default_client() when omitted.
  • all_workspaces bool: Read across every workspace you can access.

Returns

  • list[NotificationConfig]: A list of NotificationConfig instances, newest first.
  • list[NotificationConfig]: Soft-deleted configs are never included.

Raises

aip_sdk.NotificationConfig.target​

aip_sdk.NotificationConfig.target: str | None = data.get('target')

No docstring is defined in the source.

aip_sdk.NotificationConfig.updated_at​

aip_sdk.NotificationConfig.updated_at: datetime | None = parse_dt(data.get('updated_at'))

No docstring is defined in the source.

aip_sdk.NotificationConfig.workspace_id​

aip_sdk.NotificationConfig.workspace_id: str = data['workspace_id']

No docstring is defined in the source.