# Endpoints

Switchboard learns what your app exposes from the running stack, never
from configuration. After each deploy the read-back collects:

- resources tagged `swb:endpoint=<kind>` (plus optional
  `swb:endpoint-name`) — the URL comes from the resource itself: a
  CloudFront distribution's domain, an API Gateway stage URL, or a custom
  resource's returned attributes;
- `SwbEndpoint<Name>` stack outputs, the fallback for anything that
  cannot carry the tag.

Four kinds: `app` (the signed-in web UI), `api` (the gateway base URL),
`dev-portal`, and `site` (any public static site — a landing page is a
`site` named Landing).

The standard shape — Lambda behind a Zuplo gateway, a Zuplo dev portal —
deploys through the app's own CDK custom resource; that resource carries
the tag and returns the URLs, so Switchboard models kinds and URLs and
never Zuplo. Legacy AWS API Gateway apps tag their stage the same way.

Discovered endpoints show on the instance's Endpoints panel (read
through the GraphQL API, like everything the console shows). When the
instance is published as a service, the tenant chooses which endpoints to
list — that is what puts the Docs button on the product page and the API
catalog into the portal's API catalogs.
