Exposures
Define external access points and API gateways.
Basic Syntax
craft
exposure APIName {
to: Actor1, Actor2
contexts: Domain1, Domain2
through: Gateway1, Gateway2
}Properties
to
Who can access this exposure:
craft
to: Customer, Partner, Adminof
Which domains are exposed:
craft
contexts: Order, Product, Inventorythrough
Which gateways are used:
craft
through: APIGateway, LoadBalancerExample
craft
exposure PublicAPI {
to: Customer
contexts: Catalog, Order, Payment
through: APIGateway, LoadBalancer
}
exposure PartnerAPI {
to: Partner
contexts: Inventory, Order
through: PartnerGateway
}
exposure AdminAPI {
to: Admin
contexts: Catalog, Order, Payment, Inventory, Analytics
through: AdminGateway
}Use Case
Exposures help document:
- Who has access to what
- Which domains are public vs internal
- Gateway routing configuration