Skip to content

Commit 2bfda46

Browse files
committed
Added documentation for groups GET parameter in queue/GetItems
1 parent 64df386 commit 2bfda46

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

source/includes/_queue.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ curl https://api.simplyprint.io/{id}/queue/GetItems?p=1234 \
214214
"left": 1,
215215
"printed": 0,
216216
"filesystem_id": "c00489ef361771ac098b5a60e6740757",
217-
"group": 0,
217+
"group": 123,
218218
"for": {
219219
"printers": [
220220
1234
@@ -275,7 +275,21 @@ curl https://api.simplyprint.io/{id}/queue/GetItems?p=1234 \
275275
}
276276
}
277277
]
278-
}
278+
},
279+
"groups": [
280+
{
281+
"id": 123,
282+
"name": "Group 1",
283+
"virtual": false,
284+
"extensions": [
285+
"gcode",
286+
"gco",
287+
"stl",
288+
],
289+
"sort_order": 0
290+
},
291+
...
292+
]
279293
}
280294
```
281295

@@ -292,6 +306,7 @@ This endpoint returns the queue for the specified or all printers.
292306
| Parameter | Type | Required | Description |
293307
| --------- | ---- | -------- | ----------- |
294308
| `p` | integer | no | The printer id to get the queue for. If not specified, the queue for all printers will be returned. |
309+
| `groups` | boolean | no | Attaches a list of print queue groups to the response. Note: this argument does not take a value. |
295310

296311
### Response
297312

@@ -335,8 +350,14 @@ This endpoint returns the queue for the specified or all printers.
335350
| `queue.done_items[]....` | | *Fields inherited from regular queue items*. |
336351
| `queue.done_items[].size` | integer | Byte-size used by this item - 0 if the file is from the filesystem. |
337352
| `queue.done_items[].ongoing` | boolean | If the item is currently ongoing. |
338-
| `queue.done_items[].done` | UTC date|nullable | UTC date that the item was finished. |
339-
| `queue.done_items[].expires` | UTC date|nullable | UTC date that the item expires and is removed from the platform. |
353+
| `queue.done_items[].done` | UTC date/null | UTC date that the item was finished. |
354+
| `queue.done_items[].expires` | UTC date/null | UTC date that the item expires and is removed from the platform. |
355+
| `groups` | array | If `groups` GET is set, an array of print queue groups. |
356+
| `groups[].id` | integer | The group id. |
357+
| `groups[].name` | string | The group name. |
358+
| `groups[].virtual` | boolean | Whether the group is a virtual queue group. |
359+
| `groups[].extensions` | array/null | An array of file extensions that are allowed in the group. |
360+
| `groups[].sort_order` | integer | The sort index of the group. |
340361

341362
## Update queue item
342363

0 commit comments

Comments
 (0)