Skip to content

Commit

Permalink
feat(docs): Add API documentation overview file
Browse files Browse the repository at this point in the history
  • Loading branch information
etu committed Jun 8, 2024
1 parent 7855cca commit 2033093
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions API.md
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
```

0 comments on commit 2033093

Please sign in to comment.