Spoolman REST API v1 (1.0.0)

Download OpenAPI specification:Download

REST API for Spoolman.

The API is served on the path `/api/v1/`.

Some endpoints also serve a websocket on the same path. The websocket is used to listen for changes to the data
that the endpoint serves. The websocket messages are JSON objects. Additionally, there is a root-level websocket
endpoint that listens for changes to any data in the database.

Info

Return general info about the API.

Responses

Response samples

Content type
application/json
{
  • "version": "0.7.0",
  • "debug_mode": false,
  • "automatic_backups": true,
  • "data_dir": "/home/app/.local/share/spoolman",
  • "logs_dir": "/home/app/.local/share/spoolman",
  • "backups_dir": "/home/app/.local/share/spoolman/backups",
  • "db_type": "sqlite",
  • "git_commit": "a1b2c3d",
  • "build_date": "2021-01-01T00:00:00Z"
}

Health

Return a health check.

Responses

Response samples

Content type
application/json
{
  • "status": "healthy"
}

Backup

Trigger a database backup. Only applicable for SQLite databases.

Responses

Response samples

Content type
application/json
{
  • "path": "/home/app/.local/share/spoolman/backups/spoolman.db"
}

filament

Find Filaments

Get a list of filaments that matches the search query. A websocket is served on the same path to listen for updates to any filament, or added or deleted filaments. See the HTTP Response code 299 for the content of the websocket messages.

query Parameters
Vendor Name (string) or Vendor Name (null) (Vendor Name)
Deprecated

See vendor.name.

Vendor ID (string) or Vendor ID (null) (Vendor ID)
Deprecated

See vendor.id.

Vendor Name (string) or Vendor Name (null) (Vendor Name)

Partial case-insensitive search term for the filament vendor name. Separate multiple terms with a comma. Specify an empty string to match filaments with no vendor name. Surround a term with quotes to search for the exact term.

Vendor ID (string) or Vendor ID (null) (Vendor ID)
Examples: vendor.id=1 vendor.id=1,2

Match an exact vendor ID. Separate multiple IDs with a comma. Specify -1 to match filaments with no vendor.

Filament Name (string) or Filament Name (null) (Filament Name)

Partial case-insensitive search term for the filament name. Separate multiple terms with a comma. Specify an empty string to match filaments with no name. Surround a term with quotes to search for the exact term.

Filament Material (string) or Filament Material (null) (Filament Material)

Partial case-insensitive search term for the filament material. Separate multiple terms with a comma. Specify an empty string to match filaments with no material. Surround a term with quotes to search for the exact term.

Filament Article Number (string) or Filament Article Number (null) (Filament Article Number)

Partial case-insensitive search term for the filament article number. Separate multiple terms with a comma. Specify an empty string to match filaments with no article number. Surround a term with quotes to search for the exact term.

Filament Color (string) or Filament Color (null) (Filament Color)

Match filament by similar color. Slow operation!

color_similarity_threshold
number (Color Similarity Threshold)
Default: 20
Example: color_similarity_threshold=20

The similarity threshold for color matching. A value between 0.0-100.0, where 0 means match only exactly the same color.

External Id (string) or External Id (null) (External Id)
Example: external_id=polymaker_pla_polysonicblack_1000_175

Find filaments imported by the given external ID. Separate multiple IDs with a comma. Specify empty string to match filaments with no external ID. Surround a term with quotes to search for the exact term.

Sort (string) or Sort (null) (Sort)
Example: sort=vendor.name:asc,spool_weight:desc

Sort the results by the given field. Should be a comma-separate string with "field:direction" items.

Limit (integer) or Limit (null) (Limit)

Maximum number of items in the response.

offset
integer (Offset)
Default: 0

Offset in the full result set if a limit is set.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Filament

Add a new filament to the database.

Request Body schema: application/json
required
Name (string) or Name (null) (Name)

Filament name, to distinguish this filament type among others from the same vendor.Should contain its color for example.

Vendor Id (integer) or Vendor Id (null) (Vendor Id)

The ID of the vendor of this filament type.

Material (string) or Material (null) (Material)

The material of this filament, e.g. PLA.

Price (number) or Price (null) (Price)

The price of this filament in the system configured currency.

density
required
number (Density) > 0

The density of this filament in g/cm3.

diameter
required
number (Diameter) > 0

The diameter of this filament in mm.

Weight (number) or Weight (null) (Weight)

The weight of the filament in a full spool, in grams. (net weight)

Spool Weight (number) or Spool Weight (null) (Spool Weight)

The empty spool weight, in grams.

Article Number (string) or Article Number (null) (Article Number)

Vendor article number, e.g. EAN, QR code, etc.

Comment (string) or Comment (null) (Comment)

Free text comment about this filament type.

Settings Extruder Temp (integer) or Settings Extruder Temp (null) (Settings Extruder Temp)

Overridden extruder temperature, in °C.

Settings Bed Temp (integer) or Settings Bed Temp (null) (Settings Bed Temp)

Overridden bed temperature, in °C.

Color Hex (string) or Color Hex (null) (Color Hex)

Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end. If it's a multi-color filament, the multi_color_hexes field is used instead.

Multi Color Hexes (string) or Multi Color Hexes (null) (Multi Color Hexes)

Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end. Specifying multiple colors separated by commas. Also set the multi_color_direction field if you specify multiple colors.

MultiColorDirection (string) or null

Type of multi-color filament. Only set if the color_hex field contains multiple colors.

External Id (string) or External Id (null) (External Id)

Set if this filament comes from an external database. This contains the ID in the external database.

Extra (object) or Extra (null) (Extra)

Extra fields for this filament.

Responses

Request samples

Content type
application/json
{
  • "name": "PolyTerra™ Charcoal Black",
  • "vendor_id": 0,
  • "material": "PLA",
  • "price": 20,
  • "density": 1.24,
  • "diameter": 1.75,
  • "weight": 1000,
  • "spool_weight": 140,
  • "article_number": "PM70820",
  • "comment": "",
  • "settings_extruder_temp": 210,
  • "settings_bed_temp": 60,
  • "color_hex": "FF0000",
  • "multi_color_hexes": "FF0000,00FF00,0000FF",
  • "multi_color_direction": "coaxial",
  • "external_id": "polymaker_pla_polysonicblack_1000_175",
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "PolyTerra™ Charcoal Black",
  • "vendor": {
    },
  • "material": "PLA",
  • "price": 20,
  • "density": 1.24,
  • "diameter": 1.75,
  • "weight": 1000,
  • "spool_weight": 140,
  • "article_number": "PM70820",
  • "comment": "",
  • "settings_extruder_temp": 210,
  • "settings_bed_temp": 60,
  • "color_hex": "FF0000",
  • "multi_color_hexes": "FF0000,00FF00,0000FF",
  • "multi_color_direction": "coaxial",
  • "external_id": "polymaker_pla_polysonicblack_1000_175",
  • "extra": {
    }
}

Get Filament

Get a specific filament. A websocket is served on the same path to listen for changes to the filament. See the HTTP Response code 299 for the content of the websocket messages.

path Parameters
filament_id
required
integer (Filament Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "PolyTerra™ Charcoal Black",
  • "vendor": {
    },
  • "material": "PLA",
  • "price": 20,
  • "density": 1.24,
  • "diameter": 1.75,
  • "weight": 1000,
  • "spool_weight": 140,
  • "article_number": "PM70820",
  • "comment": "",
  • "settings_extruder_temp": 210,
  • "settings_bed_temp": 60,
  • "color_hex": "FF0000",
  • "multi_color_hexes": "FF0000,00FF00,0000FF",
  • "multi_color_direction": "coaxial",
  • "external_id": "polymaker_pla_polysonicblack_1000_175",
  • "extra": {
    }
}

Update Filament

Update any attribute of a filament. Only fields specified in the request will be affected. If extra is set, all existing extra fields will be removed and replaced with the new ones.

path Parameters
filament_id
required
integer (Filament Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)

Filament name, to distinguish this filament type among others from the same vendor.Should contain its color for example.

