2024-07-30 19:57:57 -07:00
{
"components" : {
"responses" : {
"Error" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Error"
}
}
} ,
"description" : "Error"
}
} ,
"schemas" : {
"Error" : {
"description" : "Error information from a response." ,
"properties" : {
"error_code" : {
"type" : "string"
} ,
"message" : {
"type" : "string"
} ,
"request_id" : {
"type" : "string"
}
} ,
"required" : [
"message" ,
"request_id"
] ,
"type" : "object"
} ,
2024-08-28 15:15:37 -04:00
"ExtraMachineInfoResponse" : {
"description" : "Extra machine-specific information regarding a connected machine." ,
2024-08-02 14:10:52 -07:00
"oneOf" : [
{
"additionalProperties" : false ,
"properties" : {
2024-08-28 15:15:37 -04:00
"Moonraker" : {
"type" : "object"
2024-08-02 14:10:52 -07:00
}
} ,
"required" : [
2024-08-28 15:15:37 -04:00
"Moonraker"
2024-08-02 14:10:52 -07:00
] ,
"type" : "object"
} ,
{
"additionalProperties" : false ,
"properties" : {
2024-08-28 15:15:37 -04:00
"Usb" : {
"type" : "object"
2024-08-02 14:10:52 -07:00
}
} ,
"required" : [
2024-08-28 15:15:37 -04:00
"Usb"
2024-08-02 14:10:52 -07:00
] ,
"type" : "object"
} ,
{
"additionalProperties" : false ,
"properties" : {
2024-08-28 15:15:37 -04:00
"Bambu" : {
2024-08-02 14:10:52 -07:00
"type" : "object"
}
} ,
"required" : [
2024-08-28 15:15:37 -04:00
"Bambu"
2024-08-02 14:10:52 -07:00
] ,
"type" : "object"
}
]
} ,
2024-08-28 15:15:37 -04:00
"MachineInfoResponse" : {
"description" : "Information regarding a connected machine." ,
"properties" : {
"extra" : {
"allOf" : [
{
"$ref" : "#/components/schemas/ExtraMachineInfoResponse"
2024-08-02 14:10:52 -07:00
}
] ,
2024-08-28 15:15:37 -04:00
"description" : "Additional, per-machine information which is specific to the underlying machine type." ,
"nullable" : true
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"id" : {
"description" : "Machine Identifier (ID) for the specific Machine." ,
"type" : "string"
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"machine_type" : {
"allOf" : [
{
"$ref" : "#/components/schemas/MachineType"
2024-08-02 14:10:52 -07:00
}
] ,
2024-08-28 15:15:37 -04:00
"description" : "Information regarding the method of manufacture."
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"make_model" : {
"allOf" : [
{
"$ref" : "#/components/schemas/MachineMakeModel"
2024-08-14 14:52:40 -07:00
}
] ,
2024-08-28 15:15:37 -04:00
"description" : "Information regarding the make and model of the attached Machine."
2024-08-14 14:52:40 -07:00
} ,
2024-08-28 15:15:37 -04:00
"max_part_volume" : {
"allOf" : [
{
"$ref" : "#/components/schemas/Volume"
2024-08-14 14:52:40 -07:00
}
] ,
2024-08-28 15:15:37 -04:00
"description" : "Maximum part size that can be manufactured by this device. This may be some sort of theoretical upper bound, getting close to this limit seems like maybe a bad idea.\n\nThis may be `None` if the maximum size is not knowable by the Machine API.\n\nWhat \"close\" means is up to you!" ,
"nullable" : true
}
} ,
"required" : [
"id" ,
"machine_type" ,
"make_model"
] ,
"type" : "object"
} ,
"MachineMakeModel" : {
"description" : "Information regarding the make/model of a discovered endpoint." ,
"properties" : {
"manufacturer" : {
"description" : "The manufacturer that built the connected Machine." ,
"nullable" : true ,
"type" : "string"
2024-08-14 14:52:40 -07:00
} ,
2024-08-28 15:15:37 -04:00
"model" : {
"description" : "The model of the connected Machine." ,
"nullable" : true ,
"type" : "string"
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"serial" : {
"description" : "The unique serial number of the connected Machine." ,
"nullable" : true ,
"type" : "string"
2024-08-02 14:10:52 -07:00
}
2024-08-28 15:15:37 -04:00
} ,
"type" : "object"
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"MachineType" : {
"description" : "Specific technique by which this Machine takes a design, and produces a real-world 3D object." ,
2024-07-30 19:57:57 -07:00
"oneOf" : [
{
2024-08-28 15:15:37 -04:00
"description" : "Use light to cure a resin to build up layers." ,
2024-07-30 19:57:57 -07:00
"enum" : [
2024-08-28 15:15:37 -04:00
"Stereolithography"
2024-07-30 19:57:57 -07:00
] ,
"type" : "string"
} ,
{
2024-08-28 15:15:37 -04:00
"description" : "Fused Deposition Modeling, layers of melted plastic." ,
2024-08-03 15:25:02 -07:00
"enum" : [
2024-08-28 15:15:37 -04:00
"FusedDeposition"
2024-08-03 15:25:02 -07:00
] ,
"type" : "string"
} ,
{
2024-08-28 15:15:37 -04:00
"description" : "\"Computer numerical control\" - machine that grinds away material from a hunk of material to construct a part." ,
2024-08-03 15:25:02 -07:00
"enum" : [
2024-08-28 15:15:37 -04:00
"Cnc"
2024-08-03 15:25:02 -07:00
] ,
"type" : "string"
}
]
} ,
2024-07-30 19:57:57 -07:00
"Pong" : {
"description" : "The response from the `/ping` endpoint." ,
"properties" : {
"message" : {
"description" : "The pong response." ,
"type" : "string"
}
} ,
"required" : [
"message"
] ,
"type" : "object"
} ,
2024-08-28 15:15:37 -04:00
"PrintJobResponse" : {
"description" : "The response from the `/print` endpoint." ,
"properties" : {
"job_id" : {
"description" : "The job id used for this print." ,
"type" : "string"
2024-08-03 16:07:42 -07:00
} ,
2024-08-28 15:15:37 -04:00
"parameters" : {
"allOf" : [
{
"$ref" : "#/components/schemas/PrintParameters"
2024-08-14 16:59:39 -07:00
}
] ,
2024-08-28 15:15:37 -04:00
"description" : "The parameters used for this print."
}
} ,
"required" : [
"job_id" ,
"parameters"
] ,
"type" : "object"
} ,
"PrintParameters" : {
"description" : "Parameters for printing." ,
"properties" : {
"job_name" : {
"description" : "The name for the job." ,
"type" : "string"
2024-08-02 14:10:52 -07:00
} ,
2024-07-30 19:57:57 -07:00
"machine_id" : {
2024-08-02 14:10:52 -07:00
"description" : "The machine id to print to." ,
2024-07-30 19:57:57 -07:00
"type" : "string"
}
} ,
"required" : [
2024-08-02 14:10:52 -07:00
"job_name" ,
2024-07-30 19:57:57 -07:00
"machine_id"
] ,
"type" : "object"
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"Volume" : {
"description" : "Set of three values to represent the extent of a 3-D Volume. This contains the width, depth, and height values, generally used to represent some maximum or minimum.\n\nAll measurements are in millimeters." ,
2024-08-02 14:10:52 -07:00
"properties" : {
2024-08-28 15:15:37 -04:00
"depth" : {
"description" : "Depth of the volume (\"front to back\"), in millimeters." ,
2024-08-02 14:10:52 -07:00
"format" : "double" ,
"type" : "number"
} ,
2024-08-28 15:15:37 -04:00
"height" : {
"description" : "Height of the volume (\"up and down\"), in millimeters." ,
"format" : "double" ,
"type" : "number"
2024-08-02 14:10:52 -07:00
} ,
2024-08-28 15:15:37 -04:00
"width" : {
"description" : "Width of the volume (\"left and right\"), in millimeters." ,
"format" : "double" ,
"type" : "number"
2024-08-02 14:10:52 -07:00
}
} ,
"required" : [
2024-08-28 15:15:37 -04:00
"depth" ,
"height" ,
"width"
2024-08-02 14:10:52 -07:00
] ,
"type" : "object"
2024-07-30 19:57:57 -07:00
}
}
} ,
"info" : {
"contact" : {
"email" : "machine-api@zoo.dev" ,
"url" : "https://zoo.dev"
} ,
"description" : "" ,
"title" : "machine-api" ,
"version" : "0.1.0"
} ,
"openapi" : "3.0.3" ,
"paths" : {
"/" : {
"get" : {
"operationId" : "api_get_schema" ,
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : { }
}
} ,
"description" : "successful operation"
} ,
"4XX" : {
"$ref" : "#/components/responses/Error"
} ,
"5XX" : {
"$ref" : "#/components/responses/Error"
}
} ,
"summary" : "Return the OpenAPI schema in JSON format." ,
"tags" : [
"meta"
]
}
} ,
"/machines" : {
"get" : {
"operationId" : "get_machines" ,
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
2024-08-28 15:15:37 -04:00
"items" : {
"$ref" : "#/components/schemas/MachineInfoResponse"
2024-07-30 19:57:57 -07:00
} ,
2024-08-28 15:15:37 -04:00
"title" : "Array_of_MachineInfoResponse" ,
"type" : "array"
2024-07-30 19:57:57 -07:00
}
}
} ,
"description" : "successful operation"
} ,
"4XX" : {
"$ref" : "#/components/responses/Error"
} ,
"5XX" : {
"$ref" : "#/components/responses/Error"
}
} ,
"summary" : "List available machines and their statuses" ,
"tags" : [
2024-08-02 14:10:52 -07:00
"machines"
]
}
} ,
"/machines/{id}" : {
"get" : {
"operationId" : "get_machine" ,
"parameters" : [
{
"description" : "The machine ID." ,
"in" : "path" ,
"name" : "id" ,
"required" : true ,
"schema" : {
"type" : "string"
}
}
] ,
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
2024-08-28 15:15:37 -04:00
"$ref" : "#/components/schemas/MachineInfoResponse"
2024-08-02 14:10:52 -07:00
}
}
} ,
"description" : "successful operation"
} ,
"4XX" : {
"$ref" : "#/components/responses/Error"
} ,
"5XX" : {
"$ref" : "#/components/responses/Error"
}
} ,
"summary" : "Get the status of a specific machine" ,
"tags" : [
"machines"
2024-07-30 19:57:57 -07:00
]
}
} ,
"/ping" : {
"get" : {
"operationId" : "ping" ,
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pong"
}
}
} ,
"description" : "successful operation"
} ,
"4XX" : {
"$ref" : "#/components/responses/Error"
} ,
"5XX" : {
"$ref" : "#/components/responses/Error"
}
} ,
"summary" : "Return pong." ,
"tags" : [
"meta"
]
}
} ,
"/print" : {
"post" : {
"operationId" : "print_file" ,
"requestBody" : {
"content" : {
"multipart/form-data" : {
"schema" : {
"format" : "binary" ,
"type" : "string"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PrintJobResponse"
}
}
} ,
"description" : "successful operation"
} ,
"4XX" : {
"$ref" : "#/components/responses/Error"
} ,
"5XX" : {
"$ref" : "#/components/responses/Error"
}
} ,
"summary" : "Print a given file. File must be a sliceable 3D model." ,
"tags" : [
2024-08-02 14:10:52 -07:00
"machines"
2024-07-30 19:57:57 -07:00
]
}
}
} ,
"tags" : [
{
2024-08-02 14:10:52 -07:00
"description" : "Utilities for making parts and discovering machines." ,
2024-07-30 19:57:57 -07:00
"externalDocs" : {
2024-08-02 14:10:52 -07:00
"url" : "https://docs.zoo.dev/api/machines"
2024-07-30 19:57:57 -07:00
} ,
2024-08-02 14:10:52 -07:00
"name" : "machines"
2024-07-30 19:57:57 -07:00
} ,
{
2024-08-02 14:10:52 -07:00
"description" : "Meta information about the API." ,
2024-07-30 19:57:57 -07:00
"externalDocs" : {
2024-08-02 14:10:52 -07:00
"url" : "https://docs.zoo.dev/api/meta"
2024-07-30 19:57:57 -07:00
} ,
2024-08-02 14:10:52 -07:00
"name" : "meta"
2024-07-30 19:57:57 -07:00
}
]
}