ZapytanieBetaQuery.machines
Machines of the print shop, one page at a time, with the total count: what Operation.machineId and Task.machineId point at, decommissioned ones included (isActive false; older operations still point at them). A small list that rarely changes: read it whole, without the isActive filter, and keep it.
| Wymagany zakres | reference:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | MachineFilterInput | Conditions the machines must meet; without it every machine is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | MachineSortInput | Order of the list; without it alphabetical by name. |
Zwraca
Przykład
query Machines { machines(pagination: { page: 1, pageSize: 100 }) { items { id name model manufacturer isActive } }}curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \ -H "Authorization: Bearer $PRYNT_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<'JSON'{ "query": "query Machines {\n machines(pagination: { page: 1, pageSize: 100 }) {\n items {\n id\n name\n model\n manufacturer\n isActive\n }\n }\n}"}JSON{ "data": { "machines": { "items": [ { "id": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a", "name": "Heidelberg SM 74", "model": "Speedmaster SM 74-4", "manufacturer": "Heidelberg", "isActive": true }, { "id": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b", "name": "Laminator Komfi", "model": "Amiga 52", "manufacturer": "Komfi", "isActive": true }, { "id": "6f7a8b9c-0d1e-4f2a-8b3c-4d5e6f7a8b9c", "name": "GTO 52 (wycofana)", "model": "GTO 52-2", "manufacturer": "Heidelberg", "isActive": false } ] } }}