Vendor Id (integer) or Vendor Id (null) (Vendor Id)

The ID of the vendor of this filament type.

Material (string) or Material (null) (Material)

The material of this filament, e.g. PLA.

Price (number) or Price (null) (Price)

The price of this filament in the system configured currency.

Density (number) or Density (null) (Density)

The density of this filament in g/cm3.

Diameter (number) or Diameter (null) (Diameter)

The diameter of this filament in mm.

Weight (number) or Weight (null) (Weight)

The weight of the filament in a full spool, in grams. (net weight)

Spool Weight (number) or Spool Weight (null) (Spool Weight)

The empty spool weight, in grams.

Article Number (string) or Article Number (null) (Article Number)

Vendor article number, e.g. EAN, QR code, etc.

Comment (string) or Comment (null) (Comment)

Free text comment about this filament type.

Settings Extruder Temp (integer) or Settings Extruder Temp (null) (Settings Extruder Temp)

Overridden extruder temperature, in °C.

Settings Bed Temp (integer) or Settings Bed Temp (null) (Settings Bed Temp)

Overridden bed temperature, in °C.

Color Hex (string) or Color Hex (null) (Color Hex)

Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end. If it's a multi-color filament, the multi_color_hexes field is used instead.

Multi Color Hexes (string) or Multi Color Hexes (null) (Multi Color Hexes)

Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end. Specifying multiple colors separated by commas. Also set the multi_color_direction field if you specify multiple colors.

MultiColorDirection (string) or null

Type of multi-color filament. Only set if the color_hex field contains multiple colors.

External Id (string) or External Id (null) (External Id)

Set if this filament comes from an external database. This contains the ID in the external database.

Extra (object) or Extra (null) (Extra)

Extra fields for this filament.

Responses

Request samples

Content type
application/json
{
  • "name": "PolyTerra™ Charcoal Black",
  • "vendor_id": 0,
  • "material": "PLA",
  • "price": 20,
  • "density": 1.24,
  • "diameter": 1.75,
  • "weight": 1000,
  • "spool_weight": 140,
  • "article_number": "PM70820",
  • "comment": "",
  • "settings_extruder_temp": 210,
  • "settings_bed_temp": 60,
  • "color_hex": "FF0000",
  • "multi_color_hexes": "FF0000,00FF00,0000FF",
  • "multi_color_direction": "coaxial",
  • "external_id": "polymaker_pla_polysonicblack_1000_175",
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "PolyTerra™ Charcoal Black",
  • "vendor": {
    },
  • "material": "PLA",
  • "price": 20,
  • "density": 1.24,
  • "diameter": 1.75,
  • "weight": 1000,
  • "spool_weight": 140,
  • "article_number": "PM70820",
  • "comment": "",
  • "settings_extruder_temp": 210,
  • "settings_bed_temp": 60,
  • "color_hex": "FF0000",
  • "multi_color_hexes": "FF0000,00FF00,0000FF",
  • "multi_color_direction": "coaxial",
  • "external_id": "polymaker_pla_polysonicblack_1000_175",
  • "extra": {
    }
}

Delete Filament

Delete a filament.

path Parameters
filament_id
required
integer (Filament Id)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

spool

Find Spool

Get a list of spools that matches the search query. A websocket is served on the same path to listen for updates to any spool, or added or deleted spools. See the HTTP Response code 299 for the content of the websocket messages.

query Parameters
Filament Name (string) or Filament Name (null) (Filament Name)
Deprecated

See filament.name.

Filament ID (string) or Filament ID (null) (Filament ID)
Deprecated

See filament.id.

Filament Material (string) or Filament Material (null) (Filament Material)
Deprecated

See filament.material.

Vendor Name (string) or Vendor Name (null) (Vendor Name)
Deprecated

See filament.vendor.name.

Vendor ID (string) or Vendor ID (null) (Vendor ID)
Deprecated

See filament.vendor.id.

Filament Name (string) or Filament Name (null) (Filament Name)

Partial case-insensitive search term for the filament name. Separate multiple terms with a comma. Specify an empty string to match spools with no filament name. Surround a term with quotes to search for the exact term.

