-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Add API documentation overview file
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# API documentation | ||
|
||
## Create a server | ||
|
||
Create a server configuration. | ||
|
||
```http | ||
POST /api/config/server | ||
Content-Type: application/json | ||
{ | ||
"name": "server-name", | ||
"cmd": "command to execute", | ||
"cwd": "directory to execute command in", | ||
"use_direnv": true, | ||
"env": { | ||
"ENV_VAR": "value" | ||
} | ||
} | ||
``` | ||
|
||
## Delete a server | ||
|
||
Delete a server configuration. | ||
|
||
```http | ||
DELETE /api/config/server/:name | ||
``` | ||
|
||
## Start a server | ||
|
||
Start a server. | ||
|
||
```http | ||
POST /api/runner/:name | ||
``` | ||
|
||
## Stop a server | ||
|
||
Stop a server. | ||
|
||
```http | ||
DELETE /api/runner/:name | ||
``` | ||
|
||
## Fetch full state about all servers | ||
|
||
Fetch full state about all servers. | ||
|
||
```http | ||
GET /api/state | ||
``` | ||
|
||
## Websocket to get real-time state updates | ||
|
||
Connect to a websocket to get real-time state updates. | ||
|
||
```http | ||
GET /api/ws | ||
``` |