API DNS and Mapping Schemes
APIs and DNS are generally composed of the following tokens:
- Company Name:
{{ comp-name }}
- Example: Acme Co (
acmeco
)
- Example: Acme Co (
- Organization Name:
{{ org-name }}
- Example: Retail (
ar
) - Example: Manufacturing (
am
)
- Example: Retail (
- Solution Name:
{{ sol-name }}
- Example: Shopping (
shopping
) - Example: Inventory (
inventory
)
- Example: Shopping (
- Application Root:
{{ app-root }}
- Example: Cart (cart)
- Example: Skus (skus)
- Application Route:
{{ app-route }}
- Example: Cart Items (items)
API Mapping Schemes
Given the above tokens, a couple of obvious patterns could be followed to create a unified, consistent API strategy across the entire company.
Unified Across Entire Company
api.{{ comp-name }}
.com/{{ org-name }}
/{ sol-name }}
/{{ app-root }}
/{{ app-route }}
- api.acmeco.com/ar/shopping/cart/items
- api.acmeco.com/am/inventory/skus/items
Separated By Organization
{{ org-name }}
.api.{{ comp-name }}
.com/{ sol-name }}
/{{ app-root }}
/{{ app-route }}
- ar.api.acmeco.com/shopping/cart/items
- am.api.acmeco.com/inventory/skus/items