Skip to content

Commit

Permalink
docs: updated API spec, removed dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ABeltramo committed Jan 31, 2025
1 parent bfb7dd5 commit 7a68f72
Show file tree
Hide file tree
Showing 2 changed files with 1,301 additions and 1,103 deletions.
14 changes: 11 additions & 3 deletions docs/modules/dev/pages/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
= Wolf API

Wolf exposes a REST API that allows you to interact with the platform programmatically. +
The API can be accessed only via UNIX sockets, you can control the exact path by setting the `WOLF_SOCKET_PATH` environment variable. If you want to access the socket from outside the container, you should mount the socket to the host machine, ex: `-e WOLF_SOCKET_PATH=/var/run/wolf/wolf.sock` and `-v /var/run/wolf:/var/run/wolf` will allow you to access the socket from the host machine at `/var/run/wolf/wolf.sock`.
The API can be accessed only via UNIX sockets, you can control the exact path by setting the `WOLF_SOCKET_PATH` environment variable.
If you want to access the socket from outside the container, you should mount the socket to the host machine, ex: `-e WOLF_SOCKET_PATH=/var/run/wolf/wolf.sock` and `-v /var/run/wolf:/var/run/wolf` will allow you to access the socket from the host machine at `/var/run/wolf/wolf.sock`.

You can test out the API using the `curl` command, for example, to get the OpenAPI specification you can run:

Expand Down Expand Up @@ -64,11 +65,18 @@ curl localhost:8080/api/v1/openapi-schema
<script
id="api-reference"
type="application/json">
{
include::{includedir}/spec.json[]
</script>
<!-- see: https://github.com/scalar/scalar/blob/main/documentation/configuration.md -->
<script>
var configuration = {
darkMode: false,
forceDarkModeState: 'light',
hideDarkModeToggle: true
}
include::{includedir}/spec.json[]
document.getElementById('api-reference').dataset.configuration =
JSON.stringify(configuration)
</script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
++++
Loading

0 comments on commit 7a68f72

Please sign in to comment.