Skip to content

Commit

Permalink
add API section to readme.md (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroxso authored Mar 17, 2024
1 parent 2f1a6c5 commit 75d5643
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,35 @@ The bitaxetool requires a config.cvs preloaded file and the appropiate firmware.
```
bitaxetool --config ./config.cvs --firmware ./esp-miner-factory-v2.0.3.bin
```

## API
Bitaxe provides an API to expose actions and information.

For more details take a look at `main/http_server/http_server.c`.

Things that can be done are:

- Get System Info
- Get Swarm Info
- Update Swarm
- Swarm Options
- System Restart Action
- Update System Settings Action
- System Options
- Update OTA Firmware
- Update OTA WWW
- WebSocket

Some API examples in curl:
```bash
# Get system information
curl http://YOUR-BITAXE-IP/api/system/info
```
```bash
# Get swarm information
curl http://YOUR-BITAXE-IP/api/swarm/info
```
```bash
# System restart action
curl -X POST http://YOUR-BITAXE-IP/api/system/restart
```

0 comments on commit 75d5643

Please sign in to comment.