semitexa / api
Semitexa API - external API product layer with machine credentials, versioned routes, and M2M contracts
Requires
- php: ^8.4
- semitexa/auth: *
- semitexa/core: *
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 2026.09.11.0529
- 2026.09.08.2003
- 2026.08.04.2028
- 2026.07.06.1438
- 2026.06.21.0352
- 2026.05.08.1640
- 2026.04.26.0639
- 2026.04.21.0704
- 2026.04.14.1121
- 2026.04.13.0911
- 2026.04.07.1933
- 2026.04.05.0855
- 2026.04.03.1349
- 2026.04.03.1240
- v0.1.4
- 0.1.3
- v0.1.2
- dev-develop
- dev-review/package-metadata-20260323
This package is auto-updated.
Last update: 2026-09-11 05:40:09 UTC
README
External API product layer for Semitexa with machine-to-machine authentication, versioned routes, and structured error envelopes.
Purpose
Provides the opt-in external API surface for Semitexa applications. Routes marked with #[ExternalApi] receive machine-facing JSON error envelopes for domain failures, Bearer token M2M authentication via MachineAuthHandler, and API versioning with #[ApiVersion] including deprecation and sunset headers.
Role in Semitexa
Depends on semitexa/core and semitexa/auth. Enriches Core's route metadata with external_api and api_version extension keys via ApiRouteMetadataResolver. Internal routes remain completely unaffected by this package.
Key Features
#[ExternalApi]attribute for opt-in API route designation#[ApiVersion]with deprecation and sunset metadata headersMachineAuthHandlersupporting Bearer{id}:{secret}token formatExternalApiExceptionMapperproducing machine-readable JSON error envelopes forDomainExceptionroutes and falling back to Core's generic 500 response for unexpected throwablesMachinePrincipalimplementingAuthenticatableInterfaceMachineCredentialentity with scopes, revocation, and audit support
Notes
Only routes explicitly marked with #[ExternalApi] receive API behavior. All other routes continue to use Core's default exception mapping and response handling.