Skip to content

Commit d782285

Browse files
authored
Merge pull request #8 from SimplyPrint/queue-groups
Queue groups
2 parents e900e39 + c241910 commit d782285

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

source/includes/_queue.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ curl https://api.simplyprint.io/{id}/queue/AddItem \
1313
1414
```json
1515
{
16-
"filesystem": "1a077dd6296417fe75555bf806b68089"
16+
"filesystem": "1a077dd6296417fe75555bf806b68089",
17+
"amount": 5,
18+
"group": 0
1719
}
1820
```
1921

@@ -43,6 +45,7 @@ This endpoint adds a file to the queue. The file can either be a file on the fil
4345
| --------- | ---- | -------- | ----------- |
4446
| `filesystem` | string | no | The filesystem id of the file to add to the queue. |
4547
| `amount` | integer | no | The amount of prints to add to the queue.<br>**Default: 1** |
48+
| `group` | integer | no | If you have Queue Groups - ID of the group the item should be added to.<br>**Default: 0 - required if you have Queue Groups** |
4649

4750
### Response
4851

@@ -201,10 +204,13 @@ curl https://api.simplyprint.io/{id}/queue/GetItems?p=1234 \
201204
"id": 51293,
202205
"index": 1,
203206
"filename": "benchy.gcode",
207+
"note": null,
204208
"model": false,
209+
"printable": true,
205210
"left": 1,
206211
"printed": 0,
207212
"filesystem_id": "c00489ef361771ac098b5a60e6740757",
213+
"group": 0,
208214
"for": {
209215
"printers": [
210216
1234
@@ -295,10 +301,13 @@ This endpoint returns the queue for the specified or all printers.
295301
| `queue.items[].id` | integer | The queue item id. |
296302
| `queue.items[].index` | integer | The queue item index. |
297303
| `queue.items[].filename` | string | The queue item filename. |
304+
| `queue.items[].note` | string|nullable | Optional note text. |
298305
| `queue.items[].model` | boolean | True if the queue item is a model. |
306+
| `queue.items[].printable` | boolean | True if the queue is printable. |
299307
| `queue.items[].left` | integer | The amount of prints left to print. |
300308
| `queue.items[].printed` | integer | The amount of prints that have been printed. |
301309
| `queue.items[].filesystem_id` | string/null | File id if print is from SimplyPrint filesystem. |
310+
| `queue.items[].group` | integer | Possible ID of Queue Group. |
302311
| `queue.items[].for` | object | For which printers, models and groups this queue item is for. |
303312
| `queue.items[].for.printers` | array | An array of printer ids. |
304313
| `queue.items[].for.models` | array | An array of printer model ids. |
@@ -318,6 +327,12 @@ This endpoint returns the queue for the specified or all printers.
318327
| `queue.items[].user` | string | The user name of who added the queue item. |
319328
| `queue.items[].user_id` | integer | The user id of who added the queue item. |
320329
| `queue.items[].tags` | object|nullable | Tags for queue item; custom tags, static material data & nozzle size |
330+
| `queue.done_items` | array | If `groups` GET is set, an array of done queue items, or ones where the last remaining item is being printed **includes all the same fields as queue items, with a few extra;**. |
331+
| `queue.done_items[]....` | | *Fields inherited from regular queue items*. |
332+
| `queue.done_items[].size` | integer | Byte-size used by this item - 0 if the file is from the filesystem. |
333+
| `queue.done_items[].ongoing` | boolean | If the item is currently ongoing. |
334+
| `queue.done_items[].done` | UTC date|nullable | UTC date that the item was finished. |
335+
| `queue.done_items[].expires` | UTC date|nullable | UTC date that the item expires and is removed from the platform. |
321336

322337
## Update queue item
323338

@@ -377,6 +392,7 @@ This endpoint updates the queue item with the specified id.
377392
| `for_models` | array | no | An array of printer model ids to assign the queue item to. |
378393
| `for_printers` | array | no | An array of printer ids to assign the queue item to. |
379394
| `amount` | integer | no | The new amount to set. |
395+
| `amount` | integer | no | Set amount of "printed". |
380396

381397
### Response
382398

@@ -494,6 +510,10 @@ This endpoint empties the queue.
494510

495511
`GET /{id}/queue/EmptyQueue`
496512

513+
| Parameter | Type | Required | Description |
514+
| --------- | ---- | -------- | ----------- |
515+
| `group` | integer | no | ID of Queue Group to empty.<br>**Default: 0 - required if you have Queue Groups |
516+
497517
### Response
498518

499519
| Parameter | Type | Description |

0 commit comments

Comments
 (0)