Skip to content

Commit 1a1bc3e

Browse files
Claudelukekim
authored andcommitted
docs(cloud): document projects as the canonical Management API resource
1 parent 0f8cf48 commit 1a1bc3e

2 files changed

Lines changed: 72 additions & 45 deletions

File tree

cloud/api/management/README.md

Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ icon: code
55

66
# Management APIs
77

8-
The Spice.ai Management API (also known as the control-plane API) provides programmatic access to manage Spice.ai Cloud resources—apps, deployments, secrets, API keys, and organization members.
8+
The Spice.ai Management API (also known as the control-plane API) provides programmatic access to manage Spice.ai Cloud resources—projects, deployments, secrets, API keys, and organization members.
9+
10+
{% hint style="info" %}
11+
**Projects were previously called apps.** Every `/v1/projects` endpoint is also served at the legacy `/v1/apps` path, which remains supported. Existing integrations continue to work without changes.
12+
13+
The legacy paths are marked deprecated in the OpenAPI specification, and new integrations should use `/v1/projects`. See [Projects and apps](#projects-and-apps).
14+
{% endhint %}
915

1016
## Base URL
1117

@@ -21,6 +27,24 @@ All API endpoints are versioned under `/v1`:
2127
https://api.spice.ai/v1
2228
```
2329

30+
## Projects and apps
31+
32+
What the API and portal now call a **project** was previously called an **app**. The resource is unchanged — only the name is different.
33+
34+
Both path prefixes reach the same handlers:
35+
36+
| Path | Status | List response envelope |
37+
| ------------------------ | --------------------- | ---------------------- |
38+
| `/v1/projects` | Canonical | `{ "projects": [...] }` |
39+
| `/v1/apps` | Legacy, still served | `{ "apps": [...] }` |
40+
41+
Two details matter when migrating:
42+
43+
* **The list envelope differs.** `GET /v1/projects` returns results under a `projects` key, while `GET /v1/apps` keeps its original `apps` key. A client switching to the canonical path must read the new key. All other response shapes and field names are identical, including the `id` and `name` fields on each resource.
44+
* **OAuth scope names are unchanged.** The scopes are still `apps:read`, `apps:write`, and `apps:delete`, because they are embedded in already-issued tokens. They grant access to projects under either path.
45+
46+
The Spice CLI, Terraform provider, and SDKs continue to call the legacy paths and are unaffected.
47+
2448
## Authentication
2549

2650
The Management API supports three authentication methods:
@@ -44,7 +68,7 @@ PATs are long-lived, user-scoped tokens. Recommended for:
4468

4569
```bash
4670
curl -H "Authorization: Bearer <your-pat-token>" \
47-
https://api.spice.ai/v1/apps
71+
https://api.spice.ai/v1/projects
4872
```
4973

5074
Learn more: [Personal Access Tokens](../../../portal/profile/personal-access-tokens.md)
@@ -84,7 +108,7 @@ The response contains an `access_token`:
84108

85109
```bash
86110
curl -H "Authorization: Bearer <access-token>" \
87-
https://api.spice.ai/v1/apps
111+
https://api.spice.ai/v1/projects
88112
```
89113

90114
### 3. User Session Tokens (CLI)
@@ -102,15 +126,15 @@ Access to API resources is controlled through scopes. PATs and OAuth clients mus
102126
| Scope | Description |
103127
| ------------------- | ------------------------------------------------------------- |
104128
| `*` | Full access to all resources (not recommended for production) |
105-
| `apps:read` | Read app information |
106-
| `apps:write` | Create and update apps |
107-
| `apps:delete` | Delete apps |
129+
| `apps:read` | Read project information |
130+
| `apps:write` | Create and update projects |
131+
| `apps:delete` | Delete projects |
108132
| `deployments:read` | View deployment status and history |
109133
| `deployments:write` | Create new deployments |
110134
| `secrets:read` | List and view secrets (values are masked) |
111135
| `secrets:write` | Create, update, and delete secrets |
112-
| `config:read` | Read app configuration |
113-
| `config:write` | Update app configuration |
136+
| `config:read` | Read project configuration |
137+
| `config:write` | Update project configuration |
114138
| `members:read` | View organization members |
115139
| `members:write` | Add and update organization members |
116140
| `members:delete` | Remove organization members |
@@ -119,12 +143,13 @@ Access to API resources is controlled through scopes. PATs and OAuth clients mus
119143

120144
* A write scope automatically includes its corresponding read scope (e.g. `apps:write` implies `apps:read`).
121145
* The wildcard scope (`*`) grants all permissions.
146+
* The `apps:*` scope names are unchanged by the projects rename, and apply to projects.
122147

123148
## Rate Limiting
124149

125-
Requests are rate-limited per app. These limits are a high-level failsafe; actual throughput depends on the size of your deployed Spice instance or cluster.
150+
Requests are rate-limited per project. These limits are a high-level failsafe; actual throughput depends on the size of your deployed Spice instance or cluster.
126151

127-
### Per-App Request Rate Limits
152+
### Per-Project Request Rate Limits
128153

129154
| Plan | Requests / second |
130155
| ---------- | ----------------- |
@@ -204,12 +229,12 @@ Official SDKs are available for popular languages:
204229

205230
* [Health](/broken/pages/MMiAVKRYaydEPCc1zdZU) - API health check
206231
* [Regions](/broken/pages/6ZPPX3ncuyaq7usBYCzO) - List available deployment regions
207-
* [Apps](/broken/pages/Cxualhhbj3JVjFycQplA) - Manage Spice apps
208-
* [Deployments](/broken/pages/cW4Y9zvF1YF9X2ExU15D) - Deploy and manage app deployments
209-
* [Secrets](/broken/pages/jux7LfeRfZnBFKMpjIXA) - Manage app secrets
210-
* [API Keys](/broken/pages/C2SEPG58kdQqhs4SL9B7) - Manage app API keys
232+
* [Projects](/broken/pages/Cxualhhbj3JVjFycQplA) - Manage Spice projects
233+
* [Deployments](/broken/pages/cW4Y9zvF1YF9X2ExU15D) - Deploy and manage project deployments
234+
* [Secrets](/broken/pages/jux7LfeRfZnBFKMpjIXA) - Manage project secrets
235+
* [API Keys](/broken/pages/C2SEPG58kdQqhs4SL9B7) - Manage project API keys
211236
* [Members](/broken/pages/fDcgKtae3y2pEzLWtbVg) - Manage organization members
212-
* [Metrics](../metrics.md) - Scrape per-app runtime metrics
237+
* [Metrics](../metrics.md) - Scrape per-project runtime metrics
213238
* [Container Images](/broken/pages/5fsccwHHHi12wJt5s0Ca) - List available runtime versions
214239

215240
## Terraform Provider
@@ -218,33 +243,35 @@ Manage Spice.ai resources as infrastructure-as-code with the [Spice.ai Terraform
218243

219244
## Examples
220245

221-
### List all apps
246+
### List all projects
222247

223248
```bash
224249
curl -H "Authorization: Bearer <token>" \
225-
https://api.spice.ai/v1/apps
250+
https://api.spice.ai/v1/projects
226251
```
227252

228-
### Create a new app
253+
Results are returned under a `projects` key. The legacy `GET /v1/apps` path returns the same records under an `apps` key.
254+
255+
### Create a new project
229256

230257
```bash
231-
curl -X POST https://api.spice.ai/v1/apps \
258+
curl -X POST https://api.spice.ai/v1/projects \
232259
-H "Authorization: Bearer <token>" \
233260
-H "Content-Type: application/json" \
234261
-d '{
235-
"name": "my-app",
262+
"name": "my-project",
236263
"region": "us-west-2",
237-
"description": "My Spice app",
264+
"description": "My Spice project",
238265
"visibility": "private"
239266
}'
240267
```
241268

242-
Organizations with a [dedicated cluster](dedicated-clusters.md) can pass `cluster_name` in place of `region` to create the app on their dedicated infrastructure.
269+
Organizations with a [dedicated cluster](dedicated-clusters.md) can pass `cluster_name` in place of `region` to create the project on their dedicated infrastructure.
243270

244271
### Create a deployment
245272

246273
```bash
247-
curl -X POST https://api.spice.ai/v1/apps/123/deployments \
274+
curl -X POST https://api.spice.ai/v1/projects/123/deployments \
248275
-H "Authorization: Bearer <token>" \
249276
-H "Content-Type: application/json" \
250277
-d '{
@@ -257,7 +284,7 @@ curl -X POST https://api.spice.ai/v1/apps/123/deployments \
257284
### Add a secret
258285

259286
```bash
260-
curl -X POST https://api.spice.ai/v1/apps/123/secrets \
287+
curl -X POST https://api.spice.ai/v1/projects/123/secrets \
261288
-H "Authorization: Bearer <token>" \
262289
-H "Content-Type: application/json" \
263290
-d '{

cloud/api/management/dedicated-clusters.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
description: Creating and managing apps on a dedicated, single-tenant cluster
2+
description: Creating and managing projects on a dedicated, single-tenant cluster
33
icon: server
44
---
55

66
# Dedicated Clusters
77

8-
An organization on an enterprise plan can have one or more **dedicated clusters**: Spice-managed, single-tenant infrastructure where an organization's apps run only alongside other apps from the same organization — never on shared infrastructure. Each cluster has its own `cluster_name`, isolated network, and connection endpoint.
8+
An organization on an enterprise plan can have one or more **dedicated clusters**: Spice-managed, single-tenant infrastructure where an organization's projects run only alongside other projects from the same organization — never on shared infrastructure. Each cluster has its own `cluster_name`, isolated network, and connection endpoint.
99

10-
Dedicated clusters are provisioned by Spice.ai and requested through [support](https://spice.ai/support). Once a cluster is provisioned and registered to an organization, it is available to the Management API and in the Portal's app-creation picker.
10+
Dedicated clusters are provisioned by Spice.ai and requested through [support](https://spice.ai/support). Once a cluster is provisioned and registered to an organization, it is available to the Management API and in the Portal's project-creation picker.
1111

1212
## Listing clusters
1313

@@ -33,21 +33,21 @@ curl -H "Authorization: Bearer <token>" \
3333
}
3434
```
3535

36-
- **`cluster_name`** — the cluster's identifier, used when creating or reassigning apps.
37-
- **`endpoint`** — the cluster's data-plane endpoint (an `https://` URL); apps running on the cluster are reached at this URL.
36+
- **`cluster_name`** — the cluster's identifier, used when creating or reassigning projects.
37+
- **`endpoint`** — the cluster's data-plane endpoint (an `https://` URL); projects running on the cluster are reached at this URL.
3838

39-
## Creating an app on a dedicated cluster
39+
## Creating a project on a dedicated cluster
4040

41-
A create request specifies `cluster_name` instead of `region`, set to a `cluster_name` returned by `GET /v1/clusters`. Exactly one of the two is provided; the app's region is derived from the cluster. The request requires the `apps:write` scope.
41+
A create request specifies `cluster_name` instead of `region`, set to a `cluster_name` returned by `GET /v1/clusters`. Exactly one of the two is provided; the project's region is derived from the cluster. The request requires the `apps:write` scope.
4242

4343
```bash
44-
curl -X POST https://api.spice.ai/v1/apps \
44+
curl -X POST https://api.spice.ai/v1/projects \
4545
-H "Authorization: Bearer <token>" \
4646
-H "Content-Type: application/json" \
4747
-d '{
48-
"name": "my-app",
48+
"name": "my-project",
4949
"cluster_name": "acme-prod-sandbox",
50-
"description": "An app on a dedicated cluster"
50+
"description": "A project on a dedicated cluster"
5151
}'
5252
```
5353

@@ -56,14 +56,14 @@ The response includes the resolved assignment and the cluster's endpoint:
5656
```json
5757
{
5858
"id": 123,
59-
"name": "my-app",
59+
"name": "my-project",
6060
"cluster_name": "acme-prod-sandbox",
6161
"endpoint": "https://private-acme-prod-sandbox-us-west-2-prod-data.spiceai.io",
6262
"...": "..."
6363
}
6464
```
6565

66-
An app created without `cluster_name` deploys to the shared regional infrastructure as usual; `cluster_name: null` is equivalent to omitting it.
66+
A project created without `cluster_name` deploys to the shared regional infrastructure as usual; `cluster_name: null` is equivalent to omitting it.
6767

6868
{% hint style="info" %}
6969
If `region` is also provided it must match the cluster's region.
@@ -77,36 +77,36 @@ If `region` is also provided it must match the cluster's region.
7777
| `400` `'<name>' is not a deployable cluster` | The name is not a deployable cluster — a `cluster_name` from `GET /v1/clusters` is required |
7878
| `400` `region '<r>' does not match cluster region '<r2>'` | An explicit `region` was provided that differs from the cluster's region |
7979

80-
## Moving an existing app to a dedicated cluster
80+
## Moving an existing project to a dedicated cluster
8181

82-
`PUT /v1/apps/{appId}` with `cluster_name` reassigns the app. Subsequent deployments land on the cluster, and the app's endpoint changes to the cluster's host.
82+
`PUT /v1/projects/{projectId}` with `cluster_name` reassigns the project. Subsequent deployments land on the cluster, and the project's endpoint changes to the cluster's host.
8383

8484
```bash
85-
curl -X PUT https://api.spice.ai/v1/apps/123 \
85+
curl -X PUT https://api.spice.ai/v1/projects/123 \
8686
-H "Authorization: Bearer <token>" \
8787
-H "Content-Type: application/json" \
8888
-d '{"cluster_name": "acme-prod-sandbox"}'
8989
```
9090

9191
{% hint style="warning" %}
92-
Reassigning an app changes its data and Flight endpoints. Clients that pin the old hostnames must be updated, and a new [deployment](README.md#create-a-deployment) created so the app's runtime is placed on the cluster.
92+
Reassigning a project changes its data and Flight endpoints. Clients that pin the old hostnames must be updated, and a new [deployment](README.md#create-a-deployment) created so the project's runtime is placed on the cluster.
9393
{% endhint %}
9494

95-
## Querying apps on a dedicated cluster
95+
## Querying projects on a dedicated cluster
9696

97-
The app and `GET /v1/clusters` responses return the cluster's `endpoint` — the URL clients connect to.
97+
The project and `GET /v1/clusters` responses return the cluster's `endpoint` — the URL clients connect to.
9898

99-
It serves the same APIs (SQL, search, and LLM over HTTP, plus Apache Arrow Flight), and authentication is unchanged — the app's [API key](../../portal/apps/api-keys.md) or platform credentials work exactly as on shared infrastructure. For Apache Arrow Flight, the endpoint's host is used with `-data` replaced by `-flight`, over `grpc+tls://<host>:443`.
99+
It serves the same APIs (SQL, search, and LLM over HTTP, plus Apache Arrow Flight), and authentication is unchanged — the project's [API key](../../portal/apps/api-keys.md) or platform credentials work exactly as on shared infrastructure. For Apache Arrow Flight, the endpoint's host is used with `-data` replaced by `-flight`, over `grpc+tls://<host>:443`.
100100

101101
With the [SDKs](../../../sdks/), the endpoint replaces the `data.spiceai.io` / `flight.spiceai.io` defaults. For example, with the [Python SDK](../../../sdks/python-sdk/) over Flight:
102102

103103
```python
104104
from spicepy import Client
105105

106106
client = Client(
107-
api_key="<app-api-key>",
107+
api_key="<project-api-key>",
108108
url="grpc+tls://private-acme-prod-sandbox-us-west-2-prod-flight.spiceai.io:443",
109109
)
110110
```
111111

112-
Everything else — deployments, secrets, API keys, spicepod configuration — works identically to apps on shared infrastructure. The [Management APIs](README.md) reference documents the full endpoint set.
112+
Everything else — deployments, secrets, API keys, spicepod configuration — works identically to projects on shared infrastructure. The [Management APIs](README.md) reference documents the full endpoint set.

0 commit comments

Comments
 (0)