Skip to content

feat: add v2 control plane API - #3630

Open
praveen902012 wants to merge 2 commits into
postalserver:mainfrom
praveen902012:feat/v2-control-plane-api
Open

feat: add v2 control plane API#3630
praveen902012 wants to merge 2 commits into
postalserver:mainfrom
praveen902012:feat/v2-control-plane-api

Conversation

@praveen902012

Copy link
Copy Markdown

Summary

  • Add the versioned /api/v2 management control plane for organizations, servers, domains, credentials, webhooks, usage, auditing, and idempotency.
  • Enforce organization-level monthly outbound quotas consistently across HTTP and SMTP.
  • Add OpenAPI documentation and request coverage, and make owner-email uniqueness race-safe with a full-length unique index.

Validation

  • bundle exec rspec (841 examples, 0 failures)
  • bundle exec rubocop db/migrate/20260830000001_create_organizations.rb db/migrate/20260830000002_create_control_api_keys.rb db/migrate/20260830000003_create_api_idempotency_keys.rb db/migrate/20260830000004_create_audit_events.rb db/migrate/20260830000005_create_usage_events.rb spec/requests/api/v2/organizations_spec.rb
  • bash script/test_owner_email_uniqueness.sh (6 examples, 0 failures)

@willpower232

Copy link
Copy Markdown
Collaborator

this seems to be two features in one PR, not sure how much of an overlap this is with the long-promised v2 api

- Implemented index and create actions for incoming routes.
- Added route serialization and validation for HTTP endpoints.
- Integrated domain verification before enabling incoming mail.

fix(control_plane): improve error handling during server provisioning

- Enhanced error logging for provisioning failures.
- Included original error as the cause in ProvisioningError.

docs(api): update API documentation and Postman collections

- Added new endpoints for incoming routes to the API documentation.
- Created a Postman collection for testing the Control API v2.
- Updated environment variables for Postman usage.

test(api): add tests for incoming routes and lifecycle

- Implemented tests for incoming route creation and validation.
- Added lifecycle tests for the Control API v2 to ensure all endpoints function correctly.
- Enhanced existing tests to cover new functionality and error cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants