Skip to content

Commit 54bc78f

Browse files
committed
[Docs]: Rename REST API -> HTTP API
Since the dstack API does not follow REST standards, rename it from `REST API` to `HTTP API`. Referring to it as a `REST API` has proven confusing for users and partners, prompting questions ("Why is everything a POST?"). Renaming the REST Plugin is out of scope for now.
1 parent fc9afa9 commit 54bc78f

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ uv.lock
2626
/src/dstack/_internal/server/statics
2727

2828
profiling_results.html
29+
docs/docs/reference/api/http/openapi.json
2930
docs/docs/reference/api/rest/openapi.json
3031
docs/docs/reference/plugins/rest/rest_plugin_openapi.json

contributing/RUNNER-AND-SHIM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ A container is started in either `host` or `bridge` network mode depending on th
3131

3232
In `bridge` mode, container ports are mapped to ephemeral host ports. `dstack-shim` stores port mapping as a part of task's state. Currently, the default `bridge` network is used for all containers, but this could be changed in the future to improve container isolation.
3333

34-
All communication between the `dstack` server and `dstack-shim` happens via REST API through an SSH tunnel. `dstack-shim` doesn't collect logs. Usually, it is run from a `cloud-init` user-data script.
34+
All communication between the `dstack` server and `dstack-shim` happens via HTTP API through an SSH tunnel. `dstack-shim` doesn't collect logs. Usually, it is run from a `cloud-init` user-data script.
3535

3636
The entrypoint for the container:
3737
- Installs `openssh-server`
@@ -52,7 +52,7 @@ The entrypoint for the container:
5252
- Wait for the signal to terminate the commands
5353
- STEP 5: Wait until all logs are read by the server and the CLI. Or exit after a timeout
5454

55-
All communication between the `dstack` server and `dstack-runner` happens via REST API through an SSH tunnel. `dstack-runner` collects the job logs and its own logs. Only the job logs are served via WebSocket.
55+
All communication between the `dstack` server and `dstack-runner` happens via HTTP API through an SSH tunnel. `dstack-runner` collects the job logs and its own logs. Only the job logs are served via WebSocket.
5656

5757
## SSH tunnels
5858

docs/blog/posts/dstack-metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ difference is that `dstack stats` includes GPU VRAM usage and GPU utilization pe
3131
Similar to `kubectl top`, if a run consists of multiple jobs (such as distributed training or an auto-scalable service),
3232
`dstack stats` will display metrics per job.
3333

34-
!!! info "REST API"
34+
!!! info "HTTP API"
3535
In addition to the `dstack stats` CLI commands, metrics can be obtained via the
36-
[`/api/project/{project_name}/metrics/job/{run_name}`](../../docs/reference/api/rest/#operations-tag-metrics) REST endpoint.
36+
[`/api/project/{project_name}/metrics/job/{run_name}`](../../docs/reference/api/http/#operations-tag-metrics) HTTP endpoint.
3737

3838
## Why monitor GPU usage
3939

docs/docs/concepts/projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ You can find the command on the project’s settings page:
6666
<img src="https://dstack.ai/static-assets/static-assets/images/dstack-projects-project-cli-v2.png" width="750px" />
6767

6868
??? info "API"
69-
In addition to the UI, managing projects, users, and user permissions can also be done via the [REST API](../reference/api/rest/index.md).
69+
In addition to the UI, managing projects, users, and user permissions can also be done via the [HTTP API](../reference/api/http/index.md).

docs/docs/guides/migration/slurm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Both Slurm and `dstack` follow a client-server architecture with a control plane
2727
|---|---------------|-------------------|
2828
| **Control plane** | `slurmctld` (controller) | `dstack-server` |
2929
| **State persistence** | `slurmdbd` (database) | `dstack-server` (SQLite/PostgreSQL) |
30-
| **REST API** | `slurmrestd` (REST API) | `dstack-server` (HTTP API) |
30+
| **API** | `slurmrestd` (REST API) | `dstack-server` (HTTP API) |
3131
| **Compute plane** | `slurmd` (compute agent) | `dstack-shim` (on VMs/hosts) and/or `dstack-runner` (inside containers) |
3232
| **Client** | CLI from login nodes | CLI from anywhere |
3333
| **High availability** | Active-passive failover (typically 2 controller nodes) | Horizontal scaling with multiple server replicas (requires PostgreSQL) |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: REST API
2+
title: HTTP API
33
---
44

5-
The REST API enables running tasks, services, and managing runs programmatically.
5+
The HTTP API enables running tasks, services, and managing runs programmatically.
66

77
## Usage example
88

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ plugins:
134134
"examples/clusters/a4/index.md": "examples/clusters/gcp/index.md"
135135
"examples/clusters/efa/index.md": "examples/clusters/aws/index.md"
136136
"docs/guides/migration.md": "docs/guides/upgrade.md"
137+
"docs/reference/api/rest/index.md": "docs/reference/api/http/index.md"
137138
- typeset
138139
- gen-files:
139140
# TODO: convert these to hooks (schema reference migrated)
@@ -276,7 +277,7 @@ nav:
276277
- dstack import: docs/reference/cli/dstack/import.md
277278
- API:
278279
- Python API: docs/reference/api/python/index.md
279-
- REST API: docs/reference/api/rest/index.md
280+
- HTTP API: docs/reference/api/http/index.md
280281
- Environment variables: docs/reference/environment-variables.md
281282
- .dstack/profiles.yml: docs/reference/profiles.yml.md
282283
- Plugins:

scripts/docs/gen_openapi_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{"url": "https://sky.dstack.ai", "description": "Managed server"},
1515
]
1616
app.version = DSTACK_VERSION or "0.0.0"
17-
output_path = Path("docs/docs/reference/api/rest/openapi.json")
17+
output_path = Path("docs/docs/reference/api/http/openapi.json")
1818
output_path.parent.mkdir(parents=True, exist_ok=True)
1919
new_content = json.dumps(app.openapi())
2020
if not output_path.exists() or output_path.read_text() != new_content:

0 commit comments

Comments
 (0)