You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Failed response (Could not find any items that match the specified conditions)
106
+
107
+
```json
108
+
{
109
+
"status": true,
110
+
"message": null,
111
+
"queue": {
112
+
"total": 15,
113
+
"printers": [
114
+
385
115
+
],
116
+
"matches": [
117
+
{
118
+
"printer": 385,
119
+
"match": false,
120
+
"issues": [
121
+
"size",
122
+
"temps"
123
+
],
124
+
"missed": 4
125
+
}
126
+
]
127
+
}
128
+
}
129
+
```
130
+
131
+
<asideclass="notice">
132
+
This endpoint requires the <b>Print Farm</b> plan.
133
+
</aside>
134
+
135
+
This endpoint gets the next item in the queue for the specified printer. The next item is the item that has the highest priority. The result will have skipped all items that do not meet the specified conditions.
136
+
137
+
### Request
138
+
139
+
`POST /{id}/queue/GetNextItems`
140
+
141
+
#### Request parameters
142
+
143
+
| Parameter | Type | Required | Description |
144
+
| --------- | ---- | -------- | ----------- |
145
+
| p | integer[]| yes | Comma separated list of printer ids to get the next items for. |
146
+
147
+
#### Request body
148
+
149
+
| Parameter | Type | Required | Description |
150
+
| --------- | ---- | -------- | ----------- |
151
+
|`settings`| object | no | Conditions that must be met for the next item. |
152
+
|`settings.filament`| boolean | no | Must have enough filament.<br>**Default: true**|
153
+
|`settings.filamentTemps`| boolean | no | Printer's filament temperature must match filament temperature of file.<br>**Default: true**|
154
+
|`settings.fit`| boolean | no | Print must fit printer's bed.<br>**Default: true**|
155
+
|`settings.gcodeAnalysis`| boolean | no | Must have gcode analysis.<br>**Default: true**|
156
+
|`settings.printerTemps`| boolean | no | File must have a max temperature that is lower than the printer's max temperature.<br>**Default: true**|
157
+
158
+
### Response
159
+
160
+
| Parameter | Type | Description |
161
+
| --------- | ---- | ----------- |
162
+
|`status`| boolean | True if the request was successful. |
163
+
|`message`| string | Success message or error message if `status` is false. |
164
+
|`queue`| object | The queue object. |
165
+
|`queue.total`| integer | The total amount of items in the queue. |
166
+
|`queue.printers`| integer[]| The printer ids that were requested. |
167
+
|`queue.matches`| array | The next items for each printer. |
168
+
|`queue.matches[].id`| integer | The id of the next item. Only present if `match` is true. |
169
+
|`queue.matches[].index`| integer | The index of the item in the queue. Only present if `match` is true. |
170
+
|`queue.matches[].printer`| integer | The id of the printer that the item is for. |
171
+
|`queue.matches[].match`| boolean | True if a match was found. |
172
+
|`queue.matches[].issues`| string[]| The issues that are present in the item. Can also have values if an item was matched but would have been catched by other settings. |
173
+
|`queue.matches[].missed`| integer | The amount of items that were skipped. |
174
+
|`queue.matches[].name`| string | The name of the item. Only present if `match` is true. |
175
+
|`queue.matches[].printed`| integer | The amount of completed prints of this item (from print queue). Only present if `match` is true. |
176
+
|`queue.matches[].left`| integer | The amount of prints left (from print queue). Only present if `match` is true. |
0 commit comments