Skip to content

Releases: pfptcommunity/ser-admin-api-python

SER Admin API Python v0.1.0

Choose a tag to compare

@ljerabek ljerabek released this 02 Jul 17:14
0be9823

v0.1.0 is the first public release of ser-admin-api, a typed Python client for the Proofpoint Secure Email Relay administrative APIs.

The package is built with Klarient and models the SER APIs as a typed resource tree across the separate SER service hosts while sharing one OAuth-backed session.

Core Features

  • Typed SERClient facade for the Secure Email Relay administrative APIs.
  • OAuth client-credentials authentication using principal and secret credentials.
  • Shared OAuth-backed session across SER service roots.
  • Resource tree modeling for the SER API host structure.
  • Typed request objects for query parameters and JSON request bodies.
  • Typed response models for returned API data.
  • Pageable resources using Klarient Page objects.
  • Support for context-manager usage with SERClient.
  • Endpoint-focused examples for each major API area.

Modeled API Areas

  • Relay User Management
  • Connector Management
  • Tag Management
  • List Management / Suppression
  • Reporting Usage
  • Reporting Failures
  • Reporting scoped resource discovery

Resource Coverage

The package includes typed resources for common SER administrative workflows, including:

  • Relay user discovery, search, status updates, credential renewal, notes, tags, and names.
  • Connector discovery, search, details, names, regions, notes, credentials, downloads, and install guides.
  • Tag listing, creation, update, deletion, notes, names, and detailed export/download responses.
  • Unsubscribe lists, list addresses, list relay users, and unsubscribe requests.
  • Reporting usage summaries, trends, forecasts, relay-user usage, tag usage, scoped IP/sending-address usage, and downloadable reporting data.
  • Reporting failure summaries, relay-user failures, tag failures, delivery failures, message filtering, policy violations, sending-address failures, and IP failures.

Pagination

List-style APIs return Klarient Page objects with typed rows and page metadata such as:

  • current_page_number
  • page_size
  • record_count
  • self_link
  • next_link

Pageable resources can be iterated directly, and .items() can be used to flatten page boundaries.

Requirements

  • Python 3.11+
  • klarient[requests]>=0.3.0
  • requests-oauth2client>=1.8

Install

pip install ser-admin-api

Basic Usage

from ser_admin_api import SERClient
from ser_admin_api.relay_users import RelayUsersQuery

with SERClient("", "") as client:
relay_users = client.relay.relay_users.retrieve(
RelayUsersQuery(page=1, size=100)
)

for relay_user in relay_users:
    print(relay_user.relay_user_id)
    print(relay_user.name)
    print(relay_user.status)

Notes

Some SER APIs do not expose delete operations for certain resource types, such as connectors and relay users. The client models the documented API behavior and keeps destructive operations explicit where supported.

Full Changelog: https://github.com/pfptcommunity/ser-admin-api-python/commits/v0.1.0