Last active
October 4, 2023 14:40
-
-
Save Disane87/013e26ae9955d33eca6b2290ef517b68 to your computer and use it in GitHub Desktop.
OpenAPI Spoolman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.1.0", | |
"info": { | |
"title": "Spoolman REST API v1", | |
"version": "1.0.0" | |
}, | |
"paths": { | |
"/info": { | |
"get": { | |
"summary": "Info", | |
"description": "Return general info about the API.", | |
"operationId": "info_info_get", | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Info" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/health": { | |
"get": { | |
"summary": "Health", | |
"description": "Return a health check.", | |
"operationId": "health_health_get", | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HealthCheck" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backup": { | |
"post": { | |
"summary": "Backup", | |
"description": "Trigger a database backup. Only applicable for SQLite databases.", | |
"operationId": "backup_backup_post", | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/BackupResponse" | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/filament": { | |
"get": { | |
"tags": [ | |
"filament" | |
], | |
"summary": "Find Filaments", | |
"description": "Get a list of filaments that matches the search query.", | |
"operationId": "Find_filaments_filament_get", | |
"parameters": [ | |
{ | |
"description": "See vendor.name.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Vendor Name", | |
"description": "See vendor.name." | |
}, | |
"name": "vendor_name", | |
"in": "query" | |
}, | |
{ | |
"description": "See vendor.id.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Vendor ID", | |
"description": "See vendor.id." | |
}, | |
"name": "vendor_id", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Vendor Name", | |
"description": "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." | |
}, | |
"name": "vendor.name", | |
"in": "query" | |
}, | |
{ | |
"description": "Match an exact vendor ID. Separate multiple IDs with a comma. Specify -1 to match filaments with no vendor.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Vendor ID", | |
"description": "Match an exact vendor ID. Separate multiple IDs with a comma. Specify -1 to match filaments with no vendor.", | |
"examples": [ | |
"1", | |
"1,2" | |
] | |
}, | |
"name": "vendor.id", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament Name", | |
"description": "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." | |
}, | |
"name": "name", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament Material", | |
"description": "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." | |
}, | |
"name": "material", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament Article Number", | |
"description": "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." | |
}, | |
"name": "article_number", | |
"in": "query" | |
}, | |
{ | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Sort", | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items." | |
}, | |
"example": "vendor.name:asc,spool_weight:desc", | |
"name": "sort", | |
"in": "query" | |
}, | |
{ | |
"description": "Maximum number of items in the response.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Limit", | |
"description": "Maximum number of items in the response." | |
}, | |
"name": "limit", | |
"in": "query" | |
}, | |
{ | |
"description": "Offset in the full result set if a limit is set.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Offset", | |
"description": "Offset in the full result set if a limit is set.", | |
"default": 0 | |
}, | |
"name": "offset", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"$ref": "#/components/schemas/Filament" | |
}, | |
"type": "array", | |
"title": "Response Find Filaments Filament Get" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"filament" | |
], | |
"summary": "Add Filament", | |
"description": "Add a new filament to the database.", | |
"operationId": "Add_filament_filament_post", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/FilamentParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Filament" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/filament/{filament_id}": { | |
"get": { | |
"tags": [ | |
"filament" | |
], | |
"summary": "Get Filament", | |
"description": "Get a specific filament.", | |
"operationId": "Get_filament_filament__filament_id__get", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Filament Id" | |
}, | |
"name": "filament_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Filament" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"filament" | |
], | |
"summary": "Delete Filament", | |
"description": "Delete a filament.", | |
"operationId": "Delete_filament_filament__filament_id__delete", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Filament Id" | |
}, | |
"name": "filament_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"403": { | |
"description": "Forbidden", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"filament" | |
], | |
"summary": "Update Filament", | |
"description": "Update any attribute of a filament. Only fields specified in the request will be affected.", | |
"operationId": "Update_filament_filament__filament_id__patch", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Filament Id" | |
}, | |
"name": "filament_id", | |
"in": "path" | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/FilamentUpdateParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Filament" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/spool": { | |
"get": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Find Spool", | |
"description": "Get a list of spools that matches the search query.", | |
"operationId": "Find_spool_spool_get", | |
"parameters": [ | |
{ | |
"description": "See filament.name.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Filament Name", | |
"description": "See filament.name." | |
}, | |
"name": "filament_name", | |
"in": "query" | |
}, | |
{ | |
"description": "See filament.id.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Filament ID", | |
"description": "See filament.id." | |
}, | |
"name": "filament_id", | |
"in": "query" | |
}, | |
{ | |
"description": "See filament.material.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Filament Material", | |
"description": "See filament.material." | |
}, | |
"name": "filament_material", | |
"in": "query" | |
}, | |
{ | |
"description": "See filament.vendor.name.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Vendor Name", | |
"description": "See filament.vendor.name." | |
}, | |
"name": "vendor_name", | |
"in": "query" | |
}, | |
{ | |
"description": "See filament.vendor.id.", | |
"required": false, | |
"deprecated": true, | |
"schema": { | |
"type": "string", | |
"title": "Vendor ID", | |
"description": "See filament.vendor.id." | |
}, | |
"name": "vendor_id", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament Name", | |
"description": "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." | |
}, | |
"name": "filament.name", | |
"in": "query" | |
}, | |
{ | |
"description": "Match an exact filament ID. Separate multiple IDs with a comma.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament ID", | |
"description": "Match an exact filament ID. Separate multiple IDs with a comma.", | |
"examples": [ | |
"1", | |
"1,2" | |
] | |
}, | |
"name": "filament.id", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Filament Material", | |
"description": "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." | |
}, | |
"name": "filament.material", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Vendor Name", | |
"description": "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." | |
}, | |
"name": "filament.vendor.name", | |
"in": "query" | |
}, | |
{ | |
"description": "Match an exact vendor ID. Separate multiple IDs with a comma. Set it to -1 to match spools with filaments with no vendor.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Vendor ID", | |
"description": "Match an exact vendor ID. Separate multiple IDs with a comma. Set it to -1 to match spools with filaments with no vendor.", | |
"examples": [ | |
"1", | |
"1,2" | |
] | |
}, | |
"name": "filament.vendor.id", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Location", | |
"description": "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." | |
}, | |
"name": "location", | |
"in": "query" | |
}, | |
{ | |
"description": "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.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Lot/Batch Number", | |
"description": "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." | |
}, | |
"name": "lot_nr", | |
"in": "query" | |
}, | |
{ | |
"description": "Whether to include archived spools in the search results.", | |
"required": false, | |
"schema": { | |
"type": "boolean", | |
"title": "Allow Archived", | |
"description": "Whether to include archived spools in the search results.", | |
"default": false | |
}, | |
"name": "allow_archived", | |
"in": "query" | |
}, | |
{ | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Sort", | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items." | |
}, | |
"example": "filament.name:asc,filament.vendor.id:asc,location:desc", | |
"name": "sort", | |
"in": "query" | |
}, | |
{ | |
"description": "Maximum number of items in the response.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Limit", | |
"description": "Maximum number of items in the response." | |
}, | |
"name": "limit", | |
"in": "query" | |
}, | |
{ | |
"description": "Offset in the full result set if a limit is set.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Offset", | |
"description": "Offset in the full result set if a limit is set.", | |
"default": 0 | |
}, | |
"name": "offset", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"$ref": "#/components/schemas/Spool" | |
}, | |
"type": "array", | |
"title": "Response Find Spool Spool Get" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Add Spool", | |
"description": "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.", | |
"operationId": "Add_spool_spool_post", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/SpoolParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Spool" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/spool/{spool_id}": { | |
"get": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Get Spool", | |
"description": "Get a specific spool. A websocket is served on the same path to listen for changes to the spool. The response model is the same for the websocket messages as for this endpoint.", | |
"operationId": "Get_spool_spool__spool_id__get", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Spool Id" | |
}, | |
"name": "spool_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Spool" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Delete Spool", | |
"description": "Delete a spool.", | |
"operationId": "Delete_spool_spool__spool_id__delete", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Spool Id" | |
}, | |
"name": "spool_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Update Spool", | |
"description": "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.", | |
"operationId": "Update_spool_spool__spool_id__patch", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Spool Id" | |
}, | |
"name": "spool_id", | |
"in": "path" | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/SpoolUpdateParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Spool" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/spool/{spool_id}/use": { | |
"put": { | |
"tags": [ | |
"spool" | |
], | |
"summary": "Use Spool Filament", | |
"description": "Use some length or weight of filament from the spool. Specify either a length or a weight, not both.", | |
"operationId": "Use_spool_filament_spool__spool_id__use_put", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Spool Id" | |
}, | |
"name": "spool_id", | |
"in": "path" | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/SpoolUseParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Spool" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/vendor": { | |
"get": { | |
"tags": [ | |
"vendor" | |
], | |
"summary": "Find Vendor", | |
"description": "Get a list of vendors that matches the search query.", | |
"operationId": "Find_vendor_vendor_get", | |
"parameters": [ | |
{ | |
"description": "Partial case-insensitive search term for the vendor name. Separate multiple terms with a comma.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Vendor Name", | |
"description": "Partial case-insensitive search term for the vendor name. Separate multiple terms with a comma." | |
}, | |
"name": "name", | |
"in": "query" | |
}, | |
{ | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"title": "Sort", | |
"description": "Sort the results by the given field. Should be a comma-separate string with \"field:direction\" items." | |
}, | |
"example": "name:asc,id:desc", | |
"name": "sort", | |
"in": "query" | |
}, | |
{ | |
"description": "Maximum number of items in the response.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Limit", | |
"description": "Maximum number of items in the response." | |
}, | |
"name": "limit", | |
"in": "query" | |
}, | |
{ | |
"description": "Offset in the full result set if a limit is set.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"title": "Offset", | |
"description": "Offset in the full result set if a limit is set.", | |
"default": 0 | |
}, | |
"name": "offset", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"$ref": "#/components/schemas/Vendor" | |
}, | |
"type": "array", | |
"title": "Response Find Vendor Vendor Get" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"vendor" | |
], | |
"summary": "Add Vendor", | |
"description": "Add a new vendor to the database.", | |
"operationId": "Add_vendor_vendor_post", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/VendorParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Vendor" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/vendor/{vendor_id}": { | |
"get": { | |
"tags": [ | |
"vendor" | |
], | |
"summary": "Get Vendor", | |
"description": "Get a specific vendor.", | |
"operationId": "Get_vendor_vendor__vendor_id__get", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Vendor Id" | |
}, | |
"name": "vendor_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Vendor" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"vendor" | |
], | |
"summary": "Delete Vendor", | |
"description": "Delete a vendor. The vendor attribute of any filaments who refer to the deleted vendor will be cleared.", | |
"operationId": "Delete_vendor_vendor__vendor_id__delete", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Vendor Id" | |
}, | |
"name": "vendor_id", | |
"in": "path" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"vendor" | |
], | |
"summary": "Update Vendor", | |
"description": "Update any attribute of a vendor. Only fields specified in the request will be affected.", | |
"operationId": "Update_vendor_vendor__vendor_id__patch", | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"title": "Vendor Id" | |
}, | |
"name": "vendor_id", | |
"in": "path" | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/VendorUpdateParameters" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Vendor" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Message" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/material": { | |
"get": { | |
"tags": [ | |
"other" | |
], | |
"summary": "Find Materials", | |
"description": "Get a list of all filament materials.", | |
"operationId": "Find_materials_material_get", | |
"responses": { | |
"200": { | |
"description": "A list of all filament materials.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"type": "string" | |
}, | |
"type": "array", | |
"title": "Response Find Materials Material Get" | |
}, | |
"example": [ | |
"PLA", | |
"ABS", | |
"PETG" | |
] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/article-number": { | |
"get": { | |
"tags": [ | |
"other" | |
], | |
"summary": "Find Article Numbers", | |
"description": "Get a list of all article numbers.", | |
"operationId": "Find_article_numbers_article_number_get", | |
"responses": { | |
"200": { | |
"description": "A list of all article numbers.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"type": "string" | |
}, | |
"type": "array", | |
"title": "Response Find Article Numbers Article Number Get" | |
}, | |
"example": [ | |
"123456", | |
"987654" | |
] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/lot-number": { | |
"get": { | |
"tags": [ | |
"other" | |
], | |
"summary": "Find Lot Numbers", | |
"description": "Get a list of all lot numbers.", | |
"operationId": "Find_lot_numbers_lot_number_get", | |
"responses": { | |
"200": { | |
"description": "A list of all lot numbers.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"type": "string" | |
}, | |
"type": "array", | |
"title": "Response Find Lot Numbers Lot Number Get" | |
}, | |
"example": [ | |
"123456", | |
"987654" | |
] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/location": { | |
"get": { | |
"tags": [ | |
"other" | |
], | |
"summary": "Find Locations", | |
"description": "Get a list of all spool locations.", | |
"operationId": "Find_locations_location_get", | |
"responses": { | |
"200": { | |
"description": "A list of all spool locations.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"items": { | |
"type": "string" | |
}, | |
"type": "array", | |
"title": "Response Find Locations Location Get" | |
}, | |
"example": [ | |
"Printer 1", | |
"Printer 2", | |
"Storage Shelf A" | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"BackupResponse": { | |
"properties": { | |
"path": { | |
"type": "string", | |
"title": "Path", | |
"description": "Path to the created backup file.", | |
"example": "/home/app/.local/share/spoolman/backups/spoolman.db" | |
} | |
}, | |
"type": "object", | |
"title": "BackupResponse" | |
}, | |
"Filament": { | |
"properties": { | |
"id": { | |
"type": "integer", | |
"title": "Id", | |
"description": "Unique internal ID of this filament type." | |
}, | |
"registered": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Registered", | |
"description": "When the filament was registered in the database. UTC Timezone." | |
}, | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Filament name, to distinguish this filament type among others from the same vendor.Should contain its color for example.", | |
"example": "PolyTerra™ Charcoal Black" | |
}, | |
"vendor": { | |
"allOf": [ | |
{ | |
"$ref": "#/components/schemas/Vendor" | |
} | |
], | |
"title": "Vendor", | |
"description": "The vendor of this filament type." | |
}, | |
"material": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Material", | |
"description": "The material of this filament, e.g. PLA.", | |
"example": "PLA" | |
}, | |
"price": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Price", | |
"description": "The price of this filament in the system configured currency.", | |
"example": 20 | |
}, | |
"density": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Density", | |
"description": "The density of this filament in g/cm3.", | |
"example": 1.24 | |
}, | |
"diameter": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Diameter", | |
"description": "The diameter of this filament in mm.", | |
"example": 1.75 | |
}, | |
"weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Weight", | |
"description": "The weight of the filament in a full spool, in grams.", | |
"example": 1000 | |
}, | |
"spool_weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Spool Weight", | |
"description": "The empty spool weight, in grams.", | |
"example": 140 | |
}, | |
"article_number": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Article Number", | |
"description": "Vendor article number, e.g. EAN, QR code, etc.", | |
"example": "PM70820" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this filament type.", | |
"example": "" | |
}, | |
"settings_extruder_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Extruder Temp", | |
"description": "Overridden extruder temperature, in °C.", | |
"example": 210 | |
}, | |
"settings_bed_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Bed Temp", | |
"description": "Overridden bed temperature, in °C.", | |
"example": 60 | |
}, | |
"color_hex": { | |
"type": "string", | |
"maxLength": 8, | |
"minLength": 6, | |
"title": "Color Hex", | |
"description": "Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end.", | |
"example": "FF0000" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"id", | |
"registered", | |
"density", | |
"diameter" | |
], | |
"title": "Filament" | |
}, | |
"FilamentParameters": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Filament name, to distinguish this filament type among others from the same vendor.Should contain its color for example.", | |
"example": "PolyTerra™ Charcoal Black" | |
}, | |
"vendor_id": { | |
"type": "integer", | |
"title": "Vendor Id", | |
"description": "The ID of the vendor of this filament type." | |
}, | |
"material": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Material", | |
"description": "The material of this filament, e.g. PLA.", | |
"example": "PLA" | |
}, | |
"price": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Price", | |
"description": "The price of this filament in the system configured currency.", | |
"example": 20 | |
}, | |
"density": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Density", | |
"description": "The density of this filament in g/cm3.", | |
"example": 1.24 | |
}, | |
"diameter": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Diameter", | |
"description": "The diameter of this filament in mm.", | |
"example": 1.75 | |
}, | |
"weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Weight", | |
"description": "The weight of the filament in a full spool, in grams. (net weight)", | |
"example": 1000 | |
}, | |
"spool_weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Spool Weight", | |
"description": "The empty spool weight, in grams.", | |
"example": 140 | |
}, | |
"article_number": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Article Number", | |
"description": "Vendor article number, e.g. EAN, QR code, etc.", | |
"example": "PM70820" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this filament type.", | |
"example": "" | |
}, | |
"settings_extruder_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Extruder Temp", | |
"description": "Overridden extruder temperature, in °C.", | |
"example": 210 | |
}, | |
"settings_bed_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Bed Temp", | |
"description": "Overridden bed temperature, in °C.", | |
"example": 60 | |
}, | |
"color_hex": { | |
"type": "string", | |
"title": "Color Hex", | |
"description": "Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end.", | |
"example": "FF0000" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"density", | |
"diameter" | |
], | |
"title": "FilamentParameters" | |
}, | |
"FilamentUpdateParameters": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Filament name, to distinguish this filament type among others from the same vendor.Should contain its color for example.", | |
"example": "PolyTerra™ Charcoal Black" | |
}, | |
"vendor_id": { | |
"type": "integer", | |
"title": "Vendor Id", | |
"description": "The ID of the vendor of this filament type." | |
}, | |
"material": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Material", | |
"description": "The material of this filament, e.g. PLA.", | |
"example": "PLA" | |
}, | |
"price": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Price", | |
"description": "The price of this filament in the system configured currency.", | |
"example": 20 | |
}, | |
"density": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Density", | |
"description": "The density of this filament in g/cm3.", | |
"example": 1.24 | |
}, | |
"diameter": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Diameter", | |
"description": "The diameter of this filament in mm.", | |
"example": 1.75 | |
}, | |
"weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Weight", | |
"description": "The weight of the filament in a full spool, in grams. (net weight)", | |
"example": 1000 | |
}, | |
"spool_weight": { | |
"type": "number", | |
"exclusiveMinimum": 0, | |
"title": "Spool Weight", | |
"description": "The empty spool weight, in grams.", | |
"example": 140 | |
}, | |
"article_number": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Article Number", | |
"description": "Vendor article number, e.g. EAN, QR code, etc.", | |
"example": "PM70820" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this filament type.", | |
"example": "" | |
}, | |
"settings_extruder_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Extruder Temp", | |
"description": "Overridden extruder temperature, in °C.", | |
"example": 210 | |
}, | |
"settings_bed_temp": { | |
"type": "integer", | |
"minimum": 0, | |
"title": "Settings Bed Temp", | |
"description": "Overridden bed temperature, in °C.", | |
"example": 60 | |
}, | |
"color_hex": { | |
"type": "string", | |
"title": "Color Hex", | |
"description": "Hexadecimal color code of the filament, e.g. FF0000 for red. Supports alpha channel at the end.", | |
"example": "FF0000" | |
} | |
}, | |
"type": "object", | |
"title": "FilamentUpdateParameters" | |
}, | |
"HTTPValidationError": { | |
"properties": { | |
"detail": { | |
"items": { | |
"$ref": "#/components/schemas/ValidationError" | |
}, | |
"type": "array", | |
"title": "Detail" | |
} | |
}, | |
"type": "object", | |
"title": "HTTPValidationError" | |
}, | |
"HealthCheck": { | |
"properties": { | |
"status": { | |
"type": "string", | |
"title": "Status", | |
"example": "healthy" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"status" | |
], | |
"title": "HealthCheck" | |
}, | |
"Info": { | |
"properties": { | |
"version": { | |
"type": "string", | |
"title": "Version", | |
"example": "0.7.0" | |
}, | |
"debug_mode": { | |
"type": "boolean", | |
"title": "Debug Mode", | |
"example": false | |
}, | |
"automatic_backups": { | |
"type": "boolean", | |
"title": "Automatic Backups", | |
"example": true | |
}, | |
"data_dir": { | |
"type": "string", | |
"title": "Data Dir", | |
"example": "/home/app/.local/share/spoolman" | |
}, | |
"backups_dir": { | |
"type": "string", | |
"title": "Backups Dir", | |
"example": "/home/app/.local/share/spoolman/backups" | |
}, | |
"db_type": { | |
"type": "string", | |
"title": "Db Type", | |
"example": "sqlite" | |
}, | |
"git_commit": { | |
"type": "string", | |
"title": "Git Commit", | |
"example": "a1b2c3d" | |
}, | |
"build_date": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Build Date", | |
"example": "2021-01-01T00:00:00Z" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"version", | |
"debug_mode", | |
"automatic_backups", | |
"data_dir", | |
"backups_dir", | |
"db_type" | |
], | |
"title": "Info" | |
}, | |
"Message": { | |
"properties": { | |
"message": { | |
"type": "string", | |
"title": "Message" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"message" | |
], | |
"title": "Message" | |
}, | |
"Spool": { | |
"properties": { | |
"id": { | |
"type": "integer", | |
"title": "Id", | |
"description": "Unique internal ID of this spool of filament." | |
}, | |
"registered": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Registered", | |
"description": "When the spool was registered in the database. UTC Timezone." | |
}, | |
"first_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "First Used", | |
"description": "First logged occurence of spool usage. UTC Timezone." | |
}, | |
"last_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Last Used", | |
"description": "Last logged occurence of spool usage. UTC Timezone." | |
}, | |
"filament": { | |
"allOf": [ | |
{ | |
"$ref": "#/components/schemas/Filament" | |
} | |
], | |
"title": "Filament", | |
"description": "The filament type of this spool." | |
}, | |
"remaining_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Remaining Weight", | |
"description": "Estimated remaining weight of filament on the spool in grams. Only set if the filament type has a weight set.", | |
"example": 500.6 | |
}, | |
"used_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Used Weight", | |
"description": "Consumed weight of filament from the spool in grams.", | |
"example": 500.3 | |
}, | |
"remaining_length": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Remaining Length", | |
"description": "Estimated remaining length of filament on the spool in millimeters. Only set if the filament type has a weight set.", | |
"example": 5612.4 | |
}, | |
"used_length": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Used Length", | |
"description": "Consumed length of filament from the spool in millimeters.", | |
"example": 50.7 | |
}, | |
"location": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Location", | |
"description": "Where this spool can be found.", | |
"example": "Shelf A" | |
}, | |
"lot_nr": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Lot Nr", | |
"description": "Vendor manufacturing lot/batch number of the spool.", | |
"example": "52342" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this specific spool.", | |
"example": "" | |
}, | |
"archived": { | |
"type": "boolean", | |
"title": "Archived", | |
"description": "Whether this spool is archived and should not be used anymore." | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"id", | |
"registered", | |
"filament", | |
"used_weight", | |
"used_length", | |
"archived" | |
], | |
"title": "Spool" | |
}, | |
"SpoolParameters": { | |
"properties": { | |
"first_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "First Used", | |
"description": "First logged occurence of spool usage." | |
}, | |
"last_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Last Used", | |
"description": "Last logged occurence of spool usage." | |
}, | |
"filament_id": { | |
"type": "integer", | |
"title": "Filament Id", | |
"description": "The ID of the filament type of this spool." | |
}, | |
"remaining_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Remaining Weight", | |
"description": "Remaining weight of filament on the spool. Can only be used if the filament type has a weight set.", | |
"example": 800 | |
}, | |
"used_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Used Weight", | |
"description": "Used weight of filament on the spool.", | |
"example": 200 | |
}, | |
"location": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Location", | |
"description": "Where this spool can be found.", | |
"example": "Shelf A" | |
}, | |
"lot_nr": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Lot Nr", | |
"description": "Vendor manufacturing lot/batch number of the spool.", | |
"example": "52342" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this specific spool.", | |
"example": "" | |
}, | |
"archived": { | |
"type": "boolean", | |
"title": "Archived", | |
"description": "Whether this spool is archived and should not be used anymore.", | |
"default": false | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"filament_id" | |
], | |
"title": "SpoolParameters" | |
}, | |
"SpoolUpdateParameters": { | |
"properties": { | |
"first_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "First Used", | |
"description": "First logged occurence of spool usage." | |
}, | |
"last_used": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Last Used", | |
"description": "Last logged occurence of spool usage." | |
}, | |
"filament_id": { | |
"type": "integer", | |
"title": "Filament Id", | |
"description": "The ID of the filament type of this spool." | |
}, | |
"remaining_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Remaining Weight", | |
"description": "Remaining weight of filament on the spool. Can only be used if the filament type has a weight set.", | |
"example": 800 | |
}, | |
"used_weight": { | |
"type": "number", | |
"minimum": 0, | |
"title": "Used Weight", | |
"description": "Used weight of filament on the spool.", | |
"example": 200 | |
}, | |
"location": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Location", | |
"description": "Where this spool can be found.", | |
"example": "Shelf A" | |
}, | |
"lot_nr": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Lot Nr", | |
"description": "Vendor manufacturing lot/batch number of the spool.", | |
"example": "52342" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this specific spool.", | |
"example": "" | |
}, | |
"archived": { | |
"type": "boolean", | |
"title": "Archived", | |
"description": "Whether this spool is archived and should not be used anymore.", | |
"default": false | |
} | |
}, | |
"type": "object", | |
"title": "SpoolUpdateParameters" | |
}, | |
"SpoolUseParameters": { | |
"properties": { | |
"use_length": { | |
"type": "number", | |
"title": "Use Length", | |
"description": "Length of filament to reduce by, in mm.", | |
"example": 2.2 | |
}, | |
"use_weight": { | |
"type": "number", | |
"title": "Use Weight", | |
"description": "Filament weight to reduce by, in g.", | |
"example": 5.3 | |
} | |
}, | |
"type": "object", | |
"title": "SpoolUseParameters" | |
}, | |
"ValidationError": { | |
"properties": { | |
"loc": { | |
"items": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "integer" | |
} | |
] | |
}, | |
"type": "array", | |
"title": "Location" | |
}, | |
"msg": { | |
"type": "string", | |
"title": "Message" | |
}, | |
"type": { | |
"type": "string", | |
"title": "Error Type" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"loc", | |
"msg", | |
"type" | |
], | |
"title": "ValidationError" | |
}, | |
"Vendor": { | |
"properties": { | |
"id": { | |
"type": "integer", | |
"title": "Id", | |
"description": "Unique internal ID of this vendor." | |
}, | |
"registered": { | |
"type": "string", | |
"format": "date-time", | |
"title": "Registered", | |
"description": "When the vendor was registered in the database. UTC Timezone." | |
}, | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Vendor name.", | |
"example": "Polymaker" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this vendor.", | |
"example": "" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"id", | |
"registered", | |
"name" | |
], | |
"title": "Vendor" | |
}, | |
"VendorParameters": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Vendor name.", | |
"example": "Polymaker" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this vendor.", | |
"example": "" | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"name" | |
], | |
"title": "VendorParameters" | |
}, | |
"VendorUpdateParameters": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"maxLength": 64, | |
"title": "Name", | |
"description": "Vendor name.", | |
"example": "Polymaker" | |
}, | |
"comment": { | |
"type": "string", | |
"maxLength": 1024, | |
"title": "Comment", | |
"description": "Free text comment about this vendor.", | |
"example": "" | |
} | |
}, | |
"type": "object", | |
"title": "VendorUpdateParameters" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment