Folders and Routes
Routes are derived from the endpoints/ folder tree: the first level is the endpoint type, the folder names below it form the namespace and endpoint name. Namespace in entity.json overrides the folder namespace (Namespaces).
Directory layout
txt
PortwayApi/
├── appsettings.json
├── web.config
├── *.db
├── log/
├── tokens/
├── environments/
│ ├── settings.json
│ ├── dev/
│ │ └── settings.json
│ ├── test/
│ │ └── settings.json
│ └── prod/
│ └── settings.json
└── endpoints/
├── SQL/
│ └── Inventory/ # namespace
│ └── Products/
│ └── entity.json
├── Proxy/
│ ├── Accounts/ # no namespace
│ │ └── entity.json
│ └── Financial/
│ └── SalesOrder/
│ └── entity.json
├── Webhooks/
│ └── Integrations/
│ └── Inbound/
│ └── entity.json
├── Files/
│ ├── CustomerData/
│ │ └── entity.json
│ └── Images/
│ └── entity.json
└── Static/
└── Masterdata/
└── Countries/
└── entity.jsonRoute patterns
| Endpoint type | Folder path | URL pattern |
|---|---|---|
| SQL | endpoints/SQL/[{Namespace}/]{Name}/entity.json |
/api/{env}/[{Namespace}/]{Name} |
| Proxy | endpoints/Proxy/[{Namespace}/]{Name}/entity.json |
/api/{env}/[{Namespace}/]{Name} |
| Composite | endpoints/Proxy/[{Namespace}/]{Name}/entity.json (Type: Composite) |
/api/{env}/[{Namespace}/]{Name} |
| Webhook | endpoints/Webhooks/{Namespace}/{Name}/entity.json |
/api/{env}/{Namespace}/{Name}/{id} |
| File | endpoints/Files/[{Namespace}/]{Name}/entity.json |
/api/{env}/files/[{Namespace}/]{Name} |
| Static | endpoints/Static/[{Namespace}/]{Name}/entity.json |
/api/{env}/[{Namespace}/]{Name} |
Segments in square brackets are optional; a namespace folder adds its name to the URL.
Folder permissions
Write access for the service account on the deployment directory:
Docker containers run as the image user; bind-mounted folders need write access for that user.
| Folder | Minimum permission | Reason |
|---|---|---|
log/ |
Read/Write | Log files and rotation |
tokens/ |
Read/Write | Token files |
environments/ |
Read/Write | Configuration; console edits and secret encryption |
endpoints/ |
Read/Write | Configuration; console edits |
| Root | Read/Write | auth.db, mcp.db, metrics.db, portway.key |
WARNING
Directory browsing must be disabled in web.config.
Portway