Filament ID (string) or Filament ID (null) (Filament ID)
Examples: filament.id=1 filament.id=1,2

Match an exact filament ID. Separate multiple IDs with a comma.

Filament Material (string) or Filament Material (null) (Filament Material)

Partial case-insensitive search term for the filament material. Separate multiple terms with a comma. Specify an empty string to match spools with no filament material. Surround a term with quotes to search for the exact term.

Vendor Name (string) or Vendor Name (null) (Vendor Name)

Partial case-insensitive search term for the filament vendor name. Separate multiple terms with a comma. Specify an empty string to match spools with no vendor name. Surround a term with quotes to search for the exact term.

Vendor ID (string) or Vendor ID (null) (Vendor ID)
Examples: filament.vendor.id=1 filament.vendor.id=1,2

Match an exact vendor ID. Separate multiple IDs with a comma. Set it to -1 to match spools with filaments with no vendor.

Location (string) or Location (null) (Location)

Partial case-insensitive search term for the spool location. Separate multiple terms with a comma. Specify an empty string to match spools with no location. Surround a term with quotes to search for the exact term.

Lot/Batch Number (string) or Lot/Batch Number (null) (Lot/Batch Number)

Partial case-insensitive search term for the spool lot number. Separate multiple terms with a comma. Specify an empty string to match spools with no lot nr. Surround a term with quotes to search for the exact term.

allow_archived
boolean (Allow Archived)
Default: false

Whether to include archived spools in the search results.

Sort (string) or Sort (null) (Sort)
Example: sort=filament.name:asc,filament.vendor.id:asc,location:desc

Sort the results by the given field. Should be a comma-separate string with "field:direction" items.

Limit (integer) or Limit (null) (Limit)

Maximum number of items in the response.

offset
integer (Offset)
Default: 0

Offset in the full result set if a limit is set.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Spool

Add a new spool to the database. Only specify either remaining_weight or used_weight. If no weight is set, the spool will be assumed to be full.

Request Body schema: application/json
required
First Used (string) or First Used (null) (First Used)

First logged occurence of spool usage.

Last Used (string) or Last Used (null) (Last Used)

Last logged occurence of spool usage.

filament_id
required
integer (Filament Id)

The ID of the filament type of this spool.

Price (number) or Price (null) (Price)

The price of this filament in the system configured currency.

Initial Weight (number) or Initial Weight (null) (Initial Weight)

The initial weight of the filament on the spool, in grams. (net weight)

Spool Weight (number) or Spool Weight (null) (Spool Weight)

The weight of an empty spool, in grams. (tare weight)

Remaining Weight (number) or Remaining Weight (null) (Remaining Weight)

Remaining weight of filament on the spool. Can only be used if the filament type has a weight set.

Used Weight (number) or Used Weight (null) (Used Weight)

Used weight of filament on the spool.

Location (string) or Location (null) (Location)

Where this spool can be found.

Lot Nr (string) or Lot Nr (null) (Lot Nr)

Vendor manufacturing lot/batch number of the spool.

Comment (string) or Comment (null) (Comment)

Free text comment about this specific spool.

archived
boolean (Archived)
Default: false

Whether this spool is archived and should not be used anymore.

Extra (object) or Extra (null) (Extra)

Extra fields for this spool.

Responses

Request samples

Content type
application/json
{
  • "first_used": "2019-08-24T14:15:22Z",
  • "last_used": "2019-08-24T14:15:22Z",
  • "filament_id": 0,
  • "price": 20,
  • "initial_weight": 200,
  • "spool_weight": 200,
  • "remaining_weight": 800,
  • "used_weight": 200,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": false,
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "first_used": "string",
  • "last_used": "string",
  • "filament": {
    },
  • "price": 20,
  • "remaining_weight": 500.6,
  • "initial_weight": 1246,
  • "spool_weight": 246,
  • "used_weight": 500.3,
  • "remaining_length": 5612.4,
  • "used_length": 50.7,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": true,
  • "extra": {
    }
}

Get Spool

Get a specific spool. A websocket is served on the same path to listen for changes to the spool. See the HTTP Response code 299 for the content of the websocket messages.

path Parameters
spool_id
required
integer (Spool Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "first_used": "string",
  • "last_used": "string",
  • "filament": {
    },
  • "price": 20,
  • "remaining_weight": 500.6,
  • "initial_weight": 1246,
  • "spool_weight": 246,
  • "used_weight": 500.3,
  • "remaining_length": 5612.4,
  • "used_length": 50.7,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": true,
  • "extra": {
    }
}

Update Spool

Update any attribute of a spool. Only fields specified in the request will be affected. remaining_weight and used_weight can't be set at the same time. If extra is set, all existing extra fields will be removed and replaced with the new ones.

path Parameters
spool_id
required
integer (Spool Id)
Request Body schema: application/json
required
First Used (string) or First Used (null) (First Used)

First logged occurence of spool usage.

Last Used (string) or Last Used (null) (Last Used)

Last logged occurence of spool usage.

Filament Id (integer) or Filament Id (null) (Filament Id)

The ID of the filament type of this spool.

Price (number) or Price (null) (Price)

The price of this filament in the system configured currency.

Initial Weight (number) or Initial Weight (null) (Initial Weight)

The initial weight of the filament on the spool, in grams. (net weight)

Spool Weight (number) or Spool Weight (null) (Spool Weight)

The weight of an empty spool, in grams. (tare weight)

Remaining Weight (number) or Remaining Weight (null) (Remaining Weight)

Remaining weight of filament on the spool. Can only be used if the filament type has a weight set.

Used Weight (number) or Used Weight (null) (Used Weight)

Used weight of filament on the spool.

Location (string) or Location (null) (Location)

Where this spool can be found.

Lot Nr (string) or Lot Nr (null) (Lot Nr)

Vendor manufacturing lot/batch number of the spool.

Comment (string) or Comment (null) (Comment)

Free text comment about this specific spool.

archived
boolean (Archived)
Default: false

Whether this spool is archived and should not be used anymore.

Extra (object) or Extra (null) (Extra)

Extra fields for this spool.

Responses

Request samples

Content type
application/json
{
  • "first_used": "2019-08-24T14:15:22Z",
  • "last_used": "2019-08-24T14:15:22Z",
  • "filament_id": 0,
  • "price": 20,
  • "initial_weight": 200,
  • "spool_weight": 200,
  • "remaining_weight": 800,
  • "used_weight": 200,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": false,
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "first_used": "string",
  • "last_used": "string",
  • "filament": {
    },
  • "price": 20,
  • "remaining_weight": 500.6,
  • "initial_weight": 1246,
  • "spool_weight": 246,
  • "used_weight": 500.3,
  • "remaining_length": 5612.4,
  • "used_length": 50.7,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": true,
  • "extra": {
    }
}

Delete Spool

Delete a spool.

path Parameters
spool_id
required
integer (Spool Id)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Use Spool Filament

Use some length or weight of filament from the spool. Specify either a length or a weight, not both.

path Parameters
spool_id
required
integer (Spool Id)
Request Body schema: application/json
required
Use Length (number) or Use Length (null) (Use Length)

Length of filament to reduce by, in mm.

Use Weight (number) or Use Weight (null) (Use Weight)

Filament weight to reduce by, in g.

Responses

Request samples

Content type
application/json
{
  • "use_length": 2.2,
  • "use_weight": 5.3
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "first_used": "string",
  • "last_used": "string",
  • "filament": {
    },
  • "price": 20,
  • "remaining_weight": 500.6,
  • "initial_weight": 1246,
  • "spool_weight": 246,
  • "used_weight": 500.3,
  • "remaining_length": 5612.4,
  • "used_length": 50.7,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": true,
  • "extra": {
    }
}

Use Spool Filament Based On The Current Weight Measurement

Use some weight of filament from the spool. Specify the current gross weight of the spool.

path Parameters
spool_id
required
integer (Spool Id)
Request Body schema: application/json
required
weight
required
number (Weight)

