Blame
|
1 | # Plugin: Spoolman API |
||||||
| 2 | ||||||||
| 3 | The **Spoolman API Plugin** exposes a fully Spoolman-compatible REST API that maps to FilaMan's internal data model. External tools like **Moonraker**, **OctoPrint**, and others can use FilaMan as a **drop-in replacement for Spoolman**. Unlike Spoolman itself, this plugin includes **IP-based access control** — a security layer missing in Spoolman. |
|||||||
| 4 | ||||||||
|
5 | **Installation:** → [Admin: Plugin Management](/Docs/En/11-Admin#115-system-plugin-management) |
||||||
|
6 | |||||||
| 7 | --- |
|||||||
| 8 | ||||||||
| 9 | ## Overview |
|||||||
| 10 | ||||||||
| 11 | | Property | Value | |
|||||||
| 12 | |----------|-------| |
|||||||
| 13 | | **Plugin Type** | Integration | |
|||||||
| 14 | | **Author** | FilaMan | |
|||||||
| 15 | | **Source** | [Fire-Devils/filaman-plugins](https://github.com/Fire-Devils/filaman-plugins) (Registry) | |
|||||||
| 16 | | **API Path** | `/spoolman/api/v1/` | |
|||||||
| 17 | | **Capabilities** | Spoolman API v1 compatibility, CRUD operations, CSV/JSON export, IP access control | |
|||||||
| 18 | ||||||||
| 19 | --- |
|||||||
| 20 | ||||||||
| 21 | ## What is Spoolman? |
|||||||
| 22 | ||||||||
| 23 | [Spoolman](https://github.com/Donkie/Spoolman) is a widely used open-source filament management system for 3D printing. Many tools in the 3D printing ecosystem (e.g. Moonraker, OctoPrint) support the Spoolman API for tracking filament usage and managing spools. |
|||||||
| 24 | ||||||||
| 25 | With this plugin, FilaMan can be used instead of Spoolman without needing to reconfigure external tools — they simply speak the same API. |
|||||||
| 26 | ||||||||
| 27 | --- |
|||||||
| 28 | ||||||||
| 29 | ## Configuring External Tools |
|||||||
| 30 | ||||||||
| 31 | ### Moonraker (Klipper) |
|||||||
| 32 | ||||||||
| 33 | Add the following to your `moonraker.conf`: |
|||||||
| 34 | ||||||||
| 35 | ```ini |
|||||||
| 36 | [spoolman] |
|||||||
| 37 | server: http://<filaman-host>:8000/spoolman |
|||||||
| 38 | ``` |
|||||||
| 39 | ||||||||
| 40 | Replace `<filaman-host>` with the IP address or hostname of your FilaMan installation. |
|||||||
| 41 | ||||||||
| 42 | ### OctoPrint |
|||||||
| 43 | ||||||||
| 44 | In the Spoolman plugin settings of OctoPrint, use the URL: |
|||||||
| 45 | ||||||||
| 46 | ``` |
|||||||
| 47 | http://<filaman-host>:8000/spoolman |
|||||||
| 48 | ``` |
|||||||
| 49 | ||||||||
| 50 | ### Other Tools |
|||||||
| 51 | ||||||||
| 52 | Any tool that supports the Spoolman API can be configured with the same URL: |
|||||||
| 53 | ||||||||
| 54 | ``` |
|||||||
| 55 | http://<filaman-host>:8000/spoolman/api/v1/ |
|||||||
| 56 | ``` |
|||||||
| 57 | ||||||||
| 58 | --- |
|||||||
| 59 | ||||||||
| 60 | ## IP Access Control |
|||||||
| 61 | ||||||||
| 62 | The plugin provides **IP-based access control** that lets you restrict which devices are allowed to access the Spoolman API. |
|||||||
| 63 | ||||||||
| 64 | ### Settings |
|||||||
| 65 | ||||||||
| 66 | You can find the settings on the plugin page in the admin area under **Spoolman API**. |
|||||||
| 67 | ||||||||
| 68 | | Setting | Description | |
|||||||
| 69 | |---------|-------------| |
|||||||
| 70 | | **IP filter enabled** | Toggles IP access control on/off. **Disabled** by default (all IPs allowed). | |
|||||||
| 71 | | **Allowed IPs** | List of allowed IP addresses or ranges | |
|||||||
| 72 | ||||||||
| 73 | ### Supported IP Formats |
|||||||
| 74 | ||||||||
| 75 | | Format | Example | Description | |
|||||||
| 76 | |--------|---------|-------------| |
|||||||
| 77 | | **Wildcard** | `*` | Allow all IPs | |
|||||||
| 78 | | **Single IP** | `192.168.1.5` | Exact IP address | |
|||||||
| 79 | | **CIDR range** | `192.168.1.0/24` | Entire subnet | |
|||||||
| 80 | | **Large range** | `10.0.0.0/8` | Large network range | |
|||||||
| 81 | ||||||||
| 82 | > **Note:** When the IP filter is enabled and a non-allowed IP attempts access, the request is rejected with HTTP 403 (Forbidden). |
|||||||
| 83 | ||||||||
| 84 | --- |
|||||||
| 85 | ||||||||
| 86 | ## API Endpoints |
|||||||
| 87 | ||||||||
| 88 | All Spoolman endpoints are available under the path `/spoolman/api/v1/`: |
|||||||
| 89 | ||||||||
| 90 | ### System |
|||||||
| 91 | ||||||||
| 92 | | Method | Path | Description | |
|||||||
| 93 | |--------|------|-------------| |
|||||||
| 94 | | GET | `/info` | API information | |
|||||||
| 95 | | GET | `/health` | Health check | |
|||||||
| 96 | ||||||||
| 97 | ### Vendors |
|||||||
| 98 | ||||||||
| 99 | | Method | Path | Description | |
|||||||
| 100 | |--------|------|-------------| |
|||||||
| 101 | | GET | `/vendor` | List all vendors | |
|||||||
| 102 | | POST | `/vendor` | Create new vendor | |
|||||||
| 103 | | GET | `/vendor/{id}` | Get vendor | |
|||||||
| 104 | | PATCH | `/vendor/{id}` | Update vendor | |
|||||||
| 105 | | DELETE | `/vendor/{id}` | Delete vendor | |
|||||||
| 106 | ||||||||
| 107 | ### Filaments |
|||||||
| 108 | ||||||||
| 109 | | Method | Path | Description | |
|||||||
| 110 | |--------|------|-------------| |
|||||||
| 111 | | GET | `/filament` | List all filaments | |
|||||||
| 112 | | POST | `/filament` | Create new filament | |
|||||||
| 113 | | GET | `/filament/{id}` | Get filament | |
|||||||
| 114 | | PATCH | `/filament/{id}` | Update filament | |
|||||||
| 115 | | DELETE | `/filament/{id}` | Delete filament | |
|||||||
| 116 | ||||||||
| 117 | ### Spools |
|||||||
| 118 | ||||||||
| 119 | | Method | Path | Description | |
|||||||
| 120 | |--------|------|-------------| |
|||||||
| 121 | | GET | `/spool` | List all spools | |
|||||||
| 122 | | POST | `/spool` | Create new spool | |
|||||||
| 123 | | GET | `/spool/{id}` | Get spool | |
|||||||
| 124 | | PATCH | `/spool/{id}` | Update spool | |
|||||||
| 125 | | DELETE | `/spool/{id}` | Delete spool | |
|||||||
| 126 | | PUT | `/spool/{id}/use` | Use filament from spool | |
|||||||
| 127 | | PUT | `/spool/{id}/measure` | Measure spool weight | |
|||||||
| 128 | ||||||||
| 129 | ### Additional Endpoints |
|||||||
| 130 | ||||||||
| 131 | | Method | Path | Description | |
|||||||
| 132 | |--------|------|-------------| |
|||||||
| 133 | | GET | `/material` | List material types | |
|||||||
| 134 | | GET | `/location` | List locations | |
|||||||
| 135 | | PATCH | `/location/{name}` | Rename location | |
|||||||
| 136 | | GET | `/setting/{key}` | Get setting | |
|||||||
| 137 | | POST | `/setting/{key}` | Set setting | |
|||||||
| 138 | ||||||||
| 139 | ### Export |
|||||||
| 140 | ||||||||
| 141 | | Method | Path | Description | |
|||||||
| 142 | |--------|------|-------------| |
|||||||
| 143 | | GET | `/export/spools` | Export spools (CSV/JSON) | |
|||||||
| 144 | | GET | `/export/filaments` | Export filaments (CSV/JSON) | |
|||||||
| 145 | | GET | `/export/vendors` | Export vendors (CSV/JSON) | |
|||||||
| 146 | | POST | `/backup` | Create backup | |
|||||||
| 147 | ||||||||
| 148 | --- |
|||||||
| 149 | ||||||||
| 150 | ## Data Mapping |
|||||||
| 151 | ||||||||
| 152 | Spoolman API terms are mapped internally to the FilaMan data model: |
|||||||
| 153 | ||||||||
| 154 | | Spoolman Term | FilaMan Equivalent | |
|||||||
| 155 | |--------------|-------------------| |
|||||||
| 156 | | Vendor | Manufacturer | |
|||||||
| 157 | | Filament | Filament | |
|||||||
| 158 | | Spool | Spool | |
|||||||
| 159 | | Location | Location | |
|||||||
| 160 | | Extra Fields | Custom Fields | |
|||||||
| 161 | ||||||||
| 162 | --- |
|||||||
| 163 | ||||||||
|
164 | ← [Back: Plugin: SpoolmanDB Import](/Docs/En/15-Plugin-Spoolmandb) | [Next: More Plugins →](#) |
||||||