Skip to content

Releases: pfptcommunity/ser-admin-api-python

ser-admin-api v0.2.2

Choose a tag to compare

@ljerabek ljerabek released this 22 Jul 12:18
c7b2033

Patch release focused on example clarity and response-model cleanup.

Highlights

  • Updated endpoint examples to show resource paths, URLs, page metadata, links, and typed response properties inline.
  • Removed shared display helpers from examples so each example is easier to understand on its own.
  • Removed stale SER response helper code that was no longer needed by the current typed response models.
  • Verified public examples against the live SER Admin API.
  • Verified read-only and mutation smoke tests against the live SER Admin API.

Notes

This release does not introduce breaking API changes. Existing ser-admin-api code should continue to work without changes.

The live mutation smoke test creates unique test records, deletes resources where the API supports deletion, and leaves connector/relay-user resources in their supported terminal states.

Full Changelog: v0.2.1...v0.2.2

ser-admin-api v0.2.1

Choose a tag to compare

@ljerabek ljerabek released this 21 Jul 12:38
78b09d4

This release removes stale early modeling helpers and tightens request and response separation.

Changed

  • Removed unused generic reporting response helpers that were left over from early API modeling.
  • Removed relay-user response-to-request conversion helpers.
  • Updated relay-user README and examples to show explicit request-model construction for read-modify-update flows.

Notes

Relay-user allowed-address response objects now remain response-side models only. When reusing returned allowed-address data in an update request, build the request model explicitly:

from ser_admin_api.relay_users import RelayUserAllowedAddress, RelayUserUpdate

relay_user = client.relay.relay_users["relay-user-id"].retrieve().data

update_request = RelayUserUpdate(
    allowed_address=[
        RelayUserAllowedAddress(
            mail_from=address.mail_from,
            header_from=address.header_from,
        )
        for address in relay_user.allowed_addresses
    ],
)

**Full Changelog**: https://github.com/pfptcommunity/ser-admin-api-python/compare/v0.2.0...v0.2.1

ser-admin-api v0.2.0

Choose a tag to compare

@ljerabek ljerabek released this 15 Jul 05:52
f20559c

This release updates ser-admin-api for Klarient 0.4.0 and refines the SER API modeling based on live API validation.

Highlights

  • Raised the Klarient dependency floor to klarient[requests]>=0.4.0.
  • Updated request models to use Klarient’s _set_optional_fields(...) helper.
  • Modeled required nullable credential expiration fields explicitly so None is sent as a present JSON null where the API requires it.
  • Expanded relay user request and response modeling, including allowed addresses, limits, rewrite rules, returned credentials, and update helpers.
  • Refactored delivery failure reporting into a clearer package structure with dedicated models, resources, and request objects.
  • Improved typed metadata envelope models for paginated SER responses.
  • Updated examples and README usage for connector, relay user, reporting, tag, and unsubscribe workflows.

Validation

Validated against the published klarient==0.4.0 package:

  • Import and request construction checks passed.
  • Required nullable credential expiration fields preserve None as an explicit request value.
  • Live read-only smoke testing passed across connector, relay user, tag, unsubscribe list, usage reporting, and failure reporting endpoints.
  • Live mutation smoke testing passed for temporary tag, unsubscribe list, connector, and relay user workflows.

Compatibility Notes

This release requires Klarient 0.4.0 or newer.

Older Klarient releases do not include the renamed request field helper used by this package.

Full Changelog: v0.1.0...v0.2.0

ser-admin-api 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