Current gross weight of the spool, in g.

Responses

Request samples

Content type
application/json
{
  • "weight": 200
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "first_used": "string",
  • "last_used": "string",
  • "filament": {
    },
  • "price": 20,
  • "remaining_weight": 500.6,
  • "initial_weight": 1246,
  • "spool_weight": 246,
  • "used_weight": 500.3,
  • "remaining_length": 5612.4,
  • "used_length": 50.7,
  • "location": "Shelf A",
  • "lot_nr": "52342",
  • "comment": "",
  • "archived": true,
  • "extra": {
    }
}

vendor

Find Vendor

Get a list of vendors that matches the search query. A websocket is served on the same path to listen for updates to any vendor, or added or deleted vendors. See the HTTP Response code 299 for the content of the websocket messages.

query Parameters
Vendor Name (string) or Vendor Name (null) (Vendor Name)

Partial case-insensitive search term for the vendor name. Separate multiple terms with a comma. Surround a term with quotes to search for the exact term.

Vendor External ID (string) or Vendor External ID (null) (Vendor External ID)

Exact match for the vendor external ID. Separate multiple IDs with a comma. Specify empty string to match filaments with no external ID. Surround a term with quotes to search for the exact term.

Sort (string) or Sort (null) (Sort)
Example: sort=name:asc,id:desc

Sort the results by the given field. Should be a comma-separate string with "field:direction" items.

Limit (integer) or Limit (null) (Limit)

Maximum number of items in the response.

offset
integer (Offset)
Default: 0

Offset in the full result set if a limit is set.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Vendor

Add a new vendor to the database.

Request Body schema: application/json
required
name
required
string (Name) <= 64 characters

Vendor name.

Comment (string) or Comment (null) (Comment)

Free text comment about this vendor.

Empty Spool Weight (number) or Empty Spool Weight (null) (Empty Spool Weight)

The weight of an empty spool, in grams.

External Id (string) or External Id (null) (External Id)

Set if this vendor comes from an external database. This contains the ID in the external database.

Extra (object) or Extra (null) (Extra)

Extra fields for this vendor.

Responses

Request samples

Content type
application/json
{
  • "name": "Polymaker",
  • "comment": "",
  • "empty_spool_weight": 200,
  • "external_id": "eSun",
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "Polymaker",
  • "comment": "",
  • "empty_spool_weight": 140,
  • "external_id": "eSun",
  • "extra": {
    }
}

Get Vendor

Get a specific vendor. A websocket is served on the same path to listen for changes to the vendor. See the HTTP Response code 299 for the content of the websocket messages.

path Parameters
vendor_id
required
integer (Vendor Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "Polymaker",
  • "comment": "",
  • "empty_spool_weight": 140,
  • "external_id": "eSun",
  • "extra": {
    }
}

Update Vendor

Update any attribute of a vendor. Only fields specified in the request will be affected. If extra is set, all existing extra fields will be removed and replaced with the new ones.

path Parameters
vendor_id
required
integer (Vendor Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)

Vendor name.

Comment (string) or Comment (null) (Comment)

Free text comment about this vendor.

Empty Spool Weight (number) or Empty Spool Weight (null) (Empty Spool Weight)

The weight of an empty spool, in grams.

External Id (string) or External Id (null) (External Id)

Set if this vendor comes from an external database. This contains the ID in the external database.

Extra (object) or Extra (null) (Extra)

Extra fields for this vendor.

Responses

Request samples

Content type
application/json
{
  • "name": "Polymaker",
  • "comment": "",
  • "empty_spool_weight": 200,
  • "external_id": "eSun",
  • "extra": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "registered": "string",
  • "name": "Polymaker",
  • "comment": "",
  • "empty_spool_weight": 140,
  • "external_id": "eSun",
  • "extra": {
    }
}

Delete Vendor

Delete a vendor. The vendor attribute of any filaments who refer to the deleted vendor will be cleared.

path Parameters
vendor_id
required
integer (Vendor Id)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

setting

Get Setting

