> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudservices.ecowestern.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Operate a Canopy site

> Use SPA routing, status, logs, and custom domains

Operational routes require an ECS API key with `canopy:read`.

## SPA mode

Set `spa` to `true` when browser-side routing should handle paths such as `/account/settings` or `/dashboard/projects`.

Leave it `false` when each URL should resolve to a separately uploaded file.

## Deployment status

`GET /canopy/sites/:name/status`

The endpoint returns recent revisions. Add `?revision_id=REVISION_ID` to receive an SSE progress stream.

Wait for a revision to reach `succeeded` before treating a deployment as ready.

## Logs

`GET /canopy/sites/:name/logs`

| Query parameter | Description                                            |
| --------------- | ------------------------------------------------------ |
| `start`         | ISO timestamp; defaults to one hour before the request |
| `end`           | Optional ISO timestamp                                 |
| `limit`         | Optional result limit                                  |
| `query`         | Optional log query                                     |
| `level`         | Optional level filter                                  |
| `revision_id`   | Optional revision filter                               |

The JSON response is `{ "logs": [...], "next_cursor": ... }`. Send `Accept: text/event-stream` for live logs.

## Custom domains

Use Waymark when a site needs a custom hostname. The target resource ID is the site UUID returned by Canopy.

## Troubleshooting

| Symptom                              | What to check                                                                       |
| ------------------------------------ | ----------------------------------------------------------------------------------- |
| Blank page after publishing          | Confirm that the asset map contains the expected `index.html` and referenced files. |
| Browser route returns a missing page | Enable `spa` for client-side routing.                                               |
| Site is still provisioning           | Poll status with the deployment `revision_id`.                                      |
| Asset fails to load                  | Check path casing and the asset encoding.                                           |
