Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions portals/api-portal/distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Verify the Platform API is healthy:
curl -fk https://localhost:9243/health
```

Open the API Portal in a browser at `https://localhost:9543/default/views/default` and log in with the admin credentials printed by `setup.sh`.
Open the API Portal in a browser at `https://localhost:9543/api-portal/default/views/default` and log in with the admin credentials printed by `setup.sh`.

> **Browser trust warning?** Both services use a self-signed TLS certificate by default. Click **Advanced → Proceed** to continue. See [Custom TLS Certificates](#custom-tls-certificates) to remove the warning permanently.

Expand Down Expand Up @@ -133,7 +133,7 @@ Like AI Workspace, it's an opt-in you turn on by editing `configs/config.toml`
1. **Copy the `[api_portal.design_mode]` block** from the "DESIGN MODE CONFIGURATION" section of the shipped `configs/config-template.toml` into `configs/config.toml` (keep `enabled = true`). The sample paths are already correct for the bundled samples — leave them as-is.
2. **Restart the API Portal:** `docker compose up` (or `docker compose restart api-portal`).

The portal then serves from disk at `/views/default` (e.g. `http://localhost:9543/views/default`). Because design mode never touches the database, the accompanying Platform API and its database go unused while it's on — set `enabled` back to `false` and restart to return to the normal, database-backed portal.
The portal then serves from disk at `/views/default` (e.g. `http://localhost:9543/api-portal/views/default`). Because design mode never touches the database, the accompanying Platform API and its database go unused while it's on — set `enabled` back to `false` and restart to return to the normal, database-backed portal.

The sample content lives in **`resources/samples/`** (`apis/`, `mcps/`, `applications.yaml`, `subscription-plans.yaml`), which the API Portal container mounts at `/app/samples`. To preview **your own** APIs and MCP servers, add or edit files there and restart — no image rebuild needed.

Expand Down
2 changes: 1 addition & 1 deletion portals/api-portal/docs/administer/api-token-curl.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ echo "TOKEN=$TOKEN"
```bash
# The org is resolved from the token's org claim (set via ORGANIZATION_IDENTIFIER
# during login in Step 3) — no org identifier needed in the request itself.
BASE="https://localhost:9543/api/v0.9"
BASE="https://localhost:9543/api-portal/api/v0.9"

# List APIs
curl -sk "${BASE}/apis" -H "Authorization: Bearer $TOKEN" | jq .
Expand Down
14 changes: 7 additions & 7 deletions portals/api-portal/docs/administer/design-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Then start the portal normally:
npm start
```

Visit **http://localhost:9543/views/default**.
Visit **http://localhost:9543/api-portal/views/default**.

> The portal always starts on plain HTTP in design mode — no TLS certificate setup required.

Expand Down Expand Up @@ -143,23 +143,23 @@ TOKEN=$(curl -sk -X POST "https://localhost:9243/api/portal/v0.9/auth/login" \
Initial upload:

```bash
curl -X POST "http://localhost:9543/api/v0.9/views/{viewName}/layout" \
curl -X POST "http://localhost:9543/api-portal/api/v0.9/views/{viewName}/layout" \
-H "Authorization: Bearer $TOKEN" \
-F "zipFile=@my-theme.zip"
```

Update an existing layout:

```bash
curl -X PUT "http://localhost:9543/api/v0.9/views/{viewName}/layout" \
curl -X PUT "http://localhost:9543/api-portal/api/v0.9/views/{viewName}/layout" \
-H "Authorization: Bearer $TOKEN" \
-F "zipFile=@my-theme.zip"
```

Revert to the default layout:

```bash
curl -X DELETE "http://localhost:9543/api/v0.9/views/{viewName}/layout/template" \
curl -X DELETE "http://localhost:9543/api-portal/api/v0.9/views/{viewName}/layout/template" \
-H "Authorization: Bearer $TOKEN"
```

Expand All @@ -176,9 +176,9 @@ samples/
│ │ └── docs/
│ └── …
└── mcps/ # MCP servers → /views/default/mcps
├── travel-assistant-mcp-v1/
├── everything-mcp-server-v1.0/
│ ├── api.yaml
│ ├── schemaDefinition.yaml
│ ├── definition.yaml
│ └── docs/
└── …
```
Expand Down Expand Up @@ -237,7 +237,7 @@ spec:
productionUrl: https://mcp.example.com
```

The `schemaDefinition.yaml` alongside `api.yaml` defines the tools, resources, and prompts exposed by the server:
The `definition.yaml` alongside `api.yaml` defines the tools, resources, and prompts exposed by the server:

```yaml
- type: TOOL
Expand Down
10 changes: 5 additions & 5 deletions portals/api-portal/docs/administer/key-manager-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
```

```bash
curl -k -X POST https://localhost:9543/api/v0.9/key-managers \
curl -k -X POST https://localhost:9543/api-portal/api/v0.9/key-managers \
-H "Authorization: Bearer $TOKEN" \
-F "keymanager=@keymanager.yaml"
```
Expand All @@ -48,13 +48,13 @@ Every key manager is treated as a generic OAuth2 `client_credentials` provider.
## List Key Managers

```bash
curl -k https://localhost:9543/api/v0.9/key-managers -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/key-managers -H "Authorization: Bearer $TOKEN"
```

## Get a Key Manager

```bash
curl -k https://localhost:9543/api/v0.9/key-managers/{kmId} -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} -H "Authorization: Bearer $TOKEN"
```

## Update a Key Manager
Expand All @@ -72,15 +72,15 @@ spec:
```

```bash
curl -k -X PUT https://localhost:9543/api/v0.9/key-managers/{kmId} \
curl -k -X PUT https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} \
-H "Authorization: Bearer $TOKEN" \
-F "keymanager=@keymanager-update.yaml"
```

## Delete a Key Manager

```bash
curl -k -X DELETE https://localhost:9543/api/v0.9/key-managers/{kmId} \
curl -k -X DELETE https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} \
-H "Authorization: Bearer $TOKEN"
```

Expand Down
6 changes: 3 additions & 3 deletions portals/api-portal/docs/administer/manage-organizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ They remain in the OpenAPI spec, and the code behind them is intact, so they can
## Read the Organization

```bash
curl -k https://localhost:9543/api/v0.9/organizations/acme -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/organizations/acme -H "Authorization: Bearer $TOKEN"
```

## Update the Organization
Expand All @@ -75,7 +75,7 @@ spec:
```