Get a specific setting. If the setting has not been set, the default value will be returned.A websocket is served on the same path to listen for changes to the setting. See the HTTP Response code 299 for the content of the websocket messages.

path Parameters
key
required
string (Key)

Responses

Response samples

Content type
application/json
{
  • "value": "string",
  • "is_set": true,
  • "type": "boolean"
}

Set Setting

Set the value of a setting. The body must match the JSON type of the setting. An empty body or a body containing only 'null' will reset the setting to its default value. The new value will be returned.

path Parameters
key
required
string (Key)
Request Body schema: application/json
required
string (Body)

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
{
  • "value": "string",
  • "is_set": true,
  • "type": "boolean"
}

Get All Settings

Get all settings, set or not. If the setting has not been set, 'value' will be the default value.

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

field

Get Extra Fields

Get all extra fields for a specific entity type.

path Parameters
entity_type
required
string (EntityType)
Enum: "vendor" "filament" "spool"

Entity type this field is for

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Or Update Extra Field

Add or update an extra field for a specific entity type. Returns the full list of extra fields for the entity type.

path Parameters
entity_type
required
string (EntityType)
Enum: "vendor" "filament" "spool"

Entity type this field is for

key
required
string (Key) [ 1 .. 64 ] characters ^[a-z0-9_]+$
Request Body schema: application/json
required
name
required
string (Name) [ 1 .. 128 ] characters

Nice name

order
integer (Order)
Default: 0

Order of the field

Unit (string) or Unit (null) (Unit)

Unit of the value

field_type
required
string (ExtraFieldType)
Enum: "text" "integer" "integer_range" "float" "float_range" "datetime" "boolean" "choice"

Type of the field

Default Value (string) or Default Value (null) (Default Value)

Default value of the field

Array of Choices (strings) or Choices (null) (Choices)

Choices for the field, only for field type choice

Multi Choice (boolean) or Multi Choice (null) (Multi Choice)

Whether multiple choices can be selected

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "order": 0,
  • "unit": "string",
  • "field_type": "text",
  • "default_value": "string",
  • "choices": [
    ],
  • "multi_choice": true
}

Response samples

Content type
application/json
[
  • {
    }
]

Delete Extra Field

Delete an extra field for a specific entity type. Returns the full list of extra fields for the entity type.

path Parameters
entity_type
required
string (EntityType)
Enum: "vendor" "filament" "spool"

Entity type this field is for

key
required
string (Key) [ 1 .. 64 ] characters ^[a-z0-9_]+$

Responses

Response samples

Content type
application/json
[
  • {
    }
]

other

Find Materials

Get a list of all filament materials.

Responses

Response samples

Content type
application/json
[
  • "PLA",
  • "ABS",
  • "PETG"
]

Find Article Numbers

Get a list of all article numbers.

Responses

Response samples

Content type
application/json
[
  • "123456",
  • "987654"
]

Find Lot Numbers

Get a list of all lot numbers.

Responses

Response samples

Content type
application/json
[
  • "123456",
  • "987654"
]

Find Locations

Get a list of all spool locations.

Responses

Response samples

Content type
application/json
[
  • "Printer 1",
  • "Printer 2",
  • "Storage Shelf A"
]

Rename Location

Rename a spool location. All spools in this location will be moved to the new location.

path Parameters
location
required
string (Location)
Request Body schema: application/json
required
name
required
string (Name) non-empty

The new name of the location.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
"string"

external

Get All External Filaments

Get all external filaments.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get All External Materials

Get all external materials.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

export

Export Spools

Export the list of spools in various formats. Filament and vendor data is included.

query Parameters
fmt
required
string (ExportFormat)
Enum: "csv" "json"

Responses

Response samples

Content type
application/json
null

Export Filaments

Export the list of filaments in various formats. Vendor data is included.

query Parameters
fmt
required
string (ExportFormat)
Enum: "csv" "json"

Responses

Response samples

Content type
application/json
null

Export Vendors

Export the list of vendors in various formats.

query Parameters
fmt
required
string (ExportFormat)
Enum: "csv" "json"

Responses

Response samples

Content type
application/json
null