```bash
curl -k -X PUT https://localhost:9543/api/v0.9/organizations/acme \
curl -k -X PUT https://localhost:9543/api-portal/api/v0.9/organizations/acme \
-H "Authorization: Bearer $TOKEN" \
-F "organization=@org-update.yaml"
```
Expand Down Expand Up @@ -184,7 +184,7 @@ For scripts and CLI tools, get a Bearer token directly from the Platform API and
TOKEN=$(curl -sk -X POST "https://localhost:9243/api/portal/v0.9/auth/login" \
-d "username=<admin-username>&password=<admin-password>" | jq -r .token)

curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:9543/api/v0.9/organizations/acme
curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:9543/api-portal/api/v0.9/organizations/acme
```

The token is verified locally by the API Portal against the Platform API's RS256 public key (`auth.local.public_key_path`), with no extra call to the Platform API per request.
Expand Down
20 changes: 10 additions & 10 deletions portals/api-portal/docs/administer/manage-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ https://<host>/<orgHandle>/views/<viewName>
```

```bash
curl -k -X POST https://localhost:9543/api/v0.9/views \
curl -k -X POST https://localhost:9543/api-portal/api/v0.9/views \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
--data-binary @view.json
Expand All @@ -41,13 +41,13 @@ curl -k -X POST https://localhost:9543/api/v0.9/views \
## List Views

```bash
curl -k https://localhost:9543/api/v0.9/views -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/views -H "Authorization: Bearer $TOKEN"
```

## Get a View

```bash
curl -k https://localhost:9543/api/v0.9/views/{viewId} -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/views/{viewId} -H "Authorization: Bearer $TOKEN"
```

## Update a View
Expand All @@ -63,7 +63,7 @@ The update request takes the full desired label set via `labels` — labels pres
```

```bash
curl -k -X PUT https://localhost:9543/api/v0.9/views/{viewId} \
curl -k -X PUT https://localhost:9543/api-portal/api/v0.9/views/{viewId} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
--data-binary @view-update.json
Expand All @@ -72,7 +72,7 @@ curl -k -X PUT https://localhost:9543/api/v0.9/views/{viewId} \
## Delete a View

```bash
curl -k -X DELETE https://localhost:9543/api/v0.9/views/{viewId} -H "Authorization: Bearer $TOKEN"
curl -k -X DELETE https://localhost:9543/api-portal/api/v0.9/views/{viewId} -H "Authorization: Bearer $TOKEN"
```

---
Expand All @@ -94,7 +94,7 @@ Labels are created one at a time as a JSON object:
```

```bash
curl -k -X POST https://localhost:9543/api/v0.9/labels \
curl -k -X POST https://localhost:9543/api-portal/api/v0.9/labels \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
--data-binary @label.json
Expand All @@ -108,13 +108,13 @@ curl -k -X POST https://localhost:9543/api/v0.9/labels \
### List Labels

```bash
curl -k https://localhost:9543/api/v0.9/labels -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/labels -H "Authorization: Bearer $TOKEN"
```

### Get a Label

```bash
curl -k https://localhost:9543/api/v0.9/labels/{labelId} -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/labels/{labelId} -H "Authorization: Bearer $TOKEN"
```

### Update a Label
Expand All @@ -128,7 +128,7 @@ curl -k https://localhost:9543/api/v0.9/labels/{labelId} -H "Authorization: Bear
```

```bash
curl -k -X PUT https://localhost:9543/api/v0.9/labels/{labelId} \
curl -k -X PUT https://localhost:9543/api-portal/api/v0.9/labels/{labelId} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
--data-binary @label-update.json
Expand All @@ -137,7 +137,7 @@ curl -k -X PUT https://localhost:9543/api/v0.9/labels/{labelId} \
### Delete a Label

```bash
curl -k -X DELETE "https://localhost:9543/api/v0.9/labels/{labelId}" \
curl -k -X DELETE "https://localhost:9543/api-portal/api/v0.9/labels/{labelId}" \
-H "Authorization: Bearer $TOKEN"
```

Expand Down
12 changes: 6 additions & 6 deletions portals/api-portal/docs/administer/subscription-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
```

```bash
curl -k -X POST https://localhost:9543/api/v0.9/subscription-plans \
curl -k -X POST https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H "Authorization: Bearer $TOKEN" \
-F "subscriptionPlan=@plan.yaml"
```
Expand Down Expand Up @@ -89,21 +89,21 @@ items:
```

```bash
curl -k -X POST https://localhost:9543/api/v0.9/subscription-plans \
curl -k -X POST https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H "Authorization: Bearer $TOKEN" \
-F "subscriptionPlan=@plans.yaml"
```

## List Subscription Plans

```bash
curl -k https://localhost:9543/api/v0.9/subscription-plans -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/subscription-plans -H "Authorization: Bearer $TOKEN"
```

## Get a Subscription Plan

```bash
curl -k https://localhost:9543/api/v0.9/subscription-plans/{planId} \
curl -k https://localhost:9543/api-portal/api/v0.9/subscription-plans/{planId} \
-H "Authorization: Bearer $TOKEN"
```

Expand All @@ -125,15 +125,15 @@ spec:
```

```bash
curl -k -X PUT https://localhost:9543/api/v0.9/subscription-plans \
curl -k -X PUT https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H "Authorization: Bearer $TOKEN" \
-F "subscriptionPlan=@plan-update.yaml"
```

## Delete a Subscription Plan

```bash
curl -k -X DELETE "https://localhost:9543/api/v0.9/subscription-plans/{planId}" \
curl -k -X DELETE "https://localhost:9543/api-portal/api/v0.9/subscription-plans/{planId}" \
-H "Authorization: Bearer $TOKEN"
```

Expand Down
14 changes: 7 additions & 7 deletions portals/api-portal/docs/administer/webhook-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ signature_tolerance_sec = 300
### Create a subscriber

```bash
curl -k -X POST "https://localhost:9543/api/v0.9/webhook-subscribers" \
curl -k -X POST "https://localhost:9543/api-portal/api/v0.9/webhook-subscribers" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -88,18 +88,18 @@ The response never includes the secret. That one `secret` value does double duty

```bash
# List
curl -k "https://localhost:9543/api/v0.9/webhook-subscribers" -H "Authorization: Bearer $TOKEN"
curl -k "https://localhost:9543/api-portal/api/v0.9/webhook-subscribers" -H "Authorization: Bearer $TOKEN"

# Get one
curl -k "https://localhost:9543/api/v0.9/webhook-subscribers/{subscriberId}" -H "Authorization: Bearer $TOKEN"
curl -k "https://localhost:9543/api-portal/api/v0.9/webhook-subscribers/{subscriberId}" -H "Authorization: Bearer $TOKEN"

# Update (only supplied fields are changed; omitted fields keep their stored values)
curl -k -X PUT "https://localhost:9543/api/v0.9/webhook-subscribers/{subscriberId}" \
curl -k -X PUT "https://localhost:9543/api-portal/api/v0.9/webhook-subscribers/{subscriberId}" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"enabled": false}'

# Delete
curl -k -X DELETE "https://localhost:9543/api/v0.9/webhook-subscribers/{subscriberId}" \
curl -k -X DELETE "https://localhost:9543/api-portal/api/v0.9/webhook-subscribers/{subscriberId}" \
-H "Authorization: Bearer $TOKEN"
```

Expand Down Expand Up @@ -606,11 +606,11 @@ Each delivery is attempted exactly once. If your subscriber endpoint is unavaila
### List recent events

```bash
curl -k https://localhost:9543/api/v0.9/webhook-events -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/webhook-events -H "Authorization: Bearer $TOKEN"
```

### Get event details

```bash
curl -k https://localhost:9543/api/v0.9/webhook-events/{eventId} -H "Authorization: Bearer $TOKEN"
curl -k https://localhost:9543/api-portal/api/v0.9/webhook-events/{eventId} -H "Authorization: Bearer $TOKEN"
```
6 changes: 3 additions & 3 deletions portals/api-portal/docs/introduction/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This starts the API Portal (SQLite by default). On first boot the database schem
Navigate to:

```
https://localhost:9543/default/views/default
https://localhost:9543/api-portal/default/views/default
```

Sign in with the admin username and password you set when running `./scripts/setup.sh`.
Expand Down Expand Up @@ -245,7 +245,7 @@ TOKEN=$(curl -sk -X POST "https://localhost:9243/api/portal/v0.9/auth/login" \
-d "username=<admin-username>&password=<admin-password>" | jq -r .token)

# Publish the API (the token's org_handle claim scopes this to the "default" org)
curl -sk -X POST "https://localhost:9543/api/v0.9/apis" \
curl -sk -X POST "https://localhost:9543/api-portal/api/v0.9/apis" \
-H "Authorization: Bearer $TOKEN" \
-F "metadata=@api.yaml;type=application/yaml" \
-F "definition=@openapi.yaml;type=application/yaml"
Expand All @@ -259,7 +259,7 @@ Refresh the portal — the Reading-List-API now appears in the catalog. Click it
|---|---|
| Organization | `default` |
| Default view | `default` |
| Portal URL | `https://localhost:9543/default/views/default` |
| Portal URL | `https://localhost:9543/api-portal/default/views/default` |
| Admin credentials | Set when you ran `./scripts/setup.sh` (stored bcrypt-hashed in `api-platform.env`) |
| Sample API | `Reading-List-API` visible in the catalog |

Expand Down
Loading